libretro / libretro-uae

PUAE libretro
GNU General Public License v2.0
111 stars 60 forks source link

Whdload .lha Files mode crashes first run on Nvidia Shield (Android 12, arm 32 bit) #513

Open veganvelociraptor opened 2 years ago

veganvelociraptor commented 2 years ago

Attempting to open a whdload .lha game when using Files mode on my Nvidia Shield, results in a CLI prompt being shown instead of the game actually loading.

The games work when switching to HDF mode instead. As the bug is not present on my x64 linux distro, I'm guessing this is specific to either the Nvidia Shield, Android 12 and/or the Android build of this core.

(using the latest nightly armeabi-v7a build of Retroarch and the PUAE core)

sonninnos commented 2 years ago

Huh, that is what libretro VFS was supposed to solve..

Please show the debug level verbose log of the core trying to create the WHDLoad helper image directory. Delete the old remnants first if there are any, and please also show what the saves/WHDLoad tree looks like.

veganvelociraptor commented 2 years ago

Thank you! I don't think I've felt this much newbie embarrassment, nor had an issue solved this quickly and easily. I didn't know and should had checked whether Whdload uses any files and delete them.

After deleted everything named WHD* in the system and saves directory, Retroarch crashed after the first attempt to load an .lha game. I am guessing it happened when the core re-created the Whdload files?

Regardless, it now works when starting Retroarch a second time. Tried a couple of them, and they all seem to work now.

Closing this one as solved.

sonninnos commented 2 years ago

Better than nothing sure, but it should not crash at the first run.. Which means I'm still interested in the debug verbose log when that happens.

veganvelociraptor commented 2 years ago

I hope this helps:

[Content]: Content loading skipped. Implementation will load it on its own. No model specified in: 'Bill's Tomato Game.lha' Model: 'A1200' Kickstart: 'kick40068.A1200' WHDLoad.prefs '/storage/emulated/0/RetroArch/system/WHDLoad.prefs' not found, attempting to create.. WHDLoad image directory '/storage/emulated/0/RetroArch/saves/WHDLoad' not found, attempting to create.. Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/C/ Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/Assign Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/ClickNot Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/Copy Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/Delete Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/Dir Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/Execute Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/IconX Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/JoyPad Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/List Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/MakeDir Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/MEmacs Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/MemClear Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/MultiView Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/Rename Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/RequestChoice Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/RequestFile Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/RequestString Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/Type Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/WBRun Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/WHDLoad Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/C/xfdDecrunch Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/ Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/ Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick33180.A500.RTB Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick34005.A500.RTB Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick40063.A600.RTB Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick40068.A1200.RTB Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick40068.A4000.RTB Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Monitors/ Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Monitors/NTSC Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Monitors/PAL Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Devs/system-configuration Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/L/ Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/ Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/asl.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/commodities.library Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/ Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkCBR0.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkDLTA.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkDUKE.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkFAST.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkFRLE.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkHFMN.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkHUFF.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkIMPL.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkMASH.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkNONE.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkNUKE.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkRAKE.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkRLEN.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkSHRI.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkSMPL.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/compressors/xpkSQSH.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/lowlevel.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/mathieeedoubbas.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/parm.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/reqtools.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/xfdmaster.library Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/Libs/xpkmaster.library Mkdir: /storage/emulated/0/RetroArch/saves/WHDLoad/S/ Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/KSCopy Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/MkCustom Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/Startup-Sequence Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/WBSelect Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/WHDLoad-Cleanup Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/WHDLoad-Startup Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/WHDLoad.prefs Unzip: /storage/emulated/0/RetroArch/saves/WHDLoad/S/WHDLoad.prefs.default WHDLoad found and installed 'kick33180.A500' to '/storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick33180.A500' WHDLoad found and installed 'kick34005.A500' to '/storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick34005.A500' WHDLoad found and installed 'kick40063.A600' to '/storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick40063.A600' WHDLoad found and installed 'kick40068.A1200' to '/storage/emulated/0/RetroArch/saves/WHDLoad/Devs/Kickstarts/kick40068.A1200' Pause: 0x475207d0

sonninnos commented 2 years ago

Thanks, but unfortunately it only shows that everything went fine..

The next step after that is copying WHDLoad.key and refreshing WHDLoad.prefs.

Please try to delete only WHDLoad.prefs and see if it happens there.

Also after the first crash, does it crash again if you change the "WHDLoad Splash Screen" core option? Is there WHDLoad.prefs_new and WHDLoad.prefs_backup after the crash and if so, what are the contents compared to WHDLoad.prefs?

And please change the title since it does not represent what is happening here.

veganvelociraptor commented 2 years ago

The next step after that is copying WHDLoad.key

I don't have one. As I understand, it's been removed for some timed now.

Please try to delete only WHDLoad.prefs and see if it happens there.

Crash on first run. Not on subsequent runs. The contents of the two prefs files are identical except for SplashDelay=200 in the newly created file (it's not present in WHDLoad.prefs_backup)

Also after the first crash, does it crash again if you change the "WHDLoad Splash Screen" core option?

There's no change in behaviour regardless what I set the Splash Screen option to, neither if I change on the first run nor after the first crash. SplashDelay=200 isn't added to WHDLoad.prefs if turn the Splash Screen off, but no change in behaviour.

sonninnos commented 2 years ago

Thanks. I guess that narrows it down enough that it is related to the prefs file. Shame that I can't replicate it no matter what. I can at least try adding logging to the related stages.

Deleting only the Kickstart files that are shown at the end of the crash log should cause nothing then at the next run?

veganvelociraptor commented 2 years ago

Thanks. I guess that narrows it down enough that it is related to the prefs file. Shame that I can't replicate it no matter what. I can at least try adding logging to the related stages.

Since I myself cannot reproduce it on x64 linux, are you certain this is a bug in the core and not something externally (Retroarch, Android, Android 12, the Nvidia Shield) casuing it?

Deleting only the Kickstart files that are shown at the end of the crash log should cause nothing then at the next run?

I'll try that one out.

sonninnos commented 2 years ago

That is what I'm wanting to find out. I pushed some cleanups that will also show more logging, so please post the crash log after deleting prefs once the version is available.

veganvelociraptor commented 2 years ago

Will do as soon as I'm back. I'm going away for a week.

(never mind my previous lenghty post, the error with Whdload on my x64 linux system seems unrelated and I need to do some more trouble shooting before I can confirm it's not due to a compilation error)

veganvelociraptor commented 2 years ago

Sorry for the late update. I've been trying the same thing again with two more recent firmware updates to the nVidia shield that were released. But there's no difference in the output in the error logs compared to by earlier logdump. Hence I'm almost certain this is due to something crashing due to Android. Unfortunately I'm not proficient enough in using adb to know where to start if I would want to see the Android log files.

i30817 commented 1 year ago

You could try again @veganvelociraptor , there was a VFS fix right now.

sonninnos commented 1 year ago

Also pretty sure it is not Android (12) related since everything works fine with my phone.

veganvelociraptor commented 1 year ago

Yep, it's certainly specific to the Nvidia Shield, or possibly the Android TV variant of Android. I don't have these issues on my phone either.

What's strange is that I only have crash issues with two cores: UAE and VICE.

sonninnos commented 1 year ago

Hmm, VICE does not extract anything on any run like PUAE does on first WHDLoad LHA run..

The cores do share a lot of similar libretro-side code, since maintaining them is more sane that way. So what the heck is the common denominator with the cores then..?

I'd like to see a crashing debug log from VICE too.

veganvelociraptor commented 1 year ago

Hmm, VICE does not extract anything on any run like PUAE does on first WHDLoad LHA run..

The cores do share a lot of similar libretro-side code, since maintaining them is more sane that way. So what the heck is the common denominator with the cores then..?

I'd like to see a crashing debug log from VICE too.

I finally learned how to use adb debug to get a log of the crashes. Give me the upcoming weekend to try to post something usable. I'll also try and see if Lakka on a Raspberry Pi crashes, just to exclude that it's the ARM CPU being the cause. A pity there is no NVidia Shield or Android TV Emulator (AFAIK?).