-
Notifications
You must be signed in to change notification settings - Fork 8.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows Terminal throws an exception on exit #15364
Comments
Oh, I wonder if we need to release all the WinUI members from |
Also, I think I just realized that we might want to also call SetWindowLongPtr(GetHandle(), GWLP_USERDATA, 0); in void IslandWindow::Close()
{
if (_source)
{
SetWindowLongPtr(GetHandle(), GWLP_USERDATA, 0);
_rootGrid = nullptr;
_source.Close();
_source = nullptr;
}
} |
I've update SetWindowLongPtr(_dragBarWindow.get(), GWLP_USERDATA, 0);
IslandWindow::Close();
_dragBar = nullptr;
_clientContent = nullptr; But it's still crashing. |
Ah too bad... It probably won't fix it then. Although I think you'd have to put the 2 |
OOOOH... It's crashing in |
OK, I've tried with the two nullptr assignments before the If it helps, looking at the disassembly for the
So that looks to me like You're welcome to suggest other things for me to try, as long as you don't mind the slow turnaround time. |
From the internal bug:
that might be a clue. I'm inclined to not call this 1.18 blocking? |
That inspired me to try calling
Yeah. As far as I can see, it's not noticeable outside the debugger, so it doesn't seem like a big deal. |
Just to be absolutely clear, my working void AppHost::Close()
{
// After calling _window->Close() we should avoid creating more WinUI related actions.
// I suspect WinUI wouldn't like that very much. As such unregister all event handlers first.
_revokers = {};
_showHideWindowThrottler.reset();
_window->Close();
if (_windowLogic)
{
_windowLogic.DismissDialog();
_windowLogic = nullptr;
}
} |
This comment was marked as off-topic.
This comment was marked as off-topic.
I can reproduce this as well, but only outside the debugger, and only after applying the Edit: I don't typically use multiple windows myself, but for people that do, this does seems like a big deal, so maybe worth reconsidering as a 1.18 blocker. |
Oh it's definitely been promoted to a 1.18 block, don't worry about that. I'm inclined to say that your proposal here works and is fairly minimal, so safe to bring in (over some more convoluted lifetime management changes). I'm trying to dig in to the source of the button one. I've got this horrible theory that it's something that was fixed in Windows 11. I need to consult an expert here. You're on 10.0.19045.2728, so that at least would be quite a bit more up to date than my VM. I'm gonna fork that to another thread. |
This comment was marked as off-topic.
This comment was marked as off-topic.
As discussed. Closes #15364. Prevents one crash on Windows 10. Opens the door to may more horrors. Co-authored-by: James Holderness <j4_james@hotmail.com>
Windows Terminal version
Commit ba39db5
Windows build number
10.0.19045.2728
Other Software
No response
Steps to reproduce
Expected Behavior
It should shutdown gracefully.
Actual Behavior
It crashes with an exception:
Stack trace:
This looks very similar to #11980 and #13955, so I wouldn't be surprised if this is the MSFT:26130824 bug that is supposed to have been fixed in Windows 11. However, in my case there are no dialogs popping up, and there is nothing wrong with the settings (I reset my settings.json to the defaults).
Most importantly, though, I've only had this issue since PR #15338 was merged, and now I get it every time I run the app from within VS. So I don't mind if you also end up closing this as Resolution-External, but I thought it worth raising in case there's a more serious regression here.
The text was updated successfully, but these errors were encountered: