Andrewthe13th / Inventory_Kamera

Scans Genshin Impact characters, artifacts, and weapons from the game window into a JSON file.
MIT License
699 stars 122 forks source link

Application crashes without any information. #438

Closed ZoggersLOXIV closed 9 months ago

ZoggersLOXIV commented 1 year ago

Current Behavior

When i click "scan Genshin" after scanning ~4 weapons the app just closes.

Expected Behavior

The scanner continues to scan

Reproducing a Behavior

Open app, click "scan genshin".

Device OS

Windows 11

Genshin Impact Version

3.5

Inventory Kamera Version

1.3.8

Screen resolution, screen mode, and UI scale

3440x1440 screen, game 1920x1080 (for app), UI scale idk

Additional notes and remarks

I just installed the app and followed the instructions, it never actually worked for me yet.

Evidence

I noticed some errors in windows event viewer:

ERROR 1:

Application: InventoryKamera.exe
Architecture version: v4.0.30319
Description: the process was aborted due to an unhandled exception.
Exception information: System.ArgumentException
   in System.ThrowHelper.ThrowArgumentException(System.ExceptionResource)
   in System.Collections.Generic.Dictionary`2[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].Insert(System.__Canon, System.__Canon, Boolean)
   in InventoryKamera.Scraper.FindClosestCharacterName(System.String, Int32)
   in InventoryKamera.WeaponScraper.ScanEquippedCharacter(System.Drawing.Bitmap)
   in InventoryKamera.WeaponScraper+<>c__DisplayClass12_0.<CatalogueFromBitmapsAsync>b__3()
   in System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke()
   in System.Threading.Tasks.Task.Execute()
   in System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   in System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task)
   in InventoryKamera.WeaponScraper+<CatalogueFromBitmapsAsync>d__12.MoveNext()

Exception information: System.AggregateException
   in System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].GetResultCore(Boolean)
   in InventoryKamera.InventoryKamera.ImageProcessorWorker()
   in System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   in System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)
   in System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object)
   in System.Threading.ThreadHelper.ThreadStart()

ERROR 2:

Name of the application causing the error: InventoryKamera.exe, version: 1.3.8.0, time signature: 0xbdcc6e0d
The name of the module causing the error: KERNELBASE.dll, version: 10.0.22621.1194, time signature: 0xfaa44dd0
Exception code: 0xe0434352
Offset of error: 0x000000000009051c
ID of the process causing the error: 0x0x258C
The time of launch of the application causing the error: 0x0x1D9512A38CCCC52
Path of the application causing the error: C:\Things\Programidla\Inventory Kamera\InventoryKamera.exe
Path of the module causing the error: C:\Windows\System32\KERNELBASE.dll
Report ID: 659bd391-01b9-47af-bc6f-2042d59419f8
The full name of the package causing the error: 
The application ID relative to the package causing the error: 

Preflight Checklist

MikaMk4 commented 1 year ago

ok i looked at this because i had the same issue and it seems to have to do with the traveler having the same name as one of the playable characters (for me it was mika). in the method 'FindClosestCharacterName' in in the 'Scraper' class it tries to add an element to a dictionary with the same key. it first adds the traveler and then the character with the same name which is used as the key therefore throwing an unhandled exception. changing the traveler's name to be a unique name should be a temporary fix.

Cupcak3 commented 1 year ago

Naming your traveler/wanderer as an existing character is not supported unfortunately. I believe functionality has been added to not crash, but being able to tell which is which is not necessarily guaranteed to work correctly

Cupcak3 commented 9 months ago

Closed in favor of #433