Skip to content
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

Bug: Calculate folder size sometimes crashes app #11006

Closed
timowers opened this issue Jan 14, 2023 · 2 comments · Fixed by #11012
Closed

Bug: Calculate folder size sometimes crashes app #11006

timowers opened this issue Jan 14, 2023 · 2 comments · Fixed by #11012

Comments

@timowers
Copy link

Description

Turning 'Calculate folder size' on the very first time caused an error dialog, but is unrepeatable.

Steps To Reproduce

Open Settings.
Folders tab.
Calculate folder sizes - turn on and error dialog popped up.
Close program. Repeat. No error is generated.

Steps to fix

The error, not crash, that happened seems to have been a one time only event. The only exception in the log does not appear to be associated with this error.

2023-01-14 13:58:50.3425|ERROR|AppUnhandledException|An item with the same key has already been added. Key: C:
System.ArgumentException: An item with the same key has already been added. Key: C:
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at Files.Backend.Services.SizeProvider.DrivesSizeProvider.CreateProvider(String driveName)
at Files.Backend.Services.SizeProvider.DrivesSizeProvider.UpdateAsync(String path, CancellationToken cancellationToken)
at Files.App.Filesystem.StorageEnumerators.Win32StorageEnumerator.ListEntries(String path, IntPtr hFile, WIN32_FIND_DATA findData, CancellationToken cancellationToken, Int32 countLimit, Func2 intermediateAction, Dictionary2 defaultIconPairs)
at Files.App.ViewModels.ItemViewModel.<>c__DisplayClass149_1.<b__4>d.MoveNext()
--- End of stack trace from previous location ---
at Files.App.ViewModels.ItemViewModel.EnumerateItemsFromStandardFolderAsync(String path, CancellationToken cancellationToken, LibraryItem library)
at Files.App.ViewModels.ItemViewModel.RapidAddItemsToCollection(String path, LibraryItem library)
at Files.App.ViewModels.ItemViewModel.RapidAddItemsToCollectionAsync(String path, String previousDir, Action postLoadCallback)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.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)
2023-01-14 13:58:56.7332|INFO|OnLaunched|App launched. Launch args type: ToastNotificationActivatedEventArgs

Files Version

Version: 2.4.21.0 OS Version: 10.0.19045.2486

Windows Version

Windows 10 Home 22H2

Relevant Assets/Logs

2023-01-14 13:49:36.7516|INFO|OnLaunched|App launched. Launch args type: LaunchActivatedEventArgs
2023-01-14 13:49:48.7137|INFO|GetDrivesAsync|Drive added: C:, Fixed
2023-01-14 13:49:49.0548|INFO|GetDrivesAsync|Drive added: D:, Removable
2023-01-14 13:49:49.1454|INFO|GetDrivesAsync|Drive added: E:, CDRom
2023-01-14 13:49:49.3773|INFO|GetDrivesAsync|Drive added: S:, Fixed
2023-01-14 13:49:49.4395|INFO|Watcher_Added|Drive added: \?\xxxx's A53, Removable
2023-01-14 13:49:49.5532|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive ([email protected]))" mapped to C:\Users\xxxx\Google Drive ([email protected])
2023-01-14 13:49:58.3546|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive)" mapped to C:\Users\xxxx\Google Drive
2023-01-14 13:50:02.7324|INFO|CheckForUpdates|SIDELOAD: Checking for updates...
2023-01-14 13:50:03.4436|INFO|CheckForUpdates|SIDELOAD: Current Package Name: Files
2023-01-14 13:50:03.5399|INFO|CheckForUpdates|SIDELOAD: Remote Package Name: Files
2023-01-14 13:50:03.5953|INFO|CheckForUpdates|SIDELOAD: Current Version: 2.4.21.0
2023-01-14 13:50:03.6614|INFO|CheckForUpdates|SIDELOAD: Remote Version: 2.4.21.0
2023-01-14 13:50:03.7288|WARN|CheckForUpdates|SIDELOAD: Update not found.
2023-01-14 13:50:26.3727|INFO|OnLaunched|App launched. Launch args type: LaunchActivatedEventArgs
2023-01-14 13:50:27.5762|INFO|GetDrivesAsync|Drive added: C:, Fixed
2023-01-14 13:50:27.8088|INFO|GetDrivesAsync|Drive added: D:, Removable
2023-01-14 13:50:27.9078|INFO|GetDrivesAsync|Drive added: E:, CDRom
2023-01-14 13:50:27.9765|INFO|GetDrivesAsync|Drive added: S:, Fixed
2023-01-14 13:50:28.0997|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive ([email protected]))" mapped to C:\Users\xxxx\Google Drive ([email protected])
2023-01-14 13:50:28.2107|INFO|Watcher_Added|Drive added: \?\xxxx's A53, Removable
2023-01-14 13:50:29.2929|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive)" mapped to C:\Users\xxxx\Google Drive
2023-01-14 13:50:30.9743|INFO|CheckForUpda
tes|SIDELOAD: Checking for updates...
2023-01-14 13:50:31.5980|INFO|CheckForUpdates|SIDELOAD: Current Package Name: Files
2023-01-14 13:50:31.7281|INFO|CheckForUpdates|SIDELOAD: Remote Package Name: Files
2023-01-14 13:50:31.7945|INFO|CheckForUpdates|SIDELOAD: Current Version: 2.4.21.0
2023-01-14 13:50:31.9049|INFO|CheckForUpdates|SIDELOAD: Remote Version: 2.4.21.0
2023-01-14 13:50:31.9826|WARN|CheckForUpdates|SIDELOAD: Update not found.
2023-01-14 13:51:37.3956|INFO|IsRunningOnArm|Running on ARM: False
2023-01-14 13:58:50.3425|ERROR|AppUnhandledException|An item with the same key has already been added. Key: C:
System.ArgumentException: An item with the same key has already been added. Key: C:
at System.Collections.Generic.Dictionary2.TryInsert(TKey key, TValue value, InsertionBehavior behavior) at System.Collections.Generic.Dictionary2.Add(TKey key, TValue value)
at Files.Backend.Services.SizeProvider.DrivesSizeProvider.CreateProvider(String driveName)
at Files.Backend.Services.SizeProvider.DrivesSizeProvider.UpdateAsync(String path, CancellationToken cancellationToken)
at Files.App.Filesystem.StorageEnumerators.Win32StorageEnumerator.ListEntries(String path, IntPtr hFile, WIN32_FIND_DATA findData, CancellationToken cancellationToken, Int32 countLimit, Func2 intermediateAction, Dictionary2 defaultIconPairs)
at Files.App.ViewModels.ItemViewModel.<>c__DisplayClass149_1.<b__4>d.MoveNext()
--- End of stack trace from previous location ---
at Files.App.ViewModels.ItemViewModel.EnumerateItemsFromStandardFolderAsync(String path, CancellationToken cancellationToken, LibraryItem library)
at Files.App.ViewModels.ItemViewModel.RapidAddItemsToCollection(String path, LibraryItem library)
at Files.App.ViewModels.ItemViewModel.RapidAddItemsToCollectionAsync(String path, String previousDir, Action postLoadCallback)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b__0()
--- End of stack trace from previous location ---
at WinRT.ExceptionHelpers.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)
2023-01-14 13:58:56.7332|INFO|OnLaunched|App launched. Launch args type: ToastNotificationActivatedEventArgs
2023-01-14 13:58:58.3668|INFO|GetDrivesAsync|Drive added: C:, Fixed
2023-01-14 13:58:58.5329|INFO|GetDrivesAsync|Drive added: D:, Removable
2023-01-14 13:58:58.6204|INFO|GetDrivesAsync|Drive added: E:, CDRom
2023-01-14 13:58:58.7445|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive ([email protected]))" mapped to C:\Users\xxxx\Google Drive ([email protected])
2023-01-14 13:58:58.9785|INFO|GetDrivesAsync|Drive added: S:, Fixed
2023-01-14 13:58:59.2238|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive)" mapped to C:\Users\xxxx\Google Drive
2023-01-14 13:58:59.3867|INFO|Watcher_Added|Drive added: \?\xxxx's A53, Removable
2023-01-14 13:59:01.0817|INFO|CheckForUpdates|SIDELOAD: Checking for updates...
2023-01-14 13:59:02.6598|INFO|CheckForUpdates|SIDELOAD: Current Package Name: Files
2023-01-14 13:59:03.0830|INFO|CheckForUpdates|SIDELOAD: Remote Package Name: Files
2023-01-14 13:59:03.6162|INFO|CheckForUpdates|SIDELOAD: Current Version: 2.4.21.0
2023-01-14 13:59:03.9138|INFO|CheckForUpdates|SIDELOAD: Remote Version: 2.4.21.0
2023-01-14 13:59:04.1890|WARN|CheckForUpdates|SIDELOAD: Update not found.
2023-01-14 14:05:31.8359|INFO|OnLaunched|App launched. Launch args type: LaunchActivatedEventArgs
2023-01-14 14:05:32.7074|INFO|GetDrivesAsync|Drive added: C:, Fixed
2023-01-14 14:05:32.8873|INFO|GetDrivesAsync|Drive added: D:, Removable
2023-01-14 14:05:32.9685|INFO|GetDrivesAsync|Drive added: E:, CDRom
2023-01-14 14:05:33.0129|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive ([email protected]))" mapped to C:\Users\xxxx\Google Drive ([email protected])
2023-01-14 14:05:33.1196|INFO|GetDrivesAsync|Drive added: S:, Fixed
2023-01-14 14:05:33.2620|INFO|Watcher_Added|Drive added: \?\xxxx's A53, Removable
2023-01-14 14:05:34.2463|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive)" mapped to C:\Users\xxxx\Google Drive
2023-01-14 14:05:35.9067|INFO|CheckForUpdates|SIDELOAD: Checking for updates...
2023-01-14 14:05:36.5762|INFO|CheckForUpdates|SIDELOAD: Current Package Name: Files
2023-01-14 14:05:36.7014|INFO|CheckForUpdates|SIDELOAD: Remote Package Name: Files
2023-01-14 14:05:36.7485|INFO|CheckForUpdates|SIDELOAD: Current Version: 2.4.21.0
2023-01-14 14:05:36.8256|INFO|CheckForUpdates|SIDELOAD: Remote Version: 2.4.21.0
2023-01-14 14:05:36.9005|WARN|CheckForUpdates|SIDELOAD: Update not found.
2023-01-14 14:06:20.6332|INFO|OnLaunched|App launched. Launch args type: LaunchActivatedEventArgs
2023-01-14 14:06:21.4808|INFO|GetDrivesAsync|Drive added: C:, Fixed
2023-01-14 14:06:21.6855|INFO|GetDrivesAsync|Drive added: D:, Removable
2023-01-14 14:06:21.7750|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive ([email protected]))" mapped to C:\Users\xxxx\Google Drive ([email protected])
2023-01-14 14:06:21.8194|INFO|GetDrivesAsync|Drive added: E:, CDRom
2023-01-14 14:06:21.8650|INFO|GetDrivesAsync|Drive added: S:, Fixed
2023-01-14 14:06:22.0569|INFO|Watcher_Added|Drive added: \?\xxxx's A53, Removable
2023-01-14 14:06:23.0601|INFO|UpdateDrivesAsync|Adding cloud provider "Google Drive (Google Drive)" mapped to C:\Users\xxxx\Google Drive
2023-01-14 14:06:24.6727|INFO|CheckForUpdates|SIDELOAD: Checking for updates...
2023-01-14 14:06:25.2066|INFO|CheckForUpdates|SIDELOAD: Current Package Name: Files
2023-01-14 14:06:25.2715|INFO|CheckForUpdates|SIDELOAD: Remote Package Name: Files
2023-01-14 14:06:25.3038|INFO|CheckForUpdates|SIDELOAD: Current Version: 2.4.21.0
2023-01-14 14:06:25.3277|INFO|CheckForUpdates|SIDELOAD: Remote Version: 2.4.21.0
2023-01-14 14:06:25.3700|WARN|CheckForUpdates|SIDELOAD: Update not found.
2023-01-14 14:15:01.6346|INFO|Watcher_Removed|Drive removed: \?\USB#VID_04E8&PID_6860&MS_COMP_MTP&SAMSUNG_Android#6&1d0ab0aa&0&0000#{6ac27878-a6fa-4155-ba85-f98f491d4f33}

@timowers timowers added the bug label Jan 14, 2023
@hecksmosis
Copy link
Contributor

What did the error say?

@timowers
Copy link
Author

Unfortunately I cannot remember the full error text other than the title which was something like 'An error has occurred ' and cannot find a log of the error. Other than the log file would it have been recorded elsewhere and which files could be deleted or reset in order to make program behave as if its a first time use scenario and possibly being able to recreate the error?

@Josh65-2201 Josh65-2201 moved this from 🆕 New to 🏗 In progress in Files task board Jan 15, 2023
@yaira2 yaira2 changed the title Calculate folder size Bug: Calculate folder size sometimes crashes app Jan 19, 2023
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in Files task board Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants