Skip to content

TeaVMOptimizationLevel.ADVANCED and AssetManager.finishLoading() break release build #265

Description

@Hyperion2400

I have encountered a problem with the newest gdx-liftoff version 1.14.2 and Java 21. I'm not sure where the problem lies.

If the following conditions are met

  • TeaCompiler optimization level is either TeaVMOptimizationLevel.ADVANCED or TeaVMOptimizationLevel.FULL
  • AssetManager's finishLoading() is called

I get the following errors in the browser when loading the TeaVM build:

Uncaught ReferenceError: BSr is not defined
    at app.js:3137:398
    at app.js:2:228
    at app.js:2:274
Uncaught (in promise) ReferenceError: main is not defined
    at start ((index):28:17)

The LibGDX loading screen doesn't even appear. Everything works fine when using TeaVMOptimizationLevel.SIMPLE.

I have created a minimal reproducible example: https://github.com/Hyperion2400/TeaVMBug

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions