asd
2018-05-18 06:55:23 UTC
Hello,
I am seeing a fatal error shortly after initialising my gpg::GameServices
instance, with no obvious cause.
I am using a normal Java Activity, and during JNI_OnLoad I am calling:
void GPG_JNI_OnLoad(JavaVM *vm){
gpg::AndroidInitialization::JNI_OnLoad(vm);}
Afterwards, I initialise the GameServices instance without issue:
static std::unique_ptr<gpg::GameServices> s_gpgService;
void InitGPG(jobject activity){
// configure gpg
gpg::AndroidPlatformConfiguration platConfig;
platConfig.SetActivity(activity);
assert(platConfig.Valid());
s_gpgService = gpg::GameServices::Builder()
.SetDefaultOnLog(gpg::LogLevel::VERBOSE)
.SetOnAuthActionStarted([](gpg::AuthOperation op)
{
})
.SetOnAuthActionFinished([](gpg::AuthOperation op, gpg::AuthStatus status)
{
})
.SetOnMultiplayerInvitationEvent([](gpg::MultiplayerEvent evntIn, std::string match_id, gpg::MultiplayerInvitation invitation)
{
})
.SetOnLog([](gpg::LogLevel logLevel, const std::string & msg)
{
Log("%s", msg.c_str());
})
.Create(platConfig);
assert(s_gpgService);}
Shortly afterwards, I receive a callback for SetOnAuthActionStarted, and
then for SetOnAuthActionFinished (I am not signed into my device, so
authorisation fails as expected). I also see this in logcat:
05-17 12:26:33.401 32752 934 I abc : Connecting to Google Play...05-17 12:26:33.462 32752 934 I abc : UI interaction required to connect to Google Play.
Shortly after that, I receive the following crashdump:
05-17 13:21:57.814 3023 3086 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4d8 in tid 3086 (main_dispatch), pid 3023 (main)05-17 13:21:57.886 3098 3098 W crash_dump32: type=1400 audit(0.0:78584): avc: denied { search } for name="com.myapp" dev="sda13" ino=787595 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=005-17 13:21:57.957 3098 3098 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone05-17 13:21:57.959 1011 1011 I /system/bin/tombstoned: received crash request for pid 302305-17 13:21:57.961 3098 3098 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***05-17 13:21:57.961 3098 3098 F DEBUG : Build fingerprint: 'google/taimen/taimen:8.1.0/OPM1.171019.021/4565141:user/release-keys'05-17 13:21:57.962 3098 3098 F DEBUG : Revision: 'rev_10'05-17 13:21:57.962 3098 3098 F DEBUG : ABI: 'arm'05-17 13:21:57.962 3098 3098 F DEBUG : pid: 3023, tid: 3086, name: main_dispatch >>> com.myapp <<<05-17 13:21:57.962 3098 3098 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4d805-17 13:21:57.962 3098 3098 F DEBUG : Cause: null pointer dereference05-17 13:21:57.962 3098 3098 F DEBUG : r0 000004d8 r1 00000068 r2 fffff855 r3 0000005805-17 13:21:57.962 3098 3098 F DEBUG : r4 000004d8 r5 c7b23488 r6 c74dd360 r7 c748000005-17 13:21:57.962 3098 3098 F DEBUG : r8 00000000 r9 c7b23488 sl f4d31da8 fp 0000000405-17 13:21:57.962 3098 3098 F DEBUG : ip f4d2b624 sp c34b08a8 lr f4cf2b09 pc f4ce1f4e cpsr 0007003005-17 13:21:57.965 3098 3098 F DEBUG : 05-17 13:21:57.965 3098 3098 F DEBUG : backtrace:05-17 13:21:57.965 3098 3098 F DEBUG : #00 pc 00047f4e /system/lib/libc.so (pthread_mutex_lock+1)05-17 13:21:57.965 3098 3098 F DEBUG : #01 pc 00058b05 /system/lib/libc.so (je_arena_dalloc_small+68)05-17 13:21:57.965 3098 3098 F DEBUG : #02 pc 0006be81 /system/lib/libc.so (ifree+468)05-17 13:21:57.965 3098 3098 F DEBUG : #03 pc 0006c107 /system/lib/libc.so (je_free+70)05-17 13:21:57.965 3098 3098 F DEBUG : #04 pc 00047d19 /system/lib/libc.so (pthread_key_clean_all()+100)05-17 13:21:57.965 3098 3098 F DEBUG : #05 pc 0004799b /system/lib/libc.so (pthread_exit+44)05-17 13:21:57.965 3098 3098 F DEBUG : #06 pc 000478d9 /system/lib/libc.so (__pthread_start(void*)+24)05-17 13:21:57.965 3098 3098 F DEBUG : #07 pc 0001b341 /system/lib/libc.so (__start_thread+32)
If I do not initialise the GamesServices object, then I do not receive the
crash.
It looks like the thread that Google Play Games is running on is shutting
down, but in trying to free thread-local storage, causes an error.
I am building using:
- Could anyone offer some guidance on what might be causing this?
- jdk 1.8
- ndk r15
- android 21
- gradle 2.8
- gpg c++ 3.0
- gpg 15.0.1
from command line, and including gpg like this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
}}
dependencies {
compile ('com.google.android.gms:play-services-games:15.0.1')
compile ('com.google.android.gms:play-services-nearby:15.0.1')}
I am seeing a fatal error shortly after initialising my gpg::GameServices
instance, with no obvious cause.
I am using a normal Java Activity, and during JNI_OnLoad I am calling:
void GPG_JNI_OnLoad(JavaVM *vm){
gpg::AndroidInitialization::JNI_OnLoad(vm);}
Afterwards, I initialise the GameServices instance without issue:
static std::unique_ptr<gpg::GameServices> s_gpgService;
void InitGPG(jobject activity){
// configure gpg
gpg::AndroidPlatformConfiguration platConfig;
platConfig.SetActivity(activity);
assert(platConfig.Valid());
s_gpgService = gpg::GameServices::Builder()
.SetDefaultOnLog(gpg::LogLevel::VERBOSE)
.SetOnAuthActionStarted([](gpg::AuthOperation op)
{
})
.SetOnAuthActionFinished([](gpg::AuthOperation op, gpg::AuthStatus status)
{
})
.SetOnMultiplayerInvitationEvent([](gpg::MultiplayerEvent evntIn, std::string match_id, gpg::MultiplayerInvitation invitation)
{
})
.SetOnLog([](gpg::LogLevel logLevel, const std::string & msg)
{
Log("%s", msg.c_str());
})
.Create(platConfig);
assert(s_gpgService);}
Shortly afterwards, I receive a callback for SetOnAuthActionStarted, and
then for SetOnAuthActionFinished (I am not signed into my device, so
authorisation fails as expected). I also see this in logcat:
05-17 12:26:33.401 32752 934 I abc : Connecting to Google Play...05-17 12:26:33.462 32752 934 I abc : UI interaction required to connect to Google Play.
Shortly after that, I receive the following crashdump:
05-17 13:21:57.814 3023 3086 F libc : Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4d8 in tid 3086 (main_dispatch), pid 3023 (main)05-17 13:21:57.886 3098 3098 W crash_dump32: type=1400 audit(0.0:78584): avc: denied { search } for name="com.myapp" dev="sda13" ino=787595 scontext=u:r:crash_dump:s0:c512,c768 tcontext=u:object_r:app_data_file:s0:c512,c768 tclass=dir permissive=005-17 13:21:57.957 3098 3098 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone05-17 13:21:57.959 1011 1011 I /system/bin/tombstoned: received crash request for pid 302305-17 13:21:57.961 3098 3098 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***05-17 13:21:57.961 3098 3098 F DEBUG : Build fingerprint: 'google/taimen/taimen:8.1.0/OPM1.171019.021/4565141:user/release-keys'05-17 13:21:57.962 3098 3098 F DEBUG : Revision: 'rev_10'05-17 13:21:57.962 3098 3098 F DEBUG : ABI: 'arm'05-17 13:21:57.962 3098 3098 F DEBUG : pid: 3023, tid: 3086, name: main_dispatch >>> com.myapp <<<05-17 13:21:57.962 3098 3098 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4d805-17 13:21:57.962 3098 3098 F DEBUG : Cause: null pointer dereference05-17 13:21:57.962 3098 3098 F DEBUG : r0 000004d8 r1 00000068 r2 fffff855 r3 0000005805-17 13:21:57.962 3098 3098 F DEBUG : r4 000004d8 r5 c7b23488 r6 c74dd360 r7 c748000005-17 13:21:57.962 3098 3098 F DEBUG : r8 00000000 r9 c7b23488 sl f4d31da8 fp 0000000405-17 13:21:57.962 3098 3098 F DEBUG : ip f4d2b624 sp c34b08a8 lr f4cf2b09 pc f4ce1f4e cpsr 0007003005-17 13:21:57.965 3098 3098 F DEBUG : 05-17 13:21:57.965 3098 3098 F DEBUG : backtrace:05-17 13:21:57.965 3098 3098 F DEBUG : #00 pc 00047f4e /system/lib/libc.so (pthread_mutex_lock+1)05-17 13:21:57.965 3098 3098 F DEBUG : #01 pc 00058b05 /system/lib/libc.so (je_arena_dalloc_small+68)05-17 13:21:57.965 3098 3098 F DEBUG : #02 pc 0006be81 /system/lib/libc.so (ifree+468)05-17 13:21:57.965 3098 3098 F DEBUG : #03 pc 0006c107 /system/lib/libc.so (je_free+70)05-17 13:21:57.965 3098 3098 F DEBUG : #04 pc 00047d19 /system/lib/libc.so (pthread_key_clean_all()+100)05-17 13:21:57.965 3098 3098 F DEBUG : #05 pc 0004799b /system/lib/libc.so (pthread_exit+44)05-17 13:21:57.965 3098 3098 F DEBUG : #06 pc 000478d9 /system/lib/libc.so (__pthread_start(void*)+24)05-17 13:21:57.965 3098 3098 F DEBUG : #07 pc 0001b341 /system/lib/libc.so (__start_thread+32)
If I do not initialise the GamesServices object, then I do not receive the
crash.
It looks like the thread that Google Play Games is running on is shutting
down, but in trying to free thread-local storage, causes an error.
I am building using:
- Could anyone offer some guidance on what might be causing this?
- jdk 1.8
- ndk r15
- android 21
- gradle 2.8
- gpg c++ 3.0
- gpg 15.0.1
from command line, and including gpg like this:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.2.3'
}}
allprojects {
repositories {
maven {
url 'https://maven.google.com'
}
}}
dependencies {
compile ('com.google.android.gms:play-services-games:15.0.1')
compile ('com.google.android.gms:play-services-nearby:15.0.1')}
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/77817ab1-32ff-4464-8e16-cd1b26862db0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/77817ab1-32ff-4464-8e16-cd1b26862db0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.