Open phougt opened 10 months ago
I can reproduce this issue as well. But oddly enough, it doesn't reproduce when I enable debugging in Visual Studio.
Thank you for the report
It appears to be caused by PR #14342 .
This issue seems to no longer occur in version 3.5.0.0. But keep creating and closing new tabs in full-screen mode (create ~10 tabs, close them all, repeat) can sometimes cause crashes.
2024-07-06 14:44:55.2307|Error|System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.InvalidCastException: Specified cast is not valid.
at WinRT.IObjectReference.As[T](Guid iid)
at Microsoft.UI.Input.InputNonClientPointerSource..ctor(IObjectReference objRef)
at InvokeStub_InputNonClientPointerSource..ctor(Object, Span`1)
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
--- End of inner exception stack trace ---
at System.Reflection.MethodBaseInvoker.InvokeWithOneArg(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.RuntimeConstructorInfo.Invoke(BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at WinRT.DefaultComWrappers.CreateObject(IntPtr externalComObject)
at System.Runtime.InteropServices.ComWrappers.CallCreateObject(ComWrappersScenario scenario, ComWrappers comWrappersImpl, IntPtr externalComObject, CreateObjectFlags flags)
at System.Runtime.InteropServices.ComWrappers.<TryGetOrCreateObjectForComInstanceInternal>g____PInvoke|18_0(ObjectHandleOnStack __comWrappersImpl_native, Int64 __wrapperId_native, IntPtr __externalComObject_native, IntPtr __innerMaybe_native, CreateObjectFlags __flags_native, ObjectHandleOnStack __wrapper_native, ObjectHandleOnStack __retValue_native)
at WinRT.ComWrappersSupport.CreateRcwForComObject[T](IntPtr ptr, Boolean tryUseCache)
at WinRT.MarshalInspectable`1.FromAbi(IntPtr ptr)
at ABI.Microsoft.UI.Input.IInputNonClientPointerSourceStaticsMethods.GetForWindowId(IObjectReference _obj, WindowId windowId)
at Files.App.Helpers.DragZoneHelper.RaiseSetTitleBarDragRegion(Window window, SetTitleBarDragRegionDelegate setTitleBarDragRegion)
at ABI.Microsoft.UI.Xaml.SizeChangedEventHandler.Do_Abi_Invoke(IntPtr thisPtr, IntPtr sender, IntPtr e)
I can still repro this in v3.6
Description
Greeting everyone, Files crash whenever I close tab after creating it in fullscreen mode. If I create a new tab in non-fullscreen mode, then delete it fullscreen mode, it doesn't crash.
Steps To Reproduce
Requirements
I expected it to not crash after closing tab.
Files Version
3.1.1.0
Windows Version
10.0.22635.2921
Log File
debug.log