Bug: Applying a tag to a folder will cause Files to crash
See original GitHub issueDescription
Adding tags to folders causes the app to crash
Steps To Reproduce
- select a file.
- right click
- add a new tag
- observe that the app crashes
Steps to fix
- Fix the crash
Files Version
2.3.11.0
Windows Version
10.0.22000.1042
Relevant Assets/Logs
2022-09-23 23:55:09.2408|ERROR|AppUnhandledException|Index key must be less than 512 bytes.
LiteDB.LiteException: Index key must be less than 512 bytes.
at LiteDB.IndexService.AddNode(CollectionIndex, BsonValue, Byte, IndexNode) + 0x597
at LiteDB.IndexService.AddNode(CollectionIndex, BsonValue, IndexNode) + 0x97
at LiteDB.LiteEngine.<>c__DisplayClass17_0.<EnsureIndex>b__0(CollectionPage) + 0x286
at LiteDB.LiteEngine.Transaction[T](String, Boolean, Func`2) + 0xe9
at LiteDB.LiteEngine.EnsureIndex(String, String, String, Boolean) + 0x13c
at LiteDB.LiteCollection`1.EnsureIndex(String, String, Boolean) + 0x47
at LiteDB.LiteCollection`1.EnsureIndex[K](Expression`1, String, Boolean) + 0x72
at Common.FileTagsDb.SetTags(String, Nullable`1, String[]) + 0x2be
at Files.Uwp.Filesystem.ListedItem.set_FileTags(String[]) + 0x227
at Files.Uwp.UserControls.Menus.FileTagsContextMenu.AddFileTag(IEnumerable`1, FileTagViewModel) + 0x1da
at Files.Uwp.UserControls.Menus.FileTagsContextMenu.TagItem_Click(Object, RoutedEventArgs) + 0x6b
at Microsoft.Toolkit.Uwp.UI.Controls.InAppNotificationOpeningEventHandler.Invoke(Object, InAppNotificationOpeningEventArgs) + 0x2e
at __Interop.Intrinsics.HasThisCall__22[TArg0](Object, IntPtr, Object, TArg0) + 0x36
at Files!<BaseAddress>+0x1454480
at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21
at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xb8
at __Interop.ForwardComStubs.Stub_10[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) + 0x2e
at __Interop.Intrinsics.HasThisCall__22[TArg0](Object, IntPtr, Object, TArg0) + 0x36
at Files!<BaseAddress>+0x1454480
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top Results From Across the Web
MP3Tag crashes when picking "Extended Tags... ...
The application is crashing when trying to view the Extended Tags window with some WavPack files, those same WV files have been previously ......
Read more >Windows crashes on very large video folders
When it crashes: Its just actually accessing the drive at all. So just opening a folder, the drive itself or any file will...
Read more >Windows Explorer Crashes - File Tagging, Document ...
I was using Tabbles and windows explorer started crashing (opening and then closing but ONLY on views where I had included the “Tags”...
Read more >Adding tag or deleting tag in "unknown" folder causes crash.
Bug 324774 - Adding tag or deleting tag in "unknown" folder causes crash. Summary: Adding tag or deleting tag in "unknown" folder causes...
Read more >Explorer.exe Crashing (EventID 1000, Several Faulting ...
It seems the issue resulted from some sort of error in adding an item to this recent list; hence why the crash occurs...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can export your settings including the tags in Files settings > about > import/export settings. Don’t believe there is a way to download older versions.
Cannot reproduce on the Dev version nor Preview version of 2.3.57.