You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Explain the bug
If an external drive was inserted and opened by Files, seems like Files will cache the folder content of the drive.
However if ANOTHER external drive was then inserted after the current drive was removed, Windows might assign the same drive letter to it.
At this moment if trying to open newly-inserted external drive using Files, there might be 2 possible behavior:
1.Files crash and exit
2.Newly inserted drive's root content will messed up with the former drive's root content.
To reproduce
Insert any one of the external mass storage drive (i.e. Portable HDD or USB flash disk) and open it with Files.
Close Files, note down the drive letter of external disk and eject it.
Insert different external mass storage drive with DIFFERENT content inside, and make sure it's getting the same drive letter as the former removed one.
Open Files, select the external drive and see the error.
Expected behavior
Files should show the newly-inserted drive root content.
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe
at __Interop.ForwardComStubs.Stub_3[TThis, TResult](__ComObject, Int32) + 0x37
at Windows.ApplicationModel.Core.CoreApplicationView.get_DispatcherQueue() + 0x18
at Files.ViewModels.ItemViewModel.<>c__DisplayClass101_0.<b__0>d.MoveNext() + 0xf51
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
at Files.ViewModels.ItemViewModel.d__101.MoveNext() + 0xed
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
at Files.Views.LayoutModes.GenericFileBrowser.<AllView_LoadingRow>d__41.MoveNext() + 0x118
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__7_0(Object) + 0x1e
at System.Action1.Invoke(T) + 0x28 at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33 at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8 at __Interop.ForwardComStubs.Stub_19[TThis](__ComObject, Int32) + 0x24 at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x3d --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x75 at System.EventHandler1.Invoke(Object, TEventArgs) + 0x2e
at __Interop.Intrinsics.HasThisCall__24[TArg0](Object, IntPtr, Object, TArg0) + 0x36
at Files!+0x158f900
Explain the bug
If an external drive was inserted and opened by Files, seems like Files will cache the folder content of the drive.
However if ANOTHER external drive was then inserted after the current drive was removed, Windows might assign the same drive letter to it.
At this moment if trying to open newly-inserted external drive using Files, there might be 2 possible behavior:
1.Files crash and exit
2.Newly inserted drive's root content will messed up with the former drive's root content.
To reproduce
Expected behavior
Files should show the newly-inserted drive root content.
Logfile
===debug.txt===
2021-05-17 08:30:17.2983|ERROR|.ctor|元素找不到。
元素找不到。
|System.Exception: 元素找不到。
元素找不到。
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32, Void*) + 0xbe
at __Interop.ForwardComStubs.Stub_3[TThis, TResult](__ComObject, Int32) + 0x37
at Windows.ApplicationModel.Core.CoreApplicationView.get_DispatcherQueue() + 0x18
at Files.ViewModels.ItemViewModel.<>c__DisplayClass101_0.<b__0>d.MoveNext() + 0xf51
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
at Files.ViewModels.ItemViewModel.d__101.MoveNext() + 0xed
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38
at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17
at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb
at Files.Views.LayoutModes.GenericFileBrowser.<AllView_LoadingRow>d__41.MoveNext() + 0x118
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21
at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__7_0(Object) + 0x1e
at System.Action
1.Invoke(T) + 0x28 at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33 at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8 at __Interop.ForwardComStubs.Stub_19[TThis](__ComObject, Int32) + 0x24 at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x3d --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at Microsoft.AppCenter.Utils.ApplicationLifecycleHelper.<.ctor>b__17_1(Object, UnhandledErrorDetectedEventArgs) + 0x75 at System.EventHandler
1.Invoke(Object, TEventArgs) + 0x2eat __Interop.Intrinsics.HasThisCall__24[TArg0](Object, IntPtr, Object, TArg0) + 0x36
at Files!+0x158f900
===End debug.txt===
===debug_fulltrust.txt===
021-05-17 08:30:12.1684|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)
於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path)
於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize)
於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.<StartSTATask>b__0() 2021-05-17 08:30:12.1684|INFO|FilesFullTrust.Program|Argument: GetIconOverlay| 2021-05-17 08:30:12.1904|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002) 於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path) 於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize) 於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.b__0()2021-05-17 08:30:12.1904|INFO|FilesFullTrust.Program|Argument: GetIconOverlay|
2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Program|Argument: GetIconOverlay|
2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)
於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path)
於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize)
於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.<StartSTATask>b__0() 2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Program|Argument: GetIconOverlay| 2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002) 於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path) 於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize) 於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.b__0()2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Program|Argument: GetIconOverlay|
2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)
於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path)
於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize)
於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.<StartSTATask>b__0() 2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Program|Argument: GetIconOverlay| 2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002) 於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path) 於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize) 於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.b__0()2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Program|Argument: GetIconOverlay|
2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)
於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path)
於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize)
於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.<StartSTATask>b__0() 2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Program|Argument: GetIconOverlay| 2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002) 於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path) 於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize) 於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.b__0()2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Program|Argument: GetIconOverlay|
2021-05-17 08:30:12.2153|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)
於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path)
於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize)
於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.<StartSTATask>b__0() 2021-05-17 08:30:12.2422|INFO|FilesFullTrust.Program|Argument: GetIconOverlay| 2021-05-17 08:30:12.2422|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002) 於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path) 於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize) 於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.b__0()2021-05-17 08:30:12.2512|INFO|FilesFullTrust.Program|Argument: GetIconOverlay|
2021-05-17 08:30:12.2512|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)
於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path)
於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize)
於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.<StartSTATask>b__0() 2021-05-17 08:30:12.2512|INFO|FilesFullTrust.Program|Argument: GetIconOverlay| 2021-05-17 08:30:12.2612|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002) 於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path) 於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize) 於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.b__0()2021-05-17 08:30:12.2612|INFO|FilesFullTrust.Program|Argument: GetIconOverlay|
2021-05-17 08:30:12.2612|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)
於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path)
於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize)
於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.<StartSTATask>b__0() 2021-05-17 08:30:12.2612|INFO|FilesFullTrust.Program|Argument: GetIconOverlay| 2021-05-17 08:30:12.2771|INFO|FilesFullTrust.Win32API|系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002)|System.IO.FileNotFoundException: 系統找不到指定的檔案。 (發生例外狀況於 HRESULT: 0x80070002) 於 Vanara.PInvoke.Shell32.ShellUtil.GetShellItemForPath(String path) 於 FilesFullTrust.Win32API.GetFileIconAndOverlay(String path, Int32 thumbnailSize) 於 FilesFullTrust.Win32API.<>c__DisplayClass0_0
1.b__0()===End debug_fulltrust.txt===
Screenshots
Since Files exited unexpectly, no screenshots were able to provided.
System Information
Additional comment
Since I'm using this app under Traditional Chinese environment, here's a brief translation of some of the strings in the log:
元素找不到=Element not found
系統找不到指定的檔案=File not found
於=at
發生例外狀況於=Expection happened at
The text was updated successfully, but these errors were encountered: