HaxeFoundation/hashlink

Android GC Error: Uncaught exception: Null access

rainyt opened this issue · 3 comments

See : #586 (comment)

2023-03-04 21:07:46.193 6382-6382/com.example.heapsandroid.helloworld W/re-initialized>: type=1400 audit(0.0:53): avc: granted { execute } for path="/data/data/com.example.heapsandroid.helloworld/code_cache/startup_agents/fafda4ce-agent.so" dev="dm-29" ino=8007 scontext=u:r:untrusted_app:s0:c150,c256,c512,c768 tcontext=u:object_r:app_data_file:s0:c150,c256,c512,c768 tclass=file app=com.example.heapsandroid.helloworld
2023-03-04 21:07:46.195 6382-6382/com.example.heapsandroid.helloworld V/studio.deploy: Startup agent attached to VM
2023-03-04 21:07:46.195 6382-6382/com.example.heapsandroid.helloworld V/studio.deploy: No existing instrumentation found. Loading instrumentation from instruments-2ca9b3e0.jar
2023-03-04 21:07:46.197 6382-6382/com.example.heapsandroid.helloworld W/roid.helloworl: DexFile /data/data/com.example.heapsandroid.helloworld/code_cache/.studio/instruments-2ca9b3e0.jar is in boot class path but is not in a known location
2023-03-04 21:07:46.142 6382-6382/? I/roid.helloworl: Late-enabling -Xcheck:jni
2023-03-04 21:07:46.198 6382-6382/com.example.heapsandroid.helloworld V/studio.deploy: Applying transforms with cached classes
2023-03-04 21:07:46.203 6382-6382/com.example.heapsandroid.helloworld W/roid.helloworl: Redefining intrinsic method java.lang.Thread java.lang.Thread.currentThread(). This may cause the unexpected use of the original definition of java.lang.Thread java.lang.Thread.currentThread()in methods that have already been compiled.
2023-03-04 21:07:46.203 6382-6382/com.example.heapsandroid.helloworld W/roid.helloworl: Redefining intrinsic method boolean java.lang.Thread.interrupted(). This may cause the unexpected use of the original definition of boolean java.lang.Thread.interrupted()in methods that have already been compiled.
2023-03-04 21:07:46.207 6382-6382/com.example.heapsandroid.helloworld D/CompatibilityChangeReporter: Compat change id reported: 171979766; UID 10150; state: ENABLED
2023-03-04 21:07:46.297 6382-6382/com.example.heapsandroid.helloworld V/GraphicsEnvironment: ANGLE Developer option for 'com.example.heapsandroid.helloworld' set to: 'default'
2023-03-04 21:07:46.297 6382-6382/com.example.heapsandroid.helloworld V/GraphicsEnvironment: ANGLE GameManagerService for com.example.heapsandroid.helloworld: false
2023-03-04 21:07:46.297 6382-6382/com.example.heapsandroid.helloworld V/GraphicsEnvironment: Neither updatable production driver nor prerelease driver is supported.
2023-03-04 21:07:46.299 6382-6382/com.example.heapsandroid.helloworld D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2023-03-04 21:07:46.299 6382-6382/com.example.heapsandroid.helloworld D/NetworkSecurityConfig: No Network Security Config specified, using platform default
2023-03-04 21:07:46.305 6382-6408/com.example.heapsandroid.helloworld D/libEGL: loaded /vendor/lib64/egl/libEGL_emulation.so
2023-03-04 21:07:46.306 6382-6408/com.example.heapsandroid.helloworld D/libEGL: loaded /vendor/lib64/egl/libGLESv1_CM_emulation.so
2023-03-04 21:07:46.308 6382-6408/com.example.heapsandroid.helloworld D/libEGL: loaded /vendor/lib64/egl/libGLESv2_emulation.so
2023-03-04 21:07:46.317 6382-6382/com.example.heapsandroid.helloworld V/SDL: Device: emulator64_arm64
2023-03-04 21:07:46.318 6382-6382/com.example.heapsandroid.helloworld V/SDL: Model: sdk_gphone64_arm64
2023-03-04 21:07:46.318 6382-6382/com.example.heapsandroid.helloworld V/SDL: onCreate()
2023-03-04 21:07:46.322 6382-6382/com.example.heapsandroid.helloworld V/SDL: nativeSetupJNI()
2023-03-04 21:07:46.323 6382-6382/com.example.heapsandroid.helloworld V/SDL: AUDIO nativeSetupJNI()
2023-03-04 21:07:46.324 6382-6382/com.example.heapsandroid.helloworld V/SDL: CONTROLLER nativeSetupJNI()
2023-03-04 21:07:46.334 6382-6382/com.example.heapsandroid.helloworld V/JNI: initAssets
2023-03-04 21:07:46.335 6382-6382/com.example.heapsandroid.helloworld V/SDL: onResume()
2023-03-04 21:07:46.360 6382-6406/com.example.heapsandroid.helloworld D/HostConnection: createUnique: call
2023-03-04 21:07:46.361 6382-6406/com.example.heapsandroid.helloworld D/HostConnection: HostConnection::get() New Host Connection established 0xb400006f2b00eb90, tid 6406
2023-03-04 21:07:46.363 6382-6406/com.example.heapsandroid.helloworld D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2023-03-04 21:07:46.364 6382-6382/com.example.heapsandroid.helloworld V/SDL: surfaceCreated()
2023-03-04 21:07:46.364 6382-6382/com.example.heapsandroid.helloworld V/SDL: surfaceChanged()
2023-03-04 21:07:46.364 6382-6382/com.example.heapsandroid.helloworld V/SDL: pixel format RGB_565
2023-03-04 21:07:46.365 6382-6382/com.example.heapsandroid.helloworld V/SDL: Window size: 1440x2904
2023-03-04 21:07:46.365 6382-6406/com.example.heapsandroid.helloworld W/OpenGLRenderer: Failed to choose config with EGL_SWAP_BEHAVIOR_PRESERVED, retrying without...
2023-03-04 21:07:46.366 6382-6406/com.example.heapsandroid.helloworld W/OpenGLRenderer: Failed to initialize 101010-2 format, error = EGL_SUCCESS
2023-03-04 21:07:46.366 6382-6406/com.example.heapsandroid.helloworld D/EGL_emulation: eglCreateContext: 0xb400006f2b00fcd0: maj 3 min 0 rcv 3
2023-03-04 21:07:46.367 6382-6406/com.example.heapsandroid.helloworld D/EGL_emulation: eglMakeCurrent: 0xb400006f2b00fcd0: ver 3 0 (tinfo 0x713c0b7080) (first time)
2023-03-04 21:07:46.367 6382-6382/com.example.heapsandroid.helloworld V/SDL: nativeResume()
2023-03-04 21:07:46.367 6382-6409/com.example.heapsandroid.helloworld V/SDL: Running main function main from library libheapsapp.so
2023-03-04 21:07:46.368 6382-6409/com.example.heapsandroid.helloworld V/SDL: nativeRunMain()
2023-03-04 21:07:46.376 6382-6406/com.example.heapsandroid.helloworld I/Gralloc4: mapper 4.x is not supported
2023-03-04 21:07:46.376 6382-6406/com.example.heapsandroid.helloworld D/HostConnection: createUnique: call
2023-03-04 21:07:46.377 6382-6406/com.example.heapsandroid.helloworld D/HostConnection: HostConnection::get() New Host Connection established 0xb400006f2b011710, tid 6406
2023-03-04 21:07:46.377 6382-6406/com.example.heapsandroid.helloworld D/goldfish-address-space: allocate: Ask for block of size 0x100
2023-03-04 21:07:46.377 6382-6406/com.example.heapsandroid.helloworld D/goldfish-address-space: allocate: ioctl allocate returned offset 0x1ebff8000 size 0x8000
2023-03-04 21:07:46.378 6382-6406/com.example.heapsandroid.helloworld W/Gralloc4: allocator 4.x is not supported
2023-03-04 21:07:46.381 6382-6406/com.example.heapsandroid.helloworld D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2023-03-04 21:07:46.382 6382-6409/com.example.heapsandroid.helloworld D/hl: zygame/core/Start.hx:39: Start.initApp
2023-03-04 21:07:46.382 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.390 6382-6409/com.example.heapsandroid.helloworld E/libEGL: validate_display:537 error 3008 (EGL_BAD_DISPLAY)
2023-03-04 21:07:46.390 6382-6409/com.example.heapsandroid.helloworld V/SDL: setOrientation() orientation=-1 width=800 height=600 resizable=true hint=
2023-03-04 21:07:46.390 6382-6409/com.example.heapsandroid.helloworld D/HostConnection: createUnique: call
2023-03-04 21:07:46.391 6382-6409/com.example.heapsandroid.helloworld D/HostConnection: HostConnection::get() New Host Connection established 0xb400006f2b011050, tid 6409
2023-03-04 21:07:46.395 6382-6409/com.example.heapsandroid.helloworld D/HostConnection: HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_native_sync_v2 ANDROID_EMU_native_sync_v3 ANDROID_EMU_native_sync_v4 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_vulkan ANDROID_EMU_deferred_vulkan_commands ANDROID_EMU_vulkan_null_optional_strings ANDROID_EMU_vulkan_create_resources_with_requirements ANDROID_EMU_YUV_Cache ANDROID_EMU_vulkan_ignored_handles ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_vulkan_free_memory_sync ANDROID_EMU_vulkan_shader_float16_int8 ANDROID_EMU_vulkan_async_queue_submit ANDROID_EMU_vulkan_queue_submit_with_commands ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma ANDROID_EMU_hwc_multi_configs GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0 
2023-03-04 21:07:46.408 6382-6409/com.example.heapsandroid.helloworld D/EGL_emulation: eglCreateContext: 0xb400006f2b0117d0: maj 3 min 0 rcv 3
2023-03-04 21:07:46.412 6382-6409/com.example.heapsandroid.helloworld D/EGL_emulation: eglMakeCurrent: 0xb400006f2b0117d0: ver 3 0 (tinfo 0x713c0b7100) (first time)
2023-03-04 21:07:46.415 6382-6409/com.example.heapsandroid.helloworld E/emuglGLESv2_enc: device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glEnable:4894 GL error 0x500 condition [!GLESv2Validation::allowedEnable(ctx->majorVersion(), ctx->minorVersion(), what)]
2023-03-04 21:07:46.425 6382-6409/com.example.heapsandroid.helloworld E/emuglGLESv2_enc: device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glRenderbufferStorage:2953 GL error 0x500 condition [!GLESv2Validation::rboFormat(ctx, internalformat)]
2023-03-04 21:07:46.429 6382-6409/com.example.heapsandroid.helloworld D/hl: zygame/core/Start.hx:91: Hashlink version:, 1.12.0
2023-03-04 21:07:46.429 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.437 6382-6382/com.example.heapsandroid.helloworld V/SDL: onWindowFocusChanged(): true
2023-03-04 21:07:46.445 6382-6409/com.example.heapsandroid.helloworld D/hl: zygame/core/Start.hx:121: Start.initScale=1.333333
2023-03-04 21:07:46.445 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.445 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.445 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.446 6382-6414/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:46.446 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.446 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.446 6382-6415/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:46.447 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.447 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.447 6382-6416/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:46.447 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.447 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.447 6382-6417/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:46.448 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.448 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.448 6382-6418/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:46.448 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.448 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.448 6382-6419/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:46.448 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.448 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.450 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.450 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.450 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.450 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.451 6382-6422/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:46.451 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0
2023-03-04 21:07:46.451 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.451 6382-6409/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0.111111111111111
2023-03-04 21:07:46.451 6382-6409/com.example.heapsandroid.helloworld D/hl: 
2023-03-04 21:07:46.452 6382-6423/com.example.heapsandroid.helloworld D/hl: Uncaught exception: Null access
2023-03-04 21:07:48.168 6382-6394/com.example.heapsandroid.helloworld W/System: A resource failed to call close. 

I define GC_DEBUG to get log Uncaught exception: Null access.

It should also happen in 1.12.0, because I can only run normally in 1.11.0.

image

D/hl: Uncaught exception3: Null access
2023-03-05 03:38:08.184 9149-9235/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0.444444444444444
2023-03-05 03:38:08.184 9149-9235/com.example.heapsandroid.helloworld D/hl: 
2023-03-05 03:38:08.187 9149-9251/com.example.heapsandroid.helloworld D/hl: Uncaught exception3: Null access
2023-03-05 03:38:08.187 9149-9235/com.example.heapsandroid.helloworld D/hl: MainScene.hx:62: loading, 0.555555555555556
2023-03-05 03:38:08.187 9149-9235/com.example.heapsandroid.helloworld D/hl: 

Sorry, it may be difficult because I'm not familiar with it.

I get some error output from here.

Is this possibly related to threads?

@ncannasse