Tornado
Member
After migrating our game from GMS 2.2 to 2.3 we are facing very strange crash.
It seems that Garbage Collector is crashing with null pointer exception!!!
We are using physics engine (box2d). It seems that garbage collector and physics engine doesn't do well together.
On Windows it crashes withouth any output, on Android is crashes with "null pointer dereference":
On the forum I saw someone having the same problem, but noone commented on that:
https://forum.yoyogames.com/index.p...ersion-2-3-0-release.78124/page-4#post-468996
We are using GMS 2.3.0.529 Runtime v2.3.0.401
When we turn off garbage collector with
then everything works fine!
How can garbage collector crash with null pointer error?
In one week we must update our game on various mobile stores and now we don't know what to do!!!
Is it advisable to put
in production and wait for Yoyo to fix this bug?
We are not using any struct or local functions or any of the new features. We only have those global functions, because on migration to GMS 2.3, GMS automatically wrapped all our scripts into functions.
This leads me to the conclusion that we are good to go for now with gc_enable(false);
Thank you in advance for any help!
It seems that Garbage Collector is crashing with null pointer exception!!!
We are using physics engine (box2d). It seems that garbage collector and physics engine doesn't do well together.
On Windows it crashes withouth any output, on Android is crashes with "null pointer dereference":
(Take a closer look on the lines with DoGenerationalGC, MarkAndSweepGen and b2Fixture::Destroy)
Code:
09-27 18:51:51.721 25167 25167 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-27 18:51:51.721 25167 25167 F DEBUG : Build fingerprint: 'lge/judypn_lao_eea/judypn:10/QKQ1.191222.002/2021917599e76:user/release-keys'
09-27 18:51:51.721 25167 25167 F DEBUG : Revision: '12'
09-27 18:51:51.721 25167 25167 F DEBUG : ABI: 'arm64'
09-27 18:51:51.722 25167 25167 F DEBUG : Timestamp: 2020-09-27 18:51:51+0200
09-27 18:51:51.722 25167 25167 F DEBUG : pid: 24914, tid: 24949, name: GLThread 10524 >>> com.abcgames.abcpinball1 <<<
09-27 18:51:51.722 25167 25167 F DEBUG : uid: 10374
09-27 18:51:51.722 25167 25167 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
09-27 18:51:51.722 25167 25167 F DEBUG : Cause: null pointer dereference
09-27 18:51:51.722 25167 25167 F DEBUG : x0 0000000000000000 x1 0000007a26cc5aa0 x2 0000000000000000 x3 000000000000000a
09-27 18:51:51.722 25167 25167 F DEBUG : x4 0000007a9e78bc20 x5 0000007a9e78bc40 x6 0000007a391de798 x7 0000007a391de790
09-27 18:51:51.722 25167 25167 F DEBUG : x8 0000000000000000 x9 00000000000192a0 x10 0000007a264974f8 x11 000000005cf9f389
09-27 18:51:51.722 25167 25167 F DEBUG : x12 0000000000000018 x13 000000000000008b x14 0000000000000000 x15 0000000000000089
09-27 18:51:51.722 25167 25167 F DEBUG : x16 0000007a3e5bd6a8 x17 0000007a3e3bb778 x18 0000000000000100 x19 0000007a26c33040
09-27 18:51:51.723 25167 25167 F DEBUG : x20 0000007a26cc5aa0 x21 0000007a26c33040 x22 0000007a26cded40 x23 0000007a26cdedd0
09-27 18:51:51.723 25167 25167 F DEBUG : x24 0000007a26cdede8 x25 0000000000000000 x26 0000000000008a17 x27 0000000000000001
09-27 18:51:51.723 25167 25167 F DEBUG : x28 0000000000000002 x29 0000007a3f90fc30
09-27 18:51:51.723 25167 25167 F DEBUG : sp 0000007a3f90fc10 lr 0000007a3e3bc350 pc 0000007a3e3bb794
09-27 18:51:51.884 25167 25167 F DEBUG :
09-27 18:51:51.884 25167 25167 F DEBUG : backtrace:
09-27 18:51:51.884 25167 25167 F DEBUG : #00 pc 00000000003f7794 /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (b2Fixture::Destroy(b2BlockAllocator*)+28) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #01 pc 00000000003f834c /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (b2World::DestroyBody(b2Body*)+336) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #02 pc 000000000033cf00 /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (CPhysicsObject::~CPhysicsObject()+112) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #03 pc 000000000025a3a0 /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (CInstance::PreFree()+32) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #04 pc 0000000000173c24 /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (MarkAndSweepGen(int, int, bool)+2592) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #05 pc 00000000001746c0 /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (DoGenerationalGC(int)+208) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #06 pc 00000000002ab90c /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (DoAStep()+80) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #07 pc 00000000002ac19c /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (MainLoop_Process()+1024) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #08 pc 00000000003af854 /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/lib/arm64/libyoyo.so (Java_com_yoyogames_runner_RunnerJNILib_Process+868) (BuildId: 7a51802fbe6f0c6fe2b49dd80e9c2b426afcfa8e)
09-27 18:51:51.885 25167 25167 F DEBUG : #09 pc 00000000000224c0 /data/app/com.abcgames.abcpinball1-VvMEsTV0RG9fx4GT6igGXw==/oat/arm64/base.odex (art_jni_trampoline+208)
09-27 18:51:51.885 25167 25167 F DEBUG : #10 pc 00000000020082d8 /memfd:/jit-cache (deleted) (com.abcgames.abcpinball1.DemoRenderer.onDrawFrame+696)
09-27 18:51:51.885 25167 25167 F DEBUG : #11 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #12 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #13 pc 00000000002e27fc /apex/com.android.runtime/lib64/libart.so (art::interpreter::ArtInterpreterToCompiledCodeBridge(art::Thread*, art::ArtMethod*, art::ShadowFrame*, unsigned short, art::JValue*)+384) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #14 pc 00000000002dda5c /apex/com.android.runtime/lib64/libart.so (bool art::interpreter::DoCall<false, false>(art::ArtMethod*, art::Thread*, art::ShadowFrame&, art::Instruction const*, unsigned short, art::JValue*)+892) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #15 pc 00000000005a1464 /apex/com.android.runtime/lib64/libart.so (MterpInvokeInterface+980) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #16 pc 0000000000130a14 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_interface+20) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #17 pc 00000000002f53b0 /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.guardedRun+1096)
09-27 18:51:51.885 25167 25167 F DEBUG : #18 pc 00000000005a2278 /apex/com.android.runtime/lib64/libart.so (MterpInvokeDirect+1100) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #19 pc 0000000000130914 /apex/com.android.runtime/lib64/libart.so (mterp_op_invoke_direct+20) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #20 pc 00000000002f598c /system/framework/framework.jar (android.opengl.GLSurfaceView$GLThread.run+48)
09-27 18:51:51.885 25167 25167 F DEBUG : #21 pc 00000000002b3b10 /apex/com.android.runtime/lib64/libart.so (_ZN3art11interpreterL7ExecuteEPNS_6ThreadERKNS_20CodeItemDataAccessorERNS_11ShadowFrameENS_6JValueEbb.llvm.15427027571776522123+240) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #22 pc 0000000000591214 /apex/com.android.runtime/lib64/libart.so (artQuickToInterpreterBridge+1032) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #23 pc 000000000013f468 /apex/com.android.runtime/lib64/libart.so (art_quick_to_interpreter_bridge+88) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #24 pc 0000000000136334 /apex/com.android.runtime/lib64/libart.so (art_quick_invoke_stub+548) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #25 pc 0000000000144fec /apex/com.android.runtime/lib64/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+244) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #26 pc 00000000004afc18 /apex/com.android.runtime/lib64/libart.so (art::(anonymous namespace)::InvokeWithArgArray(art::ScopedObjectAccessAlreadyRunnable const&, art::ArtMethod*, art::(anonymous namespace)::ArgArray*, art::JValue*, char const*)+104) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #27 pc 00000000004b0d2c /apex/com.android.runtime/lib64/libart.so (art::InvokeVirtualOrInterfaceWithJValues(art::ScopedObjectAccessAlreadyRunnable const&, _jobject*, _jmethodID*, jvalue const*)+416) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #28 pc 00000000004f16e8 /apex/com.android.runtime/lib64/libart.so (art::Thread::CreateCallback(void*)+1176) (BuildId: a6a5af21fb3cbca092466709df7030ac)
09-27 18:51:51.885 25167 25167 F DEBUG : #29 pc 00000000000e7160 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+36) (BuildId: b151e0103044156ae6597337e10f9e1b)
09-27 18:51:51.885 25167 25167 F DEBUG : #30 pc 0000000000085014 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: b151e0103044156ae6597337e10f9e1b)
09-27 18:51:52.391 24914 24914 I yoyo : onPause
09-27 18:51:52.398 24914 24914 I yoyo : Pausing the Runner
https://forum.yoyogames.com/index.p...ersion-2-3-0-release.78124/page-4#post-468996
We are using GMS 2.3.0.529 Runtime v2.3.0.401
When we turn off garbage collector with
gc_enable(false);
then everything works fine!
How can garbage collector crash with null pointer error?
In one week we must update our game on various mobile stores and now we don't know what to do!!!
Is it advisable to put
gc_enable(false);
in production and wait for Yoyo to fix this bug?
We are not using any struct or local functions or any of the new features. We only have those global functions, because on migration to GMS 2.3, GMS automatically wrapped all our scripts into functions.
This leads me to the conclusion that we are good to go for now with gc_enable(false);
Thank you in advance for any help!
Last edited: