This repository was archived by the owner on Apr 19, 2026. It is now read-only.
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

.Create causes SIGABRT crash #27

Description

@ruby0x1

I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

The following line causes the crash, but only after it returns:
service = builder.Create(conf);

If I don't call create (but configure everything before it) it continues without issue.

Possibly relevant information:

  • I am running a Nexus 5x, Android 6.0.1 (latest updates)
  • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
  • Building with gradle/android studio
    • using compile 'com.google.android.gms:play-services:8.4.0'
    • I don't have any apply lines related to the play services
  • I am using SDL 2.0.4 stable as the basis of the app
  • The app ID is set up and configured on the developer console
  • checkJNI is enabled
  • I use JNI_OnLoad initialization

The code below is a bit verbose because I have been trying to debug this a while.

static std::unique_ptr< ::gpg::GameServices> service;
void init() {
if(service == nullptr) {
LOGI("INIT JVM:%p", jvm);
JNIEnv* env;
int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
if (state == JNI_EDETACHED) {
LOGI("INIT: GetEnv: not attached, attaching ... ");
if (jvm->AttachCurrentThread(&env, NULL) != 0) {
LOGI("INIT: GetEnv: FAILED TO ATTACH");
} else {
LOGI("INIT: GetEnv: ATTACHED OK");
}
} else if (state == JNI_OK) {
LOGI("INIT: GetEnv: JNI_OK");
} else if (state == JNI_EVERSION) {
LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
}
LOGI("INIT ENV:%p", env);
jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
::gpg::AndroidPlatformConfiguration conf;
conf.SetActivity(globalactivity);
::gpg::GameServices::Builder builder;
builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
LOGI("OnAuthActionStarted");
});
builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
LOGI("AuthActionFinished, status: %d", status);
});
service = builder.Create(conf);
LOGI("INIT: DONE");
} //service != null
} //init

I have explicitly added the getActivity function to check that it was sane.
The selfActivity instance is set inside of onCreate.

 public static Activity getActivity() {
Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
return selfActivity;
}

And finally, here is the logcat output at the time of the crash.
In case it's not clear:
GPG = the native code above
app = C++ code of the app, from a touch event (happens no matter where I call from)
APP = java code of the app

I app : touch released, GPG not inited, calling init()
I GPG : INIT JVM:0xf4ebc000
I GPG : INIT: GetEnv: JNI_OK
I GPG : INIT ENV:0xeb311e40
I GPG : local class 0x200005
I GPG : global class 0x706
I GPG : mid 0xf08730c8
I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
I GPG : local activity 0x200009
I GPG : global activity 0x70a
V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
I GPG : INIT: DONE
I app : touch released, done
F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
F DEBUG : Revision: 'rev_1.0'
F DEBUG : ABI: 'arm'
F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
F DEBUG : F DEBUG : backtrace:
F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
E DEBUG : AM write failed: Broken pipe
I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
I Zygote : Process 29111 exited due to signal (6)

Debugging via Android studio with NDK debugging yields minimal help,
Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

Any help is appreciated!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Add copy buttons to all
       blocks\n(function() {\n function addCopyButtons() {\n document.querySelectorAll('pre code').forEach(function(codeBlock) {\n if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;\n codeBlock.parentElement.setAttribute('data-copy-added', 'true');\n \n var btn = document.createElement('button');\n btn.textContent = 'Copy';\n btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';\n btn.onmouseover = function() { this.style.opacity = '1'; };\n btn.onmouseout = function() { this.style.opacity = '0.7'; };\n btn.onclick = function() {\n navigator.clipboard.writeText(codeBlock.textContent).then(function() {\n btn.textContent = 'Copied!';\n setTimeout(function() { btn.textContent = 'Copy'; }, 1500);\n });\n };\n codeBlock.parentElement.style.position = 'relative';\n codeBlock.parentElement.appendChild(btn);\n });\n }\n \n addCopyButtons();\n \n // Re-run on dynamic content\n var observer = new MutationObserver(addCopyButtons);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Add Copy Buttons to Code Blocks");
      }
      } catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
      })();
      (function(){
      try {
      var __m = "github.com";
      var __re = new RegExp('^' + "github\\.com" + '
      
      Skip to content
      This repository was archived by the owner on Apr 19, 2026. It is now read-only.
      This repository was archived by the owner on Apr 19, 2026. It is now read-only.

      .Create causes SIGABRT crash #27

      Description

      @ruby0x1

      I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
      I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

      The following line causes the crash, but only after it returns:
      service = builder.Create(conf);

      If I don't call create (but configure everything before it) it continues without issue.

      Possibly relevant information:

      • I am running a Nexus 5x, Android 6.0.1 (latest updates)
      • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
      • Building with gradle/android studio
        • using compile 'com.google.android.gms:play-services:8.4.0'
        • I don't have any apply lines related to the play services
      • I am using SDL 2.0.4 stable as the basis of the app
      • The app ID is set up and configured on the developer console
      • checkJNI is enabled
      • I use JNI_OnLoad initialization

      The code below is a bit verbose because I have been trying to debug this a while.

      static std::unique_ptr< ::gpg::GameServices> service;
      void init() {
      if(service == nullptr) {
      LOGI("INIT JVM:%p", jvm);
      JNIEnv* env;
      int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
      if (state == JNI_EDETACHED) {
      LOGI("INIT: GetEnv: not attached, attaching ... ");
      if (jvm->AttachCurrentThread(&env, NULL) != 0) {
      LOGI("INIT: GetEnv: FAILED TO ATTACH");
      } else {
      LOGI("INIT: GetEnv: ATTACHED OK");
      }
      } else if (state == JNI_OK) {
      LOGI("INIT: GetEnv: JNI_OK");
      } else if (state == JNI_EVERSION) {
      LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
      }
      LOGI("INIT ENV:%p", env);
      jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
      jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
      jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
      jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
      jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
      ::gpg::AndroidPlatformConfiguration conf;
      conf.SetActivity(globalactivity);
      ::gpg::GameServices::Builder builder;
      builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
      builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
      LOGI("OnAuthActionStarted");
      });
      builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
      LOGI("AuthActionFinished, status: %d", status);
      });
      service = builder.Create(conf);
      LOGI("INIT: DONE");
      } //service != null
      } //init
      

      I have explicitly added the getActivity function to check that it was sane.
      The selfActivity instance is set inside of onCreate.

       public static Activity getActivity() {
      Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
      return selfActivity;
      }
      

      And finally, here is the logcat output at the time of the crash.
      In case it's not clear:
      GPG = the native code above
      app = C++ code of the app, from a touch event (happens no matter where I call from)
      APP = java code of the app

      I app : touch released, GPG not inited, calling init()
      I GPG : INIT JVM:0xf4ebc000
      I GPG : INIT: GetEnv: JNI_OK
      I GPG : INIT ENV:0xeb311e40
      I GPG : local class 0x200005
      I GPG : global class 0x706
      I GPG : mid 0xf08730c8
      I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
      I GPG : local activity 0x200009
      I GPG : global activity 0x70a
      V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
      W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
      I GPG : INIT: DONE
      I app : touch released, done
      F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
      F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
      F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
      F DEBUG : Revision: 'rev_1.0'
      F DEBUG : ABI: 'arm'
      F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
      F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
      W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
      F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
      F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
      F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
      F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
      F DEBUG : F DEBUG : backtrace:
      F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
      F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
      F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
      F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
      F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
      F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
      F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
      F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
      F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
      F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
      F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
      F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
      F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
      E DEBUG : AM write failed: Broken pipe
      I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
      W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
      I Zygote : Process 29111 exited due to signal (6)
      

      Debugging via Android studio with NDK debugging yields minimal help,
      Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

      Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

      I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

      Any help is appreciated!

      Metadata

      Metadata

      Assignees

      No one assigned

        Labels

        No labels
        No labels

        Type

        No type

        Projects

        No projects

          Milestone

          No milestone

          Relationships

          None yet

          Development

          No branches or pull requests

          Issue actions

          , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Force GitHub README to respect dark mode\n(function() {\n var style = document.createElement('style');\n style.textContent = '\n .markdown-body {\n color-scheme: dark light;\n }\n .markdown-body pre { background: #161b22 !important; }\n .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; }\n .markdown-body table th, .markdown-body table td { border-color: #30363d !important; }\n .markdown-body img { background: #0d1117; }\n .markdown-body blockquote { border-left-color: #8b949e; }\n .markdown-body hr { border-color: #30363d; }\n ';\n document.head.appendChild(style);\n})();", "GitHub Dark Mode README Fix"); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
          Skip to content
          This repository was archived by the owner on Apr 19, 2026. It is now read-only.
          This repository was archived by the owner on Apr 19, 2026. It is now read-only.

          .Create causes SIGABRT crash #27

          Description

          @ruby0x1

          I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
          I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

          The following line causes the crash, but only after it returns:
          service = builder.Create(conf);

          If I don't call create (but configure everything before it) it continues without issue.

          Possibly relevant information:

          • I am running a Nexus 5x, Android 6.0.1 (latest updates)
          • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
          • Building with gradle/android studio
            • using compile 'com.google.android.gms:play-services:8.4.0'
            • I don't have any apply lines related to the play services
          • I am using SDL 2.0.4 stable as the basis of the app
          • The app ID is set up and configured on the developer console
          • checkJNI is enabled
          • I use JNI_OnLoad initialization

          The code below is a bit verbose because I have been trying to debug this a while.

          static std::unique_ptr< ::gpg::GameServices> service;
          void init() {
          if(service == nullptr) {
          LOGI("INIT JVM:%p", jvm);
          JNIEnv* env;
          int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
          if (state == JNI_EDETACHED) {
          LOGI("INIT: GetEnv: not attached, attaching ... ");
          if (jvm->AttachCurrentThread(&env, NULL) != 0) {
          LOGI("INIT: GetEnv: FAILED TO ATTACH");
          } else {
          LOGI("INIT: GetEnv: ATTACHED OK");
          }
          } else if (state == JNI_OK) {
          LOGI("INIT: GetEnv: JNI_OK");
          } else if (state == JNI_EVERSION) {
          LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
          }
          LOGI("INIT ENV:%p", env);
          jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
          jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
          jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
          jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
          jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
          ::gpg::AndroidPlatformConfiguration conf;
          conf.SetActivity(globalactivity);
          ::gpg::GameServices::Builder builder;
          builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
          builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
          LOGI("OnAuthActionStarted");
          });
          builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
          LOGI("AuthActionFinished, status: %d", status);
          });
          service = builder.Create(conf);
          LOGI("INIT: DONE");
          } //service != null
          } //init
          

          I have explicitly added the getActivity function to check that it was sane.
          The selfActivity instance is set inside of onCreate.

           public static Activity getActivity() {
          Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
          return selfActivity;
          }
          

          And finally, here is the logcat output at the time of the crash.
          In case it's not clear:
          GPG = the native code above
          app = C++ code of the app, from a touch event (happens no matter where I call from)
          APP = java code of the app

          I app : touch released, GPG not inited, calling init()
          I GPG : INIT JVM:0xf4ebc000
          I GPG : INIT: GetEnv: JNI_OK
          I GPG : INIT ENV:0xeb311e40
          I GPG : local class 0x200005
          I GPG : global class 0x706
          I GPG : mid 0xf08730c8
          I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
          I GPG : local activity 0x200009
          I GPG : global activity 0x70a
          V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
          W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
          I GPG : INIT: DONE
          I app : touch released, done
          F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
          F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
          F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
          F DEBUG : Revision: 'rev_1.0'
          F DEBUG : ABI: 'arm'
          F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
          F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
          W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
          F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
          F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
          F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
          F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
          F DEBUG : F DEBUG : backtrace:
          F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
          F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
          F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
          F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
          F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
          F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
          F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
          F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
          F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
          F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
          F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
          F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
          F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
          E DEBUG : AM write failed: Broken pipe
          I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
          W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
          I Zygote : Process 29111 exited due to signal (6)
          

          Debugging via Android studio with NDK debugging yields minimal help,
          Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

          Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

          I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

          Any help is appreciated!

          Metadata

          Metadata

          Assignees

          No one assigned

            Labels

            No labels
            No labels

            Type

            No type

            Projects

            No projects

              Milestone

              No milestone

              Relationships

              None yet

              Development

              No branches or pull requests

              Issue actions

              , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Highlight search terms from Google/DuckDuckGo/Bing referrer\n(function() {\n var ref = document.referrer;\n var terms = [];\n \n if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) {\n var url = new URL(ref);\n var q = url.searchParams.get('q') || url.searchParams.get('p');\n if (q) {\n terms = q.split(/\\s+/).filter(function(t) { return t.length > 2; });\n }\n }\n \n if (terms.length === 0) return;\n \n var style = document.createElement('style');\n style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }';\n document.head.appendChild(style);\n \n function highlight(node) {\n if (node.nodeType === 3) { // text node\n var text = node.textContent;\n var found = false;\n terms.forEach(function(term) {\n var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\') + ')', 'gi');\n if (regex.test(text)) {\n found = true;\n var frag = document.createDocumentFragment();\n var parts = text.split(regex);\n parts.forEach(function(part, i) {\n if (i % 2 === 0) {\n frag.appendChild(document.createTextNode(part));\n } else {\n var span = document.createElement('span');\n span.className = 'userscript-highlight';\n span.textContent = part;\n frag.appendChild(span);\n }\n });\n node.parentNode.replaceChild(frag, node);\n }\n });\n } else if (node.nodeType === 1 && node.childNodes) { // element\n var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT'];\n if (!skipTags.includes(node.tagName)) {\n Array.from(node.childNodes).forEach(highlight);\n }\n }\n }\n \n highlight(document.body);\n \n // Re-highlight on dynamic content\n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1 || node.nodeType === 3) highlight(node);\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Highlight Search Terms"); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
              Skip to content
              This repository was archived by the owner on Apr 19, 2026. It is now read-only.
              This repository was archived by the owner on Apr 19, 2026. It is now read-only.

              .Create causes SIGABRT crash #27

              Description

              @ruby0x1

              I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
              I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

              The following line causes the crash, but only after it returns:
              service = builder.Create(conf);

              If I don't call create (but configure everything before it) it continues without issue.

              Possibly relevant information:

              • I am running a Nexus 5x, Android 6.0.1 (latest updates)
              • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
              • Building with gradle/android studio
                • using compile 'com.google.android.gms:play-services:8.4.0'
                • I don't have any apply lines related to the play services
              • I am using SDL 2.0.4 stable as the basis of the app
              • The app ID is set up and configured on the developer console
              • checkJNI is enabled
              • I use JNI_OnLoad initialization

              The code below is a bit verbose because I have been trying to debug this a while.

              static std::unique_ptr< ::gpg::GameServices> service;
              void init() {
              if(service == nullptr) {
              LOGI("INIT JVM:%p", jvm);
              JNIEnv* env;
              int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
              if (state == JNI_EDETACHED) {
              LOGI("INIT: GetEnv: not attached, attaching ... ");
              if (jvm->AttachCurrentThread(&env, NULL) != 0) {
              LOGI("INIT: GetEnv: FAILED TO ATTACH");
              } else {
              LOGI("INIT: GetEnv: ATTACHED OK");
              }
              } else if (state == JNI_OK) {
              LOGI("INIT: GetEnv: JNI_OK");
              } else if (state == JNI_EVERSION) {
              LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
              }
              LOGI("INIT ENV:%p", env);
              jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
              jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
              jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
              jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
              jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
              ::gpg::AndroidPlatformConfiguration conf;
              conf.SetActivity(globalactivity);
              ::gpg::GameServices::Builder builder;
              builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
              builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
              LOGI("OnAuthActionStarted");
              });
              builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
              LOGI("AuthActionFinished, status: %d", status);
              });
              service = builder.Create(conf);
              LOGI("INIT: DONE");
              } //service != null
              } //init
              

              I have explicitly added the getActivity function to check that it was sane.
              The selfActivity instance is set inside of onCreate.

               public static Activity getActivity() {
              Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
              return selfActivity;
              }
              

              And finally, here is the logcat output at the time of the crash.
              In case it's not clear:
              GPG = the native code above
              app = C++ code of the app, from a touch event (happens no matter where I call from)
              APP = java code of the app

              I app : touch released, GPG not inited, calling init()
              I GPG : INIT JVM:0xf4ebc000
              I GPG : INIT: GetEnv: JNI_OK
              I GPG : INIT ENV:0xeb311e40
              I GPG : local class 0x200005
              I GPG : global class 0x706
              I GPG : mid 0xf08730c8
              I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
              I GPG : local activity 0x200009
              I GPG : global activity 0x70a
              V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
              W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
              I GPG : INIT: DONE
              I app : touch released, done
              F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
              F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
              F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
              F DEBUG : Revision: 'rev_1.0'
              F DEBUG : ABI: 'arm'
              F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
              F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
              W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
              F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
              F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
              F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
              F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
              F DEBUG : F DEBUG : backtrace:
              F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
              F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
              F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
              F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
              F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
              F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
              F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
              F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
              F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
              F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
              F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
              F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
              F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
              E DEBUG : AM write failed: Broken pipe
              I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
              W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
              I Zygote : Process 29111 exited due to signal (6)
              

              Debugging via Android studio with NDK debugging yields minimal help,
              Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

              Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

              I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

              Any help is appreciated!

              Metadata

              Metadata

              Assignees

              No one assigned

                Labels

                No labels
                No labels

                Type

                No type

                Projects

                No projects

                  Milestone

                  No milestone

                  Relationships

                  None yet

                  Development

                  No branches or pull requests

                  Issue actions

                  , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Strip utm_, fbclid, gclid, etc. from all links on page\n(function() {\n var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content',\n 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid',\n 'ref', 'ref_src', 'source', 'medium', 'campaign'];\n \n function cleanUrl(url) {\n try {\n var u = new URL(url, window.location.origin);\n var changed = false;\n trackingParams.forEach(function(p) {\n if (u.searchParams.has(p)) {\n u.searchParams.delete(p);\n changed = true;\n }\n });\n return changed ? u.toString() : url;\n } catch (e) {\n return url;\n }\n }\n \n function cleanLinks() {\n document.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n \n cleanLinks();\n \n var observer = new MutationObserver(function(mutations) {\n mutations.forEach(function(m) {\n m.addedNodes.forEach(function(node) {\n if (node.nodeType === 1) {\n if (node.tagName === 'A') cleanLinks();\n node.querySelectorAll('a[href]').forEach(function(a) {\n var clean = cleanUrl(a.href);\n if (clean !== a.href) a.href = clean;\n });\n }\n });\n });\n });\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "Remove Tracking Parameters from Links"); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + '
                  Skip to content
                  This repository was archived by the owner on Apr 19, 2026. It is now read-only.
                  This repository was archived by the owner on Apr 19, 2026. It is now read-only.

                  .Create causes SIGABRT crash #27

                  Description

                  @ruby0x1

                  I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
                  I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

                  The following line causes the crash, but only after it returns:
                  service = builder.Create(conf);

                  If I don't call create (but configure everything before it) it continues without issue.

                  Possibly relevant information:

                  • I am running a Nexus 5x, Android 6.0.1 (latest updates)
                  • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
                  • Building with gradle/android studio
                    • using compile 'com.google.android.gms:play-services:8.4.0'
                    • I don't have any apply lines related to the play services
                  • I am using SDL 2.0.4 stable as the basis of the app
                  • The app ID is set up and configured on the developer console
                  • checkJNI is enabled
                  • I use JNI_OnLoad initialization

                  The code below is a bit verbose because I have been trying to debug this a while.

                  static std::unique_ptr< ::gpg::GameServices> service;
                  void init() {
                  if(service == nullptr) {
                  LOGI("INIT JVM:%p", jvm);
                  JNIEnv* env;
                  int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
                  if (state == JNI_EDETACHED) {
                  LOGI("INIT: GetEnv: not attached, attaching ... ");
                  if (jvm->AttachCurrentThread(&env, NULL) != 0) {
                  LOGI("INIT: GetEnv: FAILED TO ATTACH");
                  } else {
                  LOGI("INIT: GetEnv: ATTACHED OK");
                  }
                  } else if (state == JNI_OK) {
                  LOGI("INIT: GetEnv: JNI_OK");
                  } else if (state == JNI_EVERSION) {
                  LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
                  }
                  LOGI("INIT ENV:%p", env);
                  jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
                  jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
                  jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
                  jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
                  jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
                  ::gpg::AndroidPlatformConfiguration conf;
                  conf.SetActivity(globalactivity);
                  ::gpg::GameServices::Builder builder;
                  builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
                  builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
                  LOGI("OnAuthActionStarted");
                  });
                  builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
                  LOGI("AuthActionFinished, status: %d", status);
                  });
                  service = builder.Create(conf);
                  LOGI("INIT: DONE");
                  } //service != null
                  } //init
                  

                  I have explicitly added the getActivity function to check that it was sane.
                  The selfActivity instance is set inside of onCreate.

                   public static Activity getActivity() {
                  Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
                  return selfActivity;
                  }
                  

                  And finally, here is the logcat output at the time of the crash.
                  In case it's not clear:
                  GPG = the native code above
                  app = C++ code of the app, from a touch event (happens no matter where I call from)
                  APP = java code of the app

                  I app : touch released, GPG not inited, calling init()
                  I GPG : INIT JVM:0xf4ebc000
                  I GPG : INIT: GetEnv: JNI_OK
                  I GPG : INIT ENV:0xeb311e40
                  I GPG : local class 0x200005
                  I GPG : global class 0x706
                  I GPG : mid 0xf08730c8
                  I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
                  I GPG : local activity 0x200009
                  I GPG : global activity 0x70a
                  V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
                  W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
                  I GPG : INIT: DONE
                  I app : touch released, done
                  F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
                  F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
                  F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
                  F DEBUG : Revision: 'rev_1.0'
                  F DEBUG : ABI: 'arm'
                  F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
                  F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
                  W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
                  F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
                  F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
                  F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
                  F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
                  F DEBUG : F DEBUG : backtrace:
                  F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
                  F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
                  F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
                  F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
                  F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
                  F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
                  F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
                  F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
                  F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
                  F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
                  F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
                  F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
                  F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
                  E DEBUG : AM write failed: Broken pipe
                  I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                  W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                  I Zygote : Process 29111 exited due to signal (6)
                  

                  Debugging via Android studio with NDK debugging yields minimal help,
                  Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

                  Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

                  I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

                  Any help is appreciated!

                  Metadata

                  Metadata

                  Assignees

                  No one assigned

                    Labels

                    No labels
                    No labels

                    Type

                    No type

                    Projects

                    No projects

                      Milestone

                      No milestone

                      Relationships

                      None yet

                      Development

                      No branches or pull requests

                      Issue actions

                      , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Auto-enable theater mode on YouTube\n(function() {\n function tryTheater() {\n var btn = document.querySelector('button[aria-label=\"Theater mode\"], ytd-player #player button[title=\"Theater mode\"]');\n if (btn && !btn.classList.contains('activated')) {\n btn.click();\n }\n }\n \n // Try immediately\n tryTheater();\n \n // Try after navigation (SPA)\n var lastUrl = location.href;\n setInterval(function() {\n if (location.href !== lastUrl) {\n lastUrl = location.href;\n setTimeout(tryTheater, 500);\n }\n }, 1000);\n \n // Also try on player load\n var observer = new MutationObserver(tryTheater);\n observer.observe(document.body, { childList: true, subtree: true });\n})();", "YouTube Theater Mode Default"); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
                      Skip to content
                      This repository was archived by the owner on Apr 19, 2026. It is now read-only.
                      This repository was archived by the owner on Apr 19, 2026. It is now read-only.

                      .Create causes SIGABRT crash #27

                      Description

                      @ruby0x1

                      I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
                      I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

                      The following line causes the crash, but only after it returns:
                      service = builder.Create(conf);

                      If I don't call create (but configure everything before it) it continues without issue.

                      Possibly relevant information:

                      • I am running a Nexus 5x, Android 6.0.1 (latest updates)
                      • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
                      • Building with gradle/android studio
                        • using compile 'com.google.android.gms:play-services:8.4.0'
                        • I don't have any apply lines related to the play services
                      • I am using SDL 2.0.4 stable as the basis of the app
                      • The app ID is set up and configured on the developer console
                      • checkJNI is enabled
                      • I use JNI_OnLoad initialization

                      The code below is a bit verbose because I have been trying to debug this a while.

                      static std::unique_ptr< ::gpg::GameServices> service;
                      void init() {
                      if(service == nullptr) {
                      LOGI("INIT JVM:%p", jvm);
                      JNIEnv* env;
                      int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
                      if (state == JNI_EDETACHED) {
                      LOGI("INIT: GetEnv: not attached, attaching ... ");
                      if (jvm->AttachCurrentThread(&env, NULL) != 0) {
                      LOGI("INIT: GetEnv: FAILED TO ATTACH");
                      } else {
                      LOGI("INIT: GetEnv: ATTACHED OK");
                      }
                      } else if (state == JNI_OK) {
                      LOGI("INIT: GetEnv: JNI_OK");
                      } else if (state == JNI_EVERSION) {
                      LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
                      }
                      LOGI("INIT ENV:%p", env);
                      jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
                      jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
                      jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
                      jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
                      jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
                      ::gpg::AndroidPlatformConfiguration conf;
                      conf.SetActivity(globalactivity);
                      ::gpg::GameServices::Builder builder;
                      builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
                      builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
                      LOGI("OnAuthActionStarted");
                      });
                      builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
                      LOGI("AuthActionFinished, status: %d", status);
                      });
                      service = builder.Create(conf);
                      LOGI("INIT: DONE");
                      } //service != null
                      } //init
                      

                      I have explicitly added the getActivity function to check that it was sane.
                      The selfActivity instance is set inside of onCreate.

                       public static Activity getActivity() {
                      Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
                      return selfActivity;
                      }
                      

                      And finally, here is the logcat output at the time of the crash.
                      In case it's not clear:
                      GPG = the native code above
                      app = C++ code of the app, from a touch event (happens no matter where I call from)
                      APP = java code of the app

                      I app : touch released, GPG not inited, calling init()
                      I GPG : INIT JVM:0xf4ebc000
                      I GPG : INIT: GetEnv: JNI_OK
                      I GPG : INIT ENV:0xeb311e40
                      I GPG : local class 0x200005
                      I GPG : global class 0x706
                      I GPG : mid 0xf08730c8
                      I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
                      I GPG : local activity 0x200009
                      I GPG : global activity 0x70a
                      V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
                      W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
                      I GPG : INIT: DONE
                      I app : touch released, done
                      F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
                      F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
                      F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
                      F DEBUG : Revision: 'rev_1.0'
                      F DEBUG : ABI: 'arm'
                      F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
                      F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
                      W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
                      F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
                      F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
                      F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
                      F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
                      F DEBUG : F DEBUG : backtrace:
                      F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
                      F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
                      F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
                      F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
                      F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
                      F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
                      F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
                      F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
                      F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
                      F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
                      F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
                      F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
                      F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
                      E DEBUG : AM write failed: Broken pipe
                      I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                      W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                      I Zygote : Process 29111 exited due to signal (6)
                      

                      Debugging via Android studio with NDK debugging yields minimal help,
                      Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

                      Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

                      I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

                      Any help is appreciated!

                      Metadata

                      Metadata

                      Assignees

                      No one assigned

                        Labels

                        No labels
                        No labels

                        Type

                        No type

                        Projects

                        No projects

                          Milestone

                          No milestone

                          Relationships

                          None yet

                          Development

                          No branches or pull requests

                          Issue actions

                          , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Remove or un-stick sticky/fixed headers that block content\n(function() {\n function unstick() {\n document.querySelectorAll('header, nav, [role=\"banner\"], .header, .navbar, .sticky, .fixed-top, [style*=\"position: fixed\"], [style*=\"position:sticky\"]').forEach(function(el) {\n if (el.style.position === 'fixed' || el.style.position === 'sticky' || \n getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') {\n el.style.position = 'static';\n el.style.top = 'auto';\n el.style.zIndex = 'auto';\n }\n });\n }\n \n unstick();\n \n var observer = new MutationObserver(unstick);\n observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] });\n})();", "Kill Sticky Headers"); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + '
                          Skip to content
                          This repository was archived by the owner on Apr 19, 2026. It is now read-only.
                          This repository was archived by the owner on Apr 19, 2026. It is now read-only.

                          .Create causes SIGABRT crash #27

                          Description

                          @ruby0x1

                          I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
                          I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

                          The following line causes the crash, but only after it returns:
                          service = builder.Create(conf);

                          If I don't call create (but configure everything before it) it continues without issue.

                          Possibly relevant information:

                          • I am running a Nexus 5x, Android 6.0.1 (latest updates)
                          • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
                          • Building with gradle/android studio
                            • using compile 'com.google.android.gms:play-services:8.4.0'
                            • I don't have any apply lines related to the play services
                          • I am using SDL 2.0.4 stable as the basis of the app
                          • The app ID is set up and configured on the developer console
                          • checkJNI is enabled
                          • I use JNI_OnLoad initialization

                          The code below is a bit verbose because I have been trying to debug this a while.

                          static std::unique_ptr< ::gpg::GameServices> service;
                          void init() {
                          if(service == nullptr) {
                          LOGI("INIT JVM:%p", jvm);
                          JNIEnv* env;
                          int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
                          if (state == JNI_EDETACHED) {
                          LOGI("INIT: GetEnv: not attached, attaching ... ");
                          if (jvm->AttachCurrentThread(&env, NULL) != 0) {
                          LOGI("INIT: GetEnv: FAILED TO ATTACH");
                          } else {
                          LOGI("INIT: GetEnv: ATTACHED OK");
                          }
                          } else if (state == JNI_OK) {
                          LOGI("INIT: GetEnv: JNI_OK");
                          } else if (state == JNI_EVERSION) {
                          LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
                          }
                          LOGI("INIT ENV:%p", env);
                          jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
                          jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
                          jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
                          jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
                          jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
                          ::gpg::AndroidPlatformConfiguration conf;
                          conf.SetActivity(globalactivity);
                          ::gpg::GameServices::Builder builder;
                          builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
                          builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
                          LOGI("OnAuthActionStarted");
                          });
                          builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
                          LOGI("AuthActionFinished, status: %d", status);
                          });
                          service = builder.Create(conf);
                          LOGI("INIT: DONE");
                          } //service != null
                          } //init
                          

                          I have explicitly added the getActivity function to check that it was sane.
                          The selfActivity instance is set inside of onCreate.

                           public static Activity getActivity() {
                          Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
                          return selfActivity;
                          }
                          

                          And finally, here is the logcat output at the time of the crash.
                          In case it's not clear:
                          GPG = the native code above
                          app = C++ code of the app, from a touch event (happens no matter where I call from)
                          APP = java code of the app

                          I app : touch released, GPG not inited, calling init()
                          I GPG : INIT JVM:0xf4ebc000
                          I GPG : INIT: GetEnv: JNI_OK
                          I GPG : INIT ENV:0xeb311e40
                          I GPG : local class 0x200005
                          I GPG : global class 0x706
                          I GPG : mid 0xf08730c8
                          I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
                          I GPG : local activity 0x200009
                          I GPG : global activity 0x70a
                          V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
                          W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
                          I GPG : INIT: DONE
                          I app : touch released, done
                          F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
                          F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
                          F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
                          F DEBUG : Revision: 'rev_1.0'
                          F DEBUG : ABI: 'arm'
                          F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
                          F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
                          W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
                          F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
                          F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
                          F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
                          F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
                          F DEBUG : F DEBUG : backtrace:
                          F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
                          F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
                          F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
                          F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
                          F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
                          F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
                          F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
                          F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
                          F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
                          F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
                          F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
                          F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
                          F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
                          E DEBUG : AM write failed: Broken pipe
                          I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                          W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                          I Zygote : Process 29111 exited due to signal (6)
                          

                          Debugging via Android studio with NDK debugging yields minimal help,
                          Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

                          Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

                          I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

                          Any help is appreciated!

                          Metadata

                          Metadata

                          Assignees

                          No one assigned

                            Labels

                            No labels
                            No labels

                            Type

                            No type

                            Projects

                            No projects

                              Milestone

                              No milestone

                              Relationships

                              None yet

                              Development

                              No branches or pull requests

                              Issue actions

                              , 'i'); if (__m === '*' || __re.test(location.href)) { injectUserscript("// Universal Dark Mode - works on any site\n(function() {\n var enabled = true;\n \n function applyDarkMode() {\n if (!enabled) return;\n \n // Create style element if it doesn't exist\n var style = document.getElementById('universal-dark-mode-style');\n if (!style) {\n style = document.createElement('style');\n style.id = 'universal-dark-mode-style';\n document.head.appendChild(style);\n }\n \n // Dark mode CSS - inverts colors but preserves images/video\n style.textContent = '\n /* Invert everything except media */\n html {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #1a1a2e !important;\n }\n \n /* Restore images, videos, iframes, canvas */\n img, video, iframe, canvas, svg, picture, [style*=\"background-image\"] {\n filter: invert(1) hue-rotate(180deg) !important;\n }\n \n /* Preserve specific elements that should not be inverted */\n .no-dark-mode, .no-dark-mode *,\n [data-theme=\"light\"], [data-theme=\"light\"],\n .ace_editor, .ace_editor *,\n .CodeMirror, .CodeMirror *,\n .monaco-editor, .monaco-editor *,\n .markdown-body pre, .markdown-body pre *,\n .highlight, .highlight *,\n pre code, pre code * {\n filter: none !important;\n }\n \n /* Fix common UI elements */\n .modal, .popup, .dropdown-menu, .tooltip, .popover {\n filter: invert(1) hue-rotate(180deg) !important;\n background: #2d2d44 !important;\n border-color: #444 !important;\n }\n \n /* Scrollbars */\n ::-webkit-scrollbar { background: #1a1a2e !important; }\n ::-webkit-scrollbar-thumb { background: #444 !important; }\n ::-webkit-scrollbar-thumb:hover { background: #555 !important; }\n \n /* Selection */\n ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; }\n ';\n }\n \n function removeDarkMode() {\n var style = document.getElementById('universal-dark-mode-style');\n if (style) style.remove();\n }\n \n // Toggle with Alt+Shift+D\n document.addEventListener('keydown', function(e) {\n if (e.altKey && e.shiftKey && e.key === 'D') {\n e.preventDefault();\n enabled = !enabled;\n if (enabled) {\n applyDarkMode();\n console.log('[Universal Dark Mode] Enabled');\n } else {\n removeDarkMode();\n console.log('[Universal Dark Mode] Disabled');\n }\n }\n });\n \n // Apply on load\n applyDarkMode();\n \n // Re-apply on dynamic content\n var observer = new MutationObserver(function(mutations) {\n if (enabled && !document.getElementById('universal-dark-mode-style')) {\n applyDarkMode();\n }\n });\n observer.observe(document.head, { childList: true });\n \n console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle');\n})();", "Universal Dark Mode"); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })();
                              Skip to content
                              This repository was archived by the owner on Apr 19, 2026. It is now read-only.
                              This repository was archived by the owner on Apr 19, 2026. It is now read-only.

                              .Create causes SIGABRT crash #27

                              Description

                              @ruby0x1

                              I've been trying out the SDK, but have ended up stuck with a hard to debug crash.
                              I would have filed this on the SDK repo but there isn't one, so this is the next best option since I'm using the code here as direct reference :)

                              The following line causes the crash, but only after it returns:
                              service = builder.Create(conf);

                              If I don't call create (but configure everything before it) it continues without issue.

                              Possibly relevant information:

                              • I am running a Nexus 5x, Android 6.0.1 (latest updates)
                              • Building on NDK r10e, SDK is up to date, compileSdkVersion 23
                              • Building with gradle/android studio
                                • using compile 'com.google.android.gms:play-services:8.4.0'
                                • I don't have any apply lines related to the play services
                              • I am using SDL 2.0.4 stable as the basis of the app
                              • The app ID is set up and configured on the developer console
                              • checkJNI is enabled
                              • I use JNI_OnLoad initialization

                              The code below is a bit verbose because I have been trying to debug this a while.

                              static std::unique_ptr< ::gpg::GameServices> service;
                              void init() {
                              if(service == nullptr) {
                              LOGI("INIT JVM:%p", jvm);
                              JNIEnv* env;
                              int state = jvm->GetEnv(reinterpret_cast<void**>(&env), JNI_VERSION_1_6);
                              if (state == JNI_EDETACHED) {
                              LOGI("INIT: GetEnv: not attached, attaching ... ");
                              if (jvm->AttachCurrentThread(&env, NULL) != 0) {
                              LOGI("INIT: GetEnv: FAILED TO ATTACH");
                              } else {
                              LOGI("INIT: GetEnv: ATTACHED OK");
                              }
                              } else if (state == JNI_OK) {
                              LOGI("INIT: GetEnv: JNI_OK");
                              } else if (state == JNI_EVERSION) {
                              LOGI("INIT: GetEnv: JNI_EVERSION: version not supported");
                              }
                              LOGI("INIT ENV:%p", env);
                              jclass localclass = env->FindClass("org/snowkit/snowbasic/AppActivity"); LOGI("local class %p",localclass);
                              jclass globalclass = reinterpret_cast<jclass>(env->NewGlobalRef(localclass)); LOGI("global class %p",globalclass);
                              jmethodID mid = env->GetStaticMethodID(globalclass, "getActivity","()Landroid/app/Activity;"); LOGI("mid %p",mid);
                              jobject localactivity = env->CallStaticObjectMethod(globalclass, mid); LOGI("local activity %p",localactivity);
                              jobject globalactivity = reinterpret_cast<jobject>(env->NewGlobalRef(localactivity)); LOGI("global activity %p",globalactivity);
                              ::gpg::AndroidPlatformConfiguration conf;
                              conf.SetActivity(globalactivity);
                              ::gpg::GameServices::Builder builder;
                              builder.SetDefaultOnLog(::gpg::LogLevel::VERBOSE);
                              builder.SetOnAuthActionStarted([&](::gpg::AuthOperation op) {
                              LOGI("OnAuthActionStarted");
                              });
                              builder.SetOnAuthActionFinished([&](::gpg::AuthOperation op, ::gpg::AuthStatus status) {
                              LOGI("AuthActionFinished, status: %d", status);
                              });
                              service = builder.Create(conf);
                              LOGI("INIT: DONE");
                              } //service != null
                              } //init
                              

                              I have explicitly added the getActivity function to check that it was sane.
                              The selfActivity instance is set inside of onCreate.

                               public static Activity getActivity() {
                              Log.i("APP",">>>>>>>>/ Get Activity / " + selfActivity);
                              return selfActivity;
                              }
                              

                              And finally, here is the logcat output at the time of the crash.
                              In case it's not clear:
                              GPG = the native code above
                              app = C++ code of the app, from a touch event (happens no matter where I call from)
                              APP = java code of the app

                              I app : touch released, GPG not inited, calling init()
                              I GPG : INIT JVM:0xf4ebc000
                              I GPG : INIT: GetEnv: JNI_OK
                              I GPG : INIT ENV:0xeb311e40
                              I GPG : local class 0x200005
                              I GPG : global class 0x706
                              I GPG : mid 0xf08730c8
                              I APP : >>>>>>>>/ Get Activity / org.snowkit.snowbasic.AppActivity@640263b
                              I GPG : local activity 0x200009
                              I GPG : global activity 0x70a
                              V GamesNativeSDK: Using classes from /data/user/0/org.snowkit.snowbasic/app_.gpg.classloader/7756dc0d15d18341bd94e20177d1a3f8.jar.
                              W PopupManager: You have not specified a View to use as content view for popups. Falling back to the Activity content view. Note that this may not work as expected in multi-screen environments
                              I GPG : INIT: DONE
                              I app : touch released, done
                              F libc : Fatal signal 6 (SIGABRT), code -6 in tid 29282 (SDLThread)
                              F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
                              F DEBUG : Build fingerprint: 'google/bullhead/bullhead:6.0.1/MMB29K/2419427:user/release-keys'
                              F DEBUG : Revision: 'rev_1.0'
                              F DEBUG : ABI: 'arm'
                              F DEBUG : pid: 29111, tid: 29282, name: SDLThread >>> org.snowkit.snowbasic <<<
                              F DEBUG : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
                              W debuggerd: type=1400 audit(0.0:3326): avc: denied { search } for name="org.snowkit.snowbasic" dev="dm-2" ino=1545295 scontext=u:r:debuggerd:s0 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=0
                              F DEBUG : r0 00000000 r1 00007262 r2 00000006 r3 dcdef978
                              F DEBUG : r4 dcdef980 r5 dcdef930 r6 00000000 r7 0000010c
                              F DEBUG : r8 eefbf980 r9 eefbe680 sl dccf1000 fp e044d520
                              F DEBUG : ip 00000006 sp dcdef888 lr f6e24f85 pc f6e27374 cpsr 400e0010
                              F DEBUG : F DEBUG : backtrace:
                              F DEBUG : #00 pc 00042374 /system/lib/libc.so (tgkill+12)
                              F DEBUG : #01 pc 0003ff81 /system/lib/libc.so (pthread_kill+32)
                              F DEBUG : #02 pc 0001c73f /system/lib/libc.so (raise+10)
                              F DEBUG : #03 pc 000198f1 /system/lib/libc.so (__libc_android_abort+34)
                              F DEBUG : #04 pc 000174b0 /system/lib/libc.so (abort+4)
                              F DEBUG : #05 pc 00679304 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__gnu_cxx::__verbose_terminate_handler()+344)
                              F DEBUG : #06 pc 00631300 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxxabiv1::__terminate(void (*)())+4)
                              F DEBUG : #07 pc 00631340 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (std::terminate()+16)
                              F DEBUG : #08 pc 00631700 /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (__cxa_pure_virtual+24)
                              F DEBUG : #09 pc 0066c53c /data/app/org.snowkit.snowbasic-2/lib/arm/libsnow_basic.so (execute_native_thread_routine+28)
                              F DEBUG : #10 pc 0003f883 /system/lib/libc.so (__pthread_start(void*)+30)
                              F DEBUG : #11 pc 00019f75 /system/lib/libc.so (__start_thread+6)
                              F DEBUG : F DEBUG : Tombstone written to: /data/tombstones/tombstone_01
                              E DEBUG : AM write failed: Broken pipe
                              I WindowState: WIN DEATH: Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                              W WindowManager: Force-removing child win Window{13cdf65 u0 SurfaceView} from container Window{8961fdf u0 org.snowkit.snowbasic/org.snowkit.snowbasic.AppActivity}
                              I Zygote : Process 29111 exited due to signal (6)
                              

                              Debugging via Android studio with NDK debugging yields minimal help,
                              Because it's an abort, I can't get lldb or gdb (via android studio or otherwise) to break properly once it triggers. All other stepping through prior is fine until it does, but the code reaches the end of it's execution before crashing (note the code prints done from inside the app on return of the init call).

                              Due to the nature of the abort it also makes it difficult to search for help, and all the common thread related issues are (or should be) accounted for above.

                              I have noticed this verbose log in other peoples issues on this repo: V/GamesNativeSDK(12369): Attached to JVM on thread 1927939016 but I never see this in my logcat, the only line from the sdk is the above one about the jar file.

                              Any help is appreciated!

                              Metadata

                              Metadata

                              Assignees

                              No one assigned

                                Labels

                                No labels
                                No labels

                                Type

                                No type

                                Projects

                                No projects

                                  Milestone

                                  No milestone

                                  Relationships

                                  None yet

                                  Development

                                  No branches or pull requests

                                  Issue actions