xpenatan/gdx-teavm

Random.UInt & TypeError: b.$array0 is undefined

Its-Kenta opened this issue · 3 comments

Hello.

I initially used gdx-teavm without Gradle and generated the .js using your generator tool which worked wonders. Right now I'm trying to use the Gradle integration (created project with gdx-liftoff) and I'm facing few problems right now.

One of them is that for whatever reason Gradle TeaVM refuses to compile when using Random UInt generator (using your generator to transpile to JS worked fine). Errors here:
https://pastefy.ga/71byadJi

Changing it to Int worked and removed the errors, however. I'm still plagued with an error of:

com.badlogic.gdx.utils.GdxRuntimeException app.js:25:449
Caused by: java.lang.RuntimeException: (JavaScript) TypeError: b.$array0 is undefined app.js:25:449
Uncaught Error: Java exception thrown

The whole code that I'm trying to build to web is here https://github.com/Its-Kenta/PongKt/tree/test
The old code that I've used to generate .js with your tool is here https://github.com/Its-Kenta/PongKt/tree/main and is also live on itch page which proves that it worked previously and when generated with the tool (albeit that was a while ago)

post here ACCEPTED CLASSPATH from gradle and the generator

I tried to run the Generator but I'm getting error:
Inconsistency detected by ld.so: dl-lookup.c: 107: check_match: Assertion `version->filename == NULL || ! _dl_name_match_p (version->filename, map)' failed!

Removed UInt from the code and re-worked my Asset Manager seemed to fix it. Which again, makes no sense why it happened when I've generated the old code with the generator tool.

I'm happy for this to be closed.