question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bug: App crashes when opening two folders at the same time

See original GitHub issue

Description

Occurs whenever I try to open two folders at almost the same time using a script (AHK) or Run. The app would sometimes immediately crash after the notification.

I’m planning to create a script where it opens specific folders when a shortcut key is triggered but I’m encountering these two errors: 0x800706BA & 0x800706BE

The lowest delay I could set before executing the 2nd folder was 1.5 seconds.

Steps To Reproduce

  1. Set Files as default file manager
  2. Open the Run dialog (Win+R)
  3. Type in C:\ and press enter
  4. Quickly open the run dialog box and press enter again
  5. See that the second path isn’t opened in Files

Steps to fix

  • Fix the crash and open the second path as expected

Files Version

2.3.56.0

Windows Version

10.22623.875

Relevant Assets/Logs

  1. The RPC server is unavailable
2022-11-01 07:38:04.8938|ERROR|AppUnhandledException|A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The RPC server is unavailable. (0x800706BA))
	System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The RPC server is unavailable. (0x800706BA))
 ---> System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (0x800706BA)
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)
   at ABI.Microsoft.Windows.AppLifecycle.IAppActivationArgumentsMethods.get_Data(IObjectReference _obj)
   at Files.App.MainWindow.InitializeApplication(AppActivationArguments activatedEventArgs)
   at CommunityToolkit.WinUI.DispatcherQueueExtensions.<>c__DisplayClass2_0.<<EnqueueAsync>b__1>d.MoveNext()
   --- End of inner exception stack trace ---

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
verdaderokencommented, Nov 27, 2022

Could you check if this issue is fixed in Files v2.3.62? #10575 might have helped.

using v2.3.63, the RPC thing is now gone and I can now run paths from a command line. However, sometimes I encounter these two errors:

2022-11-28 00:28:03.0926|ERROR|AppUnhandledException|The operation identifier is not valid. (0x800710DD)
	System.Runtime.InteropServices.COMException (0x800710DD): The operation identifier is not valid. (0x800710DD)
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)
   at ABI.Microsoft.UI.Xaml.IWindowMethods.get_Content(IObjectReference _obj)
   at Files.App.Views.ModernShellPage.SetLoadingIndicatorForTabs(Boolean isLoading)
   at Files.App.Views.ModernShellPage.FilesystemViewModel_ItemLoadStatusChanged(Object sender, ItemLoadStatusChangedEventArgs e)
   at Files.App.ViewModels.ItemViewModel.RapidAddItemsToCollectionAsync(String path, String previousDir, Action postLoadCallback)
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_0(Object state)
   at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.<Post>b__0()
--- End of stack trace from previous location ---
   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|20_0(Int32 hr)
   at ABI.Windows.ApplicationModel.Core.IUnhandledErrorMethods.Propagate(IObjectReference _obj)
   at Microsoft.AppCenter.Utils.ApplicationLifecycleHelperWinUI.<.ctor>b__0_3(Object sender, UnhandledErrorDetectedEventArgs eventArgs)
--- End of stack trace from previous location ---
   at Microsoft.AppCenter.Utils.ApplicationLifecycleHelperWinUI.<.ctor>b__0_3(Object sender, UnhandledErrorDetectedEventArgs eventArgs)
   at ABI.System.EventHandler`1.Do_Abi_Invoke[TAbi](Void* thisPtr, IntPtr sender, TAbi args)

and this one

2022-11-28 00:24:45.2935|ERROR|AppUnhandledException|A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The process cannot access the file because it is being used by another process. (0x80070020))
  System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. (The process cannot access the file because it is being used by another process. (0x80070020))
---> System.IO.FileLoadException: The process cannot access the file because it is being used by another process. (0x80070020)
 at Files.App.Helpers.UniversalLogWriter.InitializeAsync(String name)
 at Files.App.App.<>c.<<OnLaunched>b__84_0>d.MoveNext()
 --- End of inner exception stack trace ---

Both errors will not crash the app and only some of the folders are opened. My current workaround is to just add a delay before executing the subsequent folders.

0reactions
gave92commented, Nov 27, 2022

Coudl you check if this issue is fixed in Files v2.3.62? #10575 might have helped.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[BUG] App Crashes When Root Directories With Too Many ...
I am trying to open directory, but it shows "No directory selected" on the side tab. OS: Window 10 Zettlr version: 1.4.1.
Read more >
Win 10 starts crashing when I open multiple programs
7. Click on the Startup Tab and click open task manager. This will open another window which contains all your startup applications on...
Read more >
[SOLVED] Windows File Explorer Keeps Crashing on ...
Type control folders and press Enter to open the File Explorer Options ... press the Windows logo key and E at the same...
Read more >
Windows Explorer crashes when opening folder with a ...
It appears the folder view is the problem. Change the view for that folder and its sub folders. The folder does not crash...
Read more >
Windows 10 Explorer Keeps Crashing? Here Are 10 ...
Here is a quick guide: Step 1: Open File Explorer Options and then go to the View tab.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found