Files icon indicating copy to clipboard operation
Files copied to clipboard

Bug: Removing tab in full screen mode crashes app

Open phougt opened this issue 2 years ago • 5 comments

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

  1. Open Files in fullscreen mode (F11)
  2. Add new tab.
  3. Close the newly created tab

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

phougt avatar Jan 10 '24 08:01 phougt

I can reproduce this issue as well. But oddly enough, it doesn't reproduce when I enable debugging in Visual Studio.

hishitetsu avatar Jan 10 '24 13:01 hishitetsu

Thank you for the report

yaira2 avatar Jan 10 '24 15:01 yaira2

It appears to be caused by PR #14342 .

el-ev avatar Jan 28 '24 11:01 el-ev

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)

el-ev avatar Jul 06 '24 06:07 el-ev

I can still repro this in v3.6

yaira2 avatar Aug 22 '24 01:08 yaira2

@phougt @el-ev Is this still an issue in the preview version? https://files.community/download/preview

yaira2 avatar Apr 09 '25 20:04 yaira2

I couldn't reproduce it anymore.

App version: 3.9.3.0 Windows version: 10.0.26120.0

phougt avatar Apr 10 '25 00:04 phougt