hex007 / freej2me

A free J2ME emulator with libretro, awt and sdl2 frontends.
Other
469 stars 72 forks source link

Doom RPG / Doom 2 RPG / Wolfenstein RPG fail to boot #126

Closed medeirosT closed 2 years ago

medeirosT commented 2 years ago

I'm running this on an ARM64 platform (See 351Elec), and whenever I go passed the "EA" logos on Wolfenstein, I get this:

java.lang.Exception: Stack trace
    at java.base/java.lang.Thread.dumpStack(Thread.java:1383)
    at javax.microedition.lcdui.Alert.<init>(Alert.java:49)
    at App.Error(Unknown Source)
    at Resource.addRecordStore(Unknown Source)
    at Resource.saveRecord(Unknown Source)
    at Game.saveEmptyConfig(Unknown Source)
    at Game.removeState(Unknown Source)
    at Game.loadConfig(Unknown Source)
    at App.startup(Unknown Source)
    at Canvas.run(Unknown Source)
    at java.base/java.lang.Thread.run(Thread.java:829)

for doom rpg, this:

java.lang.Exception: Stack trace
    at java.base/java.lang.Thread.dumpStack(Thread.java:1383)
    at javax.microedition.lcdui.Alert.<init>(Alert.java:49)
    at DoomRPG.a(Unknown Source)
    at s.a(Unknown Source)
    at k.s(Unknown Source)
    at k.run(Unknown Source)
    at java.base/java.lang.Thread.run(Thread.java:829)
java.lang.Exception: Stack trace
    at java.base/java.lang.Thread.dumpStack(Thread.java:1383)
    at javax.microedition.lcdui.Alert.<init>(Alert.java:49)
    at DoomRPG.a(Unknown Source)
    at k.run(Unknown Source)
    at java.base/java.lang.Thread.run(Thread.java:829)

Tried sound off / on, tried multiple phone types (Nokia, siemens, etc..) nothing.

Here's my java environment: ~/jdk/bin # ./java -version openjdk version "11.0.11" 2021-04-20 LTS OpenJDK Runtime Environment Zulu11.48+21-CA (build 11.0.11+9-LTS) OpenJDK 64-Bit Server VM Zulu11.48+21-CA (build 11.0.11+9-LTS, mixed mode)

Retroarch says this is 1.10.0 - FreeJ2ME (1.0)

any ideas on how to fix this? D:

recompileorg commented 2 years ago

That's left over from something... It's been so long I can't remember what I was trying to fix. Just remove Thread.dumpStack(); from line 49 in javax/microedition/lcdui/Alert.java Though that shouldn't affect DoomRPG, Doom 2 RPG, or Wolfensetin RPG

Those are some of the first games I had working years ago.

You might want to consider using Oracle's JRE, it tends to have better performance than OpenJDK.

medeirosT commented 2 years ago

Found a fix. Seems like it may have been an issue with JAVA_HOME and/or pathing in general, running this:

JAVA_HOME='/storage/jdk/zulu11.48.21-ca-jdk11.0.11-linux_aarch64'
export JAVA_HOME
PATH="$JAVA_HOME/bin:$PATH"
export PATH
/usr/bin/retroarch -L /usr/lib/libretro/freej2me_libretro.so --config /storage/.config/retroarch/retroarch.cfg "/roms/j2me/DoomRPG.jar"

this works

medeirosT commented 2 years ago

Update : Seems this was an issue with Emulation Station attempting to run in PWD / instead of ~. That caused a failure to create files.