-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
[WinUI3] Viewport3DX crash to a white background after nagivating to another page #2059
Comments
Check whether an new effect manager being created every time page is switched. |
Thanks for your answer, but no Effect Manager being created. The Effect Manager is created once the instance of |
Could you create a sample project for me to debug? |
Hi, I ran into the same issue. I was able to "solve" it by listening to the SizeChanged Event of the control and setting the width of the viewport to a fixed value and immediately back to "double.NaN". InitializeComponent();
SizeChanged += (sender, args) =>
{
PositioningViewport.Width = 800;
DispatcherQueue.TryEnqueue(() => PositioningViewport.Width = double.NaN);
}; In your case |
Hi, I'm having a trouble with my WinUI 3 application: I have a
<hx:Viewport3DX>
inside one of my pages. At the first time navigating to that page, things work well. But after I switch to another page, then switch back, the viewport becomes white, and I can't react to the viewport anymore until I restart the program.Before switching to another page:
After switching to another page:
the code I used to display the viewport:
That page has been cached using
NavigationCacheMode="Required"
. All the content of the Viewport is delivered from an instance of classTrackingSpaceViewport
containing camera, effectsmanager,...I tried to turn off page caching with
NavigationCacheMode="Disabled"
but everytime I reopen that page, the memory keeps increasing and I think there is a memory leak in Viewport3DX (tested by commenting the viewport3dx code and it's gone).Can anyone suggest me how to fix this?
The text was updated successfully, but these errors were encountered: