Skip to content

App crash :Cause: null pointer dereference #1155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
iningwei opened this issue Oct 8, 2021 · 2 comments
Closed

App crash :Cause: null pointer dereference #1155

iningwei opened this issue Oct 8, 2021 · 2 comments

Comments

@iningwei
Copy link

iningwei commented Oct 8, 2021

[REQUIRED] Please fill in the following fields:

  • Unity editor version: 2020.3.0f1
  • Firebase Unity SDK version: 8.3.0
  • Source you installed the SDK: .unitypackage
  • Problematic Firebase Component: FirebaseMessaging
  • Other Firebase Components in use: FirebaseAnalytics
  • Additional SDKs you are using: No
  • Platform you are using the Unity editor on: Windows
  • Platform you are targeting: Android
  • Scripting Runtime:IL2CPP

[REQUIRED] Please describe the issue here:

App crashes, stack trace as follows:
2021-10-08 18:33:26.243 1653-1727/? E/AndroidRuntime: FATAL EXCEPTION: UnityMain
Process: com.tj.sgame, PID: 1653
java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2020.3.0f1 (c7b5465681fb)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'armeabi-v7a'
Build fingerprint: 'Redmi/dandelion/dandelion:10/QP1A.190711.020/V12.0.13.0.QCDCNXM:user/release-keys'
Revision: '0'
ABI: 'arm'
Timestamp: 2021-10-08 18:33:25+0800
pid: 1653, tid: 1906, name: Thread-6 >>> com.tj.sgame <<<
uid: 10328
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
Cause: null pointer dereference
r0 00000004 r1 a67403c8 r2 00000004 r3 a6740411
r4 00000000 r5 a67403c8 r6 a67403c8 r7 00000004
r8 a6740411 r9 cae1c518 r10 00000004 r11 00000000
ip a6977c64 sp a6740358 lr a68a575f pc ec3cdaea
backtrace:
#00 pc 000a6aea /apex/com.android.runtime/lib/bionic/libc.so (pthread_mutex_lock+6) (BuildId: af31ec96b35fedca378e07659b30896c)
#1 pc 0016075b /data/app/com.tj.sgame-Kv8VLP-eFvtV9_GhowUt_A==/lib/arm/libFirebaseCppApp-8_3_0.so (firebase::Mutex::Acquire()+2) (BuildId: 2c21ad884429159a0aac3a7344d9d016)
#2 pc 00163eed /data/app/com.tj.sgame-Kv8VLP-eFvtV9_GhowUt_A==/lib/arm/libFirebaseCppApp-8_3_0.so (void firebase::ReferenceCountedFutureImpl::CompleteInternal<std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator >, void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > >(firebase::FutureHandle const&, int, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&)::'lambda'(std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator >)>(firebase::FutureHandle const&, int, char const, void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > >(firebase::FutureHandle const&, int, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, ...
#3 pc 00163ecd /data/app/com.tj.sgame-Kv8VLP-eFvtV9_GhowUt_A==/lib/arm/libFirebaseCppApp-8_3_0.so (void firebase::ReferenceCountedFutureImpl::CompleteWithResultInternal<std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > >(firebase::FutureHandle const&, int, char const*, std::__ndk1::basic_string<char, std::__ndk1::char_traits, std::__ndk1::allocator > const&)+32) (BuildId: 2c21ad884429159a0aac3a7344d9d016)
#4 pc 001b74ad /data/app/com.tj.sgame-Kv8VLP-eFvtV9_GhowUt_A==/lib/arm/libFirebaseCppApp-8_3_0.so (firebase::messaging::CompleteStringCallback(_JNIEnv*, _jobject*, firebase::util::FutureResult, char const*, void*)+96) (BuildId: 2c21ad884429159a0aac3a7344d9d016)
#5 pc 001c89e9 /data/app/com.tj.sgame-Kv8VLP-eFvtV9_GhowUt_A==/lib/arm/libFirebaseCppApp-8_3_0.so (firebase::util::JniResultCallback_nativeOnResult(_JNIEnv*, _jobject*, _jobject*, unsigned char, unsigned char, _jstring*, long long, long long)+116) (BuildId: 2c21ad884429159a0aac3a7344d9d016)
#6 pc 000dc519 /apex/com.android.runtime/lib/libart.so (art_quick_generic_jni_trampoline+40) (BuildId: 04997b3570c346f812675714d1681c80)
#7 pc 000d7bc5 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub_internal+68) (BuildId: 04997b3570c346f812675714d1681c80)
#8 pc 0042e457 /apex/com.android.runtime/lib/libart.so (art_quick_invoke_stub+250) (BuildId: 04997b3570c346f812675714d1681c80)
#9 pc 000dffb7 /apex/com.android.runtime/lib/libart.so (art::ArtMethod::Invoke(art::Thread*, unsigned int*, unsigned int, art::JValue*, char const*)+174) (BuildId: 04997b3570c346f812675714d1681c80)

Steps to reproduce:

After lots test i can get some clues:
step1:install app, close vpn, after app launchs it crashed and error logs as upper shown. Launch app again,and it crashed either.
step2:open vpn, launch app, now the app not crash and get fcm token success.
step3:close vpn, launch app, not crash.
Judge from step2 and step3 ,i guess while the app try to get token from server, if i do not open vpn ,it crashed.After get token, it will not get token again,so step3 not crash.

I am living in a country where google url is banned, so we need vpn to use google products.

Have you been able to reproduce this issue with just the Firebase Unity quickstarts (this GitHub project)?
What's the issue repro rate? (eg 100%, 1/5 etc)

What happened? How can we make the problem occur?
May be you can use a web which can not directly connect google urls.

If you have a downloadable sample project that reproduces the bug you're reporting, you will
likely receive a faster response on your issue.

Relevant Code:

@paulinon
Copy link
Contributor

paulinon commented Oct 8, 2021

Hi @iningwei,

I understand that using a VPN is essential for you to use Firebase. Unfortunately there's really nothing Google can do here. The services mentioned are working normally, and we have no control over access to Google from your country.

@paulinon paulinon closed this as completed Oct 8, 2021
@iningwei
Copy link
Author

iningwei commented Oct 9, 2021

Hi @iningwei,

I understand that using a VPN is essential for you to use Firebase. Unfortunately there's really nothing Google can do here. The services mentioned are working normally, and we have no control over access to Google from your country.

Yes。But if i do not use vpn the app will crash when fetching fcm token。So i guess some errors occur while can not access google in your sdk。

@firebase firebase locked and limited conversation to collaborators Nov 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants