View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001424 | NoesisGUI | C++ SDK | public | 2019-03-14 10:27 | 2019-05-14 23:39 |
| Reporter | realesmedia | Assigned To | jsantos | ||
| Priority | normal | Severity | minor | ||
| Status | resolved | Resolution | fixed | ||
| Product Version | 2.2.0b10 | ||||
| Target Version | 2.2.3 | Fixed in Version | 2.2.3 | ||
| Summary | 0001424: crash on closing the window (NoesisApp::Window) | ||||
| Description | We use a multi-window interface. When you close the window using the Close () method, crash occurs in the destructor ..Src\Packages\App\ApplicationLauncher\Src\window.cpp Window::~Window()
} void Window::Close() | ||||
| Attached Files | |||||
| Platform | Windows | ||||
|
Sorry, I am not following here. Could you please elaborate a bit more about where the crash is happening? What display implementation are you using? I just tried in one of our examples doing a manual close and everything is working fine (Windows 10) |
|
|
Hi I inherit from NoesisApp::Window. I create several dialog windows. if you close the window using the Window::Close() method, then ~Window () will crash. fix method |
|
|
What crash are you getting if you don't set mDisplay to nullptr? Could you please paste the callstack? |
|
|
if mDisplay is not set to nullptr, the destructor tries to unsubscribe from the events mDisplay ..Src\Packages\App\ApplicationLauncher\Src\window.cpp Window::~Window()
} |
|
|
Yes, but I don't understand why unsubscribing is crashing when using two windows. Could you please paste the callstack when crashing? |
|
|
Does not depend on the number of windows. after calling Window :: Close () mDisplay is destroyed. ~ Windows () tries to access it. System: |
|
|
Dump |
|
|
Our Window::Close does not destroy the display
So I am not sure how the crash is happening. I tried reproducing the issue. I need a callstack with the crash please, not a dump. Thanks! |
|
|
ucrtbased.dll!00007ffe87387f65() Unknown Non-user code. Cannot find or open the PDB file.
|
|
|
Window()::Close() -> Win32Display()-> SendMessage(mWindowHandle, WM_CLOSE, 0, 0); -> ~Win32Display() ~Window() mDsiplay(Win32Display) destroed |
|
|
excuse this in our inherited class WindowEx :: Close is called Display.Reset (). This is a feature of the implementation of our WindowsEx. Using the WindowEx class is similar to using the WPF Window. I inherited the WindowEx class from NoesisApp :: Window and made members of the Display class and the RenderContext class. This works fine, but when I close the window, I cannot notify Window that Display has been destroyed, As a variant remove unbind mDisplay in the method Window::Shutdown () simplified WindowEx: |
|
|
So there is nothing wrong at our code right? Can we close this? |
|
|
Yes. Only if it is possible to transfer the ~ Window() code to Window::Shutdown() thanks |
|
|
Yes, that makes sense. Moving the code from the destructor to the end of Shutdown(). Could you try it and let me know if it works for you? |
|
|
I tested this option. works good))) |
|
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-03-14 10:27 | realesmedia | New Issue | |
| 2019-03-14 10:27 | realesmedia | Tag Attached: C++ | |
| 2019-03-14 10:28 | realesmedia | Severity | feature => minor |
| 2019-03-14 10:28 | realesmedia | Steps to Reproduce Updated | |
| 2019-03-14 11:08 | realesmedia | Steps to Reproduce Updated | |
| 2019-03-14 16:04 | realesmedia | Steps to Reproduce Updated | |
| 2019-03-18 22:23 | sfernandez | Assigned To | => jsantos |
| 2019-03-18 22:23 | sfernandez | Status | new => assigned |
| 2019-03-18 22:23 | sfernandez | Target Version | => 2.2.1 |
| 2019-04-02 20:20 | jsantos | Note Added: 0005589 | |
| 2019-04-02 20:21 | jsantos | Status | assigned => feedback |
| 2019-04-02 20:21 | jsantos | Target Version | 2.2.1 => |
| 2019-04-08 15:50 | realesmedia | File Added: screen.jpg | |
| 2019-04-08 15:50 | realesmedia | Note Added: 0005616 | |
| 2019-04-08 15:50 | realesmedia | Status | feedback => assigned |
| 2019-04-08 16:19 | jsantos | Status | assigned => feedback |
| 2019-04-08 16:19 | jsantos | Note Added: 0005617 | |
| 2019-04-09 16:32 | realesmedia | Note Added: 0005619 | |
| 2019-04-09 16:32 | realesmedia | Status | feedback => assigned |
| 2019-04-10 13:51 | jsantos | Note Added: 0005623 | |
| 2019-04-10 13:51 | jsantos | Status | assigned => feedback |
| 2019-04-10 14:41 | realesmedia | Note Added: 0005624 | |
| 2019-04-10 14:41 | realesmedia | Status | feedback => assigned |
| 2019-04-10 14:46 | realesmedia | Note Edited: 0005624 | |
| 2019-04-10 14:56 | realesmedia | Note Added: 0005625 | |
| 2019-04-10 14:59 | jsantos | Note Added: 0005626 | |
| 2019-04-10 14:59 | jsantos | Status | assigned => feedback |
| 2019-04-10 15:06 | realesmedia | Note Edited: 0005625 | |
| 2019-04-10 15:15 | realesmedia | Note Added: 0005627 | |
| 2019-04-10 15:15 | realesmedia | Status | feedback => assigned |
| 2019-04-10 15:23 | realesmedia | Note Added: 0005628 | |
| 2019-04-10 16:29 | realesmedia | Note Added: 0005629 | |
| 2019-04-10 16:32 | jsantos | Note Added: 0005630 | |
| 2019-04-10 16:33 | jsantos | Status | assigned => feedback |
| 2019-04-10 16:46 | realesmedia | Note Added: 0005631 | |
| 2019-04-10 16:46 | realesmedia | Status | feedback => assigned |
| 2019-04-10 16:57 | jsantos | Note Added: 0005632 | |
| 2019-04-10 16:57 | jsantos | Status | assigned => feedback |
| 2019-04-10 16:59 | realesmedia | Note Added: 0005633 | |
| 2019-04-10 16:59 | realesmedia | Status | feedback => assigned |
| 2019-04-10 17:03 | jsantos | Target Version | => 2.2.2 |
| 2019-04-30 10:55 | sfernandez | Target Version | 2.2.2 => 2.2.3 |
| 2019-05-14 23:38 | jsantos | Fixed in Version | => 2.2.3 |
| 2019-05-14 23:39 | jsantos | Status | assigned => resolved |
| 2019-05-14 23:39 | jsantos | Resolution | open => fixed |