Inventory_Kamera
Inventory_Kamera copied to clipboard
[BUG] Type initializer threw an exception
I get this error right after starting scan. Genshin window comes to foreground and then the apps changes from "Scanning" to "Scan aborted".
The full error log are as follows:
The type initializer for 'InventoryKamera.Scraper' threw an exception.
at InventoryKamera.Scraper.RestartEngines()
at InventoryKamera.InventoryKamera.GatherData(Boolean[] formats, Boolean[] checkbox) in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\InventoryKamera.cs:line 59
at InventoryKamera.Form1.<>c__DisplayClass21_0.<StartButton_Clicked>b__0() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\Form1.cs:line 207
You need to rebuild to project. I get this when I clone the repository.
I downloaded the .exe file from the releases page, do you think that building from source code could fix this for me?
No you don't need to download the source code. This issue is caused by the program missing files not an error in actual program itself. The zip file should have everything you need to run the program. Just make sure to keep the .exe in the same folder as the rest of the files and it should work.
Well the same issue if happening to me and i have every file i need to run the program in the file but it just does not want to start scanning it abortes immediately. I recently reinstalled my windows the scanner worked for me on the old windows but not anymore so maybe i dont have something dowloaded. btw i dowloaded all the microsoft visual stuff and it didnt help.
same goes for me, I redownloaded the apps and still not working.
Object reference not set to an instance of an object. at InventoryKamera.CharacterScraper.ScanCharacters() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\CharacterScraper.cs:line 23 at InventoryKamera.InventoryKamera.GatherData(Boolean[] formats, Boolean[] checkbox) in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\InventoryKamera.cs:line 94 at InventoryKamera.Form1.<>c__DisplayClass21_0.<StartButton_Clicked>b__0() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\Form1.cs:line 207
that's my error line while using it, and this is my screenshot about the contents of the .zip file.
and from what I saw on the error line, it starts with B:/ drive, mine starts from C:/.
same goes for me, I redownloaded the apps and still not working.
Object reference not set to an instance of an object. at InventoryKamera.CharacterScraper.ScanCharacters() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\CharacterScraper.cs:line 23 at InventoryKamera.InventoryKamera.GatherData(Boolean[] formats, Boolean[] checkbox) in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\InventoryKamera.cs:line 94 at InventoryKamera.Form1.<>c__DisplayClass21_0.<StartButton_Clicked>b__0() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\Form1.cs:line 207
that's my error line while using it, and this is my screenshot about the contents of the .zip file. and from what I saw on the error line, it starts with B:/ drive, mine starts from C:/.
Well i downloaded the Node.js the 16.13.1 LTS and install everything that it comes including Chocolatey and it works for me now. i think you have to have python and all visual studios installed on your pc for the program to work properly.
https://nodejs.org/en/
same goes for me, I redownloaded the apps and still not working. Object reference not set to an instance of an object. at InventoryKamera.CharacterScraper.ScanCharacters() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\CharacterScraper.cs:line 23 at InventoryKamera.InventoryKamera.GatherData(Boolean[] formats, Boolean[] checkbox) in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\InventoryKamera.cs:line 94 at InventoryKamera.Form1.<>c__DisplayClass21_0.<StartButton_Clicked>b__0() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\Form1.cs:line 207 that's my error line while using it, and this is my screenshot about the contents of the .zip file. and from what I saw on the error line, it starts with B:/ drive, mine starts from C:/.
Well i downloaded the Node.js the 16.13.1 LTS and install everything that it comes including Chocolatey and it works for me now. i think you have to have python and all visual studios installed on your pc for the program to work properly.
https://nodejs.org/en/
already did what you did, and still got the same error code (I think).
Object reference not set to an instance of an object. at InventoryKamera.CharacterScraper.ScanCharacters() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\CharacterScraper.cs:line 23 at InventoryKamera.InventoryKamera.GatherData(Boolean[] formats, Boolean[] checkbox) in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\InventoryKamera.cs:line 94 at InventoryKamera.Form1.<>c__DisplayClass21_0.<StartButton_Clicked>b__0() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\Form1.cs:line 207
Thank you all for your concern on this issue. I have found the problem and am working on a fix. The issue seemed to only happen if it somehow couldn't scan a character and it hadn't scanned at least 5 characters yet.
Hi there. Sorry for coming back to this issue after a long time. Please let us know if these issues have been fixed in recent releases or pre-releases so that we may close this issue. Thanks!
Can confirm I'm still getting this issue while using V1.2
The type initializer for 'InventoryKamera.Scraper' threw an exception.
at InventoryKamera.Scraper.RestartEngines()
at InventoryKamera.InventoryKamera.GatherData() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\InventoryKamera.cs:line 66
at InventoryKamera.Form1.<StartButton_Clicked>b__12_0() in B:\Projects\VisualStudio\InventoryKamera\InventoryKamera\InventoryKamera\Form1.cs:line 180
Is the issue gone in v1.2.1-prerelease?
Unfortunately, no. Same error, no lines. I do have the latest MS Visual C++ packages installed if that helps.
The type initializer for 'InventoryKamera.Scraper' threw an exception.
at InventoryKamera.Scraper.RestartEngines()
at InventoryKamera.InventoryKamera.GatherData()
at InventoryKamera.Form1.<StartButton_Clicked>b__12_0()
Nvm, I think I figured it out. I needed to install the x86 version of the MS Visual C++ package as well to get it working. I saw that adeptiscanner needed both so I gave it a try. That fixed it for me. Please indicate in the readme to install both the x64 and x86 version (even if you're on a x64 system). I finished a full scan successfully. Only problem now is that it failed to parse the mora count and some materials. One suggestion I'd like to see is a lvl filter for weapons/artifacts. Either ways, great job dev!
Thanks for the info it really helps. I never concerned myself with the install requirements since it worked out of the box for me. I think there is a way for us to package it more complete for releases. That would be all new to me but I can look into it. In the meantime I'll add that to the readme.
As for the mora and material scanning that's a work in progress.
I can also look into level filters. At first glance it might have to work after everything is scanned because the process to determine when to stop scanning is currently based on rarities since that's the way items are sorted by default and it's predictable. It wouldn't be easy use rarity and level to stop scans, but it's an easy enough thing to filter after everything is scanned.
The type initializer for 'InventoryKamera.Scraper' threw an exception. at InventoryKamera.Scraper.RestartEngines() at InventoryKamera.InventoryKamera.GatherData() at InventoryKamera.MainForm.<StartButton_Clicked>b__12_0()
i tried installing x86 (which i didnt have) and x64 (already had, reinstalled it) and it still doesnt work. the weird part is, I actually completed a successful scan with these exact same settings a few days ago, and now I can't get it to work.
I'm going to close this issue as it's grown stale. Feel free to reopen.