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: Applying a tag to a folder will cause Files to crash

See original GitHub issue

Description

Adding tags to folders causes the app to crash

Steps To Reproduce

  1. select a file.
  2. right click
  3. add a new tag
  4. 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

https://user-images.githubusercontent.com/81501083/192501517-f06ccae0-4551-4fc3-99ef-09aa8246cb55.mp4

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:closed
  • Created a year ago
  • Comments:7 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
Josh65-2201commented, Sep 23, 2022

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.

0reactions
QuaintMakocommented, Nov 2, 2022

Cannot reproduce on the Dev version nor Preview version of 2.3.57.

Read more comments on GitHub >

github_iconTop 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 >

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