DSPaul / COMPASS

TTRPG resource manager, bringing all your books, maps, etc. in one place.
https://www.compassapp.info
GNU General Public License v3.0
80 stars 8 forks source link

Endless crash loop (due to incorrect file type?) #20

Closed ninjaturtwig closed 1 year ago

ninjaturtwig commented 1 year ago

Describe the bug I used the folder uploading feature to upload a folder containing some pdfs but it seems there was a desktop.ini file in there somewhere that I missed, even when going through the checkboxes. When I attempted to delete it in the application, there was a crash and attempting to reboot COMPASS immediately results in crashing as well. I included the crash log here.

Crash log all.log

DSPaul commented 1 year ago

From the logs, it looks like the save file is corrupted so that explains why it crashes on startup, it tries to load the saved data but cannot. So could you also send that corrupted CodexInfo.xml file so I can do some more digging? You can find it in %appdata%\COMPASS\Collections directory, probably in a default folder unless you already renamed the collection.

The ini file also does not appear to be the culprit. I think the initial crash might have something to do with the fact that you seem to have installed it on a separate drive which I never tested because my laptop only has one drive but I'll have to do some testing to be sure. I have access to a desktop with multiple drive during the weekends so I'll come back to this then.

Looked at it some more and the file corruption is caused by an illegal character somewhere and the only example I found online of this same issue was with a .ini file so it might be the culprit after all but I would need the CodexInfo.xml file to be sure, should be an easy fix though it that is indeed the problem.

DSPaul commented 1 year ago

I added a fallback mechanism where it will try to load another collection if it fails to load instead of crashing so you should be able to open and use the app again. I also added some check to remove illegal characters when saving to prevent this from happening again in the future so with the information I have now, I will consider this issue solved. It will be released in update 1.1, probably this weekend.

If you still want to send the 'CodexInfo.xml' I will see if I can recover your data. And if you wouldn't mind, send the .ini file as well so I can do some more testing and confirm that the issue is indeed solved.

ninjaturtwig commented 1 year ago

Sorry for the late response, here are those files. Thanks for your fast work! CodexInfo.txt (.txt because won't let me upload as xml) For whatever reason, even with hidden files visible I am not able to find the .ini file anywhere in the folder that was uploaded. Sorry about that!

DSPaul commented 1 year ago

That didn't contain a whole lot a of new info, it seems to be cut off both at the top and bottom which is a bit weird but going off of the crash log, I'm pretty confident this is fixed. I'll close this once the update is live, if it happens again after the update, feel free to reopen.

I also tried to recover as much as I could from your save file: CodexInfo.txt, just change the extension back to xml and replace it. Alternatively you can just delete the CodexInfo.xml file and launch COMPASS and it will generate a new blank one for you so you can start over from a clean slate.