Skip to content
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

SwapChainPanel.SizeChanged crashing #34169

Closed
Gavin-Williams opened this issue Mar 26, 2020 · 2 comments
Closed

SwapChainPanel.SizeChanged crashing #34169

Gavin-Williams opened this issue Mar 26, 2020 · 2 comments

Comments

@Gavin-Williams
Copy link

If I subscribe to SwapChainPanel.SizeChanged with an empty method, it resizes. But if i have a line of code in there with a breakpoint the app crashes. Am I not understanding something here?

This will run and resize ..

 private void SwapChainPanel_SizeChanged(object sender, Windows.UI.Xaml.SizeChangedEventArgs e)
 {
     //HostSize = new IntSize((int)e.NewSize.Width, (int)e.NewSize.Height);
 }

This will crash ..

 private void SwapChainPanel_SizeChanged(object sender, Windows.UI.Xaml.SizeChangedEventArgs e)
 {
     HostSize = new IntSize((int)e.NewSize.Width, (int)e.NewSize.Height); ** BREAKPOINT SET **
 }

Output ..

onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!513C44D2: (caller: 513C4327) ReturnHr(1) tid(5688) 80070490 Element not found. onecoreuap\windows\wgi\winrt\display\displaycommon.cpp(411)\Windows.Graphics.dll!513C44D2: (caller: 513C4327) ReturnHr(2) tid(5688) 80070490 Element not found. Exception thrown at 0x76BB4192 in DemoLoadingData.exe: Microsoft C++ exception: EEFileLoadException at memory location 0x0947CDBC. Exception thrown at 0x76BB4192 in DemoLoadingData.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000. Exception thrown at 0x76BB4192 in DemoLoadingData.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000. Exception thrown at 0x76BB4192 in DemoLoadingData.exe: Microsoft C++ exception: [rethrow] at memory location 0x00000000. Exception thrown at 0x76BB4192 (KernelBase.dll) in DemoLoadingData.exe: WinRT originate error - 0x80131040 : 'System.IO.FileLoadException: Could not load file or assembly 'System.Runtime.WindowsRuntime, Version=4.0.15.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040) at Engines.Engine2.SwapChainPanel_SizeChanged(Object sender, SizeChangedEventArgs e)'. The program '[5180] DemoLoadingData.exe' has exited with code 0 (0x0).

@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added area-System.Threading.Channels untriaged New issue has not been triaged by the area owner labels Mar 26, 2020
@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Apr 3, 2020
@jeffschwMSFT jeffschwMSFT added this to the 5.0 milestone Apr 3, 2020
@AaronRobinsonMSFT
Copy link
Member

AaronRobinsonMSFT commented May 30, 2020

@Gavin-Williams Sorry for the very late reply here. Our plans for WinRT have substantially changed in .NET 5.0. The future of WinRT support is described in #35318.

With respect to the specific issue here it appears that the System.Runtime.WindowsRuntime version that is deployed with the application is incorrect. @jkoritzinsky do you have any thoughts on why that might be?

@Gavin-Williams
Copy link
Author

@AaronRobinsonMSFT Hi, I'm not experiencing this issue now. I think this was due to, as you say, I was using the wrong 'package'.

I brought up the issue with packages here .. #34309 where you commented last week.

So If I understand the issue correctly in retrospect, this issue and that issue about the similar package names document the path I had to take over a week or so working out what was wrong. But this definitely had me in a fever for a bit there, because I couldn't see what the issue was.

Thanks for following up. I will close this issue, as it was probably a case of incorrect package.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants