Skip to content

Conversation

@dkimitsa
Copy link
Contributor

org_robovm_rt_bro_Struct might be not initialized if class is not present (e.g. in pure console app), in this case org_robovm_rt_bro_Struct will be null and GC will recognize generic classes as Structs and apply wrong GC Mark method

code that initialise it:

    org_robovm_rt_bro_Struct = rvmFindClassUsingLoader(env, "org/robovm/rt/bro/Struct", NULL);
    if (!org_robovm_rt_bro_Struct) {
        // We don't need Struct if it hasn't been compiled in
        rvmExceptionClear(env);
    } else {
        org_robovm_rt_bro_Struct_handle = rvmGetInstanceField(env, org_robovm_rt_bro_Struct, "handle", "J");
        if (!org_robovm_rt_bro_Struct_handle) return FALSE;
    }

…build

`org_robovm_rt_bro_Struct` might be not initialized if class is not present (e.g. in pure console app), in this case org_robovm_rt_bro_Struct will be null and GC will recognize generic classes as Structs and apply wrong GC Mark method
@dkimitsa dkimitsa added this to the 2.3.25 milestone Nov 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant