dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
602 stars 38 forks source link

Calling Activate on window hidden through Hide extension function can crash #48

Closed marcelwgn closed 2 years ago

marcelwgn commented 2 years ago

We observed that on some machines, calling Activate on a window hidden through the Hide extension function can occasionally crash with the following error message: System.Runtime.InteropServices.COMException: 'The operation identifier is not valid. (0x800710DD)'

The debug output shows an error message along the lines of Cannot activate a closed or disposed window.

dotMorten commented 2 years ago

From email thread: @dotMorten :

Is something holding on to the Window instance? Ie is it getting garbage collected? Is it 100% reproducible on those machines, or is it still random when it happens? Also please enable native debugging, and then get the full stacktrace and (hopefully) improved error message you get when you do. Lastly can you share the non-paraphrased version of the error message you see in the output window?

@chingucoding :

Regarding reproducibility: There are machines where the code works fine every time, there are machines where this happens occasionally and from what I understood, at least one machine reproduces this 100% of the time. Regarding the other questions, unfortunately, a customer noticed this and I’ll have to wait for their reply since I can’t reproduce this locally.

dotMorten commented 2 years ago

@chingucoding were you ever able to get more information on this?

marcelwgn commented 2 years ago

They just got back to me and it seems that this issue does no longer occur with the WASDK 1.1.0.

dotMorten commented 2 years ago

@chingucoding Awesome. Thank you for the follow-up