besteon / Ironmon-Tracker

A Lua script for the Bizhawk/mGBA emulator compatible with Pokemon Fire Red, Leaf Green, Ruby, Sapphire, and Emerald that tracks relevant data for the IronMon challenge.
MIT License
121 stars 44 forks source link

[Bug]: JNI error when using New Runs ROM generation #449

Open FlitPix opened 3 months ago

FlitPix commented 3 months ago

Describe the bug

When setting up the New Runs feature with ROM generation, pressing the button combination immediately throws a JNI error instead of generating and loading a new randomized ROM.

Steps to Reproduce

  1. Set up New Runs with the "Generate ROM each time" option. Any ROM and any settings file will have the same result.
  2. The error is thrown and generates RandomizerErrorLog.txt.

What tracker version are you using?

v8.5.0

What operating system are you using?

Arch Linux, 6.8.1-arch1-1

What emulator(s) are you seeing the problem on?

Bizhawk 2.9

Relevant log output

> ERROR: For more information, open the "RandomizerErrorLog.txt" found in your Tracker folder.
> ~~~ The Randomizer program failed to generate a ROM ~~~
> Unable to load next ROM; couldn't create one.

Additional Information

RandomizerErrorLog.txt

I installed Bizhawk 2.9.1 from the AUR. I use UPR ZX 4.6.0. I tested with vanilla Emerald and Faster Emerald, and with RSE Standard.rnqs and RSE Survival.rnqs.

My guess is this is something to do with my installed version of openjdk, and I should use an older version. Though, I was also never asked to select a directory in which the ROMs are created, so it could also maybe be a file permission error.

Fellshadow commented 3 months ago

We had a similar error report from another arch linux user using OpenJDK in the ironmon discord (this post), unfortunately there wasn't a solution found for them but maybe some ideas of what to try might come from reading through there.

I'm not familiar enough with arch linux or using openJDK to know how to help here but from what I can tell the error is relating to native libraries / a conflict in library names (according to the discord thread)?

I'm not sure whether using an older version would work or not, but the randomizer's requirements are just 64-bit java 8 so might be worth trying different java versions. If the bug is more on the randomization end than the java install end then it'd be a bug with UPR ZX rather than the tracker (the tracker just calls the randomizer via the command line).

In terms of ROM directory though, the user isn't asked to select a directory by the tracker as it just creates the randomized roms within the tracker folder (and overwrites it each time with each new seed generated as to not clutter things).

Does using the randomizer directly work? If so then if a solution isn't found for this issue then at the very least you could randomize a batch of seeds and instead use the other mode of the new run feature to load them.

Apologies that I couldn't help more, but hopefully some info here is useful, would also be worth looking around general errors for libnio.so: undefined symbol: reuseport_available with openJDK and seeing if anything similar that people have seen have ideas of what to try

FlitPix commented 3 months ago

Yes, I'm able to randomize ROMs using the GUI. I can do that in the meantime while I try to figure something out. This does clear it up at least, so thanks!