Android FreeRDP SIGSEGV crash on samsung device - android

We have integrated FreeRDP in android application. Some of the devices like Samsung, We are getting SIGSEGV & SIGABRT crashes randomly. These are not reproducible issues and logs are not showing any specific method that causing the issue.
I am posting some logs here. Could you please let me know if anyone has any idea about this?
Crash reason: SIGSEGV
Crash address: 0x0
Process uptime: not available
Thread 195 (crashed)
0 libfreerdp2.so + 0x20ef0
r0 = 0x00000000 r1 = 0x00000000 r2 = 0x00000000 r3 = 0x00000000
r4 = 0x8401c380 r5 = 0xb0800f6d r6 = 0xbb7fc920 r7 = 0x00000078
r8 = 0x09f7b70c r9 = 0x09f7b6e0 r10 = 0x8ed55cc8 r12 = 0xb0842600
fp = 0xbb7fc7ec sp = 0xbb7fc7d8 lr = 0x8ebde450 pc = 0x8ebd8ef0
Found by: given as instruction pointer in context
1 libc.so + 0x47f6b
sp = 0xbb7fc7e4 pc = 0xb0800f6d
Found by: stack scanning

Related

Unity Android app crashes after splash screen with Google Play Services for AR update (after April 11th 2020)

I'm working collaboratively on an Android app that uses AR Foundation. From one day to another (without making new builds) the app started to crash after the splash screen, every time. I'm working on my Huawei Mate 20 Pro, but my teammates use other Android phones (Samsung, Xiaomi and Motorola) and they continued to develop the app, and it works just fine for them. I pull their commits (which work for them), make no changes, and it keeps crashing on my phone. We are using Firebase so I have the info from Crashlytics, but I can't quiet understand it:
Unity version is 2019.4.8f1 LTS, and the Huawei phone runs on Android 10.
The complete crash log is:
Caused by java.lang.Error
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2019.4.8f1 (60781d942082)', Build type 'Release', Scripting Backend 'mono', CPU 'armeabi-v7a'
Build fingerprint: 'HUAWEI/LYA-L29/HWLYA:10:user/release-keys' Revision: '0' ABI: 'arm'
Timestamp: 2020-08-13 14:12:37-0300 pid: 3571, tid: 3777,
name: UnityMain >>> com.app.name <<<
uid: 10315 signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference r0 00000000 r1 00000000 r2 00000000 r3 00000000 r4 a965d490 r5 bd74a87c r6 80808080 r7 00000000 r8 be98f540 r9 00000000 r10 00000000 r11 b2f15f60 ip b2f4cc90 sp bd74a878 lr b2f1e859 pc 00000000
managed backtrace: #00 (wrapper managed-to-native)
UnityEngine.XR.ARCore.ARCoreSessionSubsystem/NativeApi:UnityARCore_session_update (UnityEngine.ScreenOrientation,UnityEngine.Vector2Int,intptr,UnityEngine.XR.ARSubsystems.Feature) #01
UnityEngine.XR.ARCore.ARCoreSessionSubsystem/ARCoreProvider:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams,UnityEngine.XR.ARSubsystems.Configuration) <0xef> #02
UnityEngine.XR.ARSubsystems.XRSessionSubsystem:Update (UnityEngine.XR.ARSubsystems.XRSessionUpdateParams) <0x1d3> #03
UnityEngine.XR.ARFoundation.ARSession:Update () <0x157> #04
(wrapper runtime-invoke) object:runtime_invoke_void__this__ (object,intptr,intptr,intptr)
UPDATE
I've managed to narrow down the crash to the following lines of code, inside the Update of ARSession script:
void Update()
{
if (subsystem?.running == true)
{
m_TrackingMode = subsystem.requestedTrackingMode.ToTrackingMode();
if (subsystem.matchFrameRateEnabled)
{
Application.targetFrameRate = subsystem.frameRate;
QualitySettings.vSyncCount = 0;
}
//subsystem.Update(new XRSessionUpdateParams
//{
// screenOrientation = Screen.orientation,
// screenDimensions = new Vector2Int(Screen.width, Screen.height)
//});
switch (subsystem.trackingState)
{
case TrackingState.None:
case TrackingState.Limited:
state = ARSessionState.SessionInitializing;
break;
case TrackingState.Tracking:
state = ARSessionState.SessionTracking;
break;
}
}
}
With those commented lines, the app starts but the camera won't work. If I uncomment them, it crashes. I know the problem is there because I placed a:
UnityEngine.Handheld.Vibrate();
Before and after, and the phone only vibrates once.
I updated the question's title because the problem is caused by an issue in the update of Google Play Services for AR. I managed to make my app work by manually downloading an older version of Google Play Services for AR, following the instructions here.
You can track the issue I opened in the ARCore Unity SDK repo here

Crash on Androind signal 11 SIGSEGV, code 1 SEGV_MAPERR (Unity 5.6.0f3)

I'm developing the game on Unity 5.6.0f3 and I'm facing the problem with some Android devices. This crash reproduces not on every android device, but on soma of them, like this: LG Optimus L7II, LG Magna, LG Leon, Lenovo A680, Lenovo P780, Lenovo S580, Lenovo A3300, Lenovo S850, Lenovo A2010-a, ZenFone 5 (A502CG), ZenPad C 7.0 (Z170CG), HUAWEI Y3II, HUAWEI Y635-L01.
This crash occurs when my app is in background. This is it:
Caused by java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR),
fault addr 000000f0
Build fingerprint: 'Huawei/Y635-L01/hwY635:4.4.4/HuaweiY635-
L01/C21B131:user/ota-rel-keys,release-keys'
Revision: '0'
pid: 25582, tid: 25635, name: Thread-2988 >>> com.rmg.farmclicker <<<
r0 00000000 r1 6c0b30bb r2 696e5500 r3 00000055
r4 622fa90d r5 622fabf0 r6 622fa91d r7 00000000
r8 622fa91d r9 00010668 sl 622fa90d fp 62a61b24
ip ffffffe8 sp 62a61880 lr 617d4e0c pc 617d4c50 cpsr 2d353336
at libunity.004d6c50(Unknown Source)
at libunity.000d7064(Unknown Source)
at libunity.000d8510(Unknown Source)
at libunity.00312fe8(Unknown Source)
at libunity.005ed0c4(Unknown Source)
at libdvm.dvmPlatformInvoke(dvmPlatformInvoke:112)
at libdvm.dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)(dvmCallJNIMethod:398)
at libdvm.00029aa0(Unknown Source)
at libdvm.dvmMterpStd(Thread*)(dvmMterpStd:76)
at libdvm.dvmInterpret(Thread*, Method const*, JValue*)(dvmInterpret:184)
at libdvm.dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)(dvmCallMethodV:336)
at libdvm.dvmCallMethod(Thread*, Method const*, Object*, JValue*, ...)(dvmCallMethod:20)
at libdvm.00058463(Unknown Source)
at libc.__thread_entry(__thread_entry:44)
at libc.pthread_create(pthread_create:316)
I'm using some native libs on C++ in my app and I thing that problem is in them.
I think that code can be the main problem:
#elif ANDROID
struct timespec res;
clock_gettime(CLOCK_MONOTONIC, &res);
std::chrono::milliseconds uptime = std::chrono::milliseconds(static_cast<unsigned long long>(res.tv_sec) * 1000ULL + static_cast<unsigned long long>(res.tv_nsec)/1000000ULL);
return uptime.count();
So please help if you know something about it, thank you;)

Android kernel dump

I am busy in the kernel in Android (which is at least close to Linux).
I understand output of dump_stack() that I sometimes use to trace things. But when there is a kernel error, the dump also appears but there is an extra line Exception stack between the dump.
For curiosity I added a function that accesses NULL. When the resulting NULL dereference error is raised, this is a part of the dump I get:
[<c0055f84>] (unwind_backtrace+0x0/0x138) from [<c0693008>] (panic+0x74/0x194)
[<c0693008>] (panic+0x74/0x194) from [<c0052470>] (die+0x218/0x284)
[<c0052470>] (die+0x218/0x284) from [<c0692df8>] (__do_kernel_fault.part.3+0x60/0x84)
[<c0692df8>] (__do_kernel_fault.part.3+0x60/0x84) from [<c0059d30>] (do_page_fault+0x2cc/0x334)
[<c0059d30>] (do_page_fault+0x2cc/0x334) from [<c0048410>] (do_DataAbort+0x34/0x9c)
[<c0048410>] (do_DataAbort+0x34/0x9c) from [<c004e2d0>] (__dabt_svc+0x70/0xa0)
Exception stack(0xe6901ed8 to 0xe6901f20)
1ec0: 00000001 00000003
1ee0: c081ddf8 00000004 410afc4c 00000005 00000004 c09c9218 e63f6800 e6900000
1f00: 00000000 400a5404 c081ddfb e6901f20 c0321ad0 c0321ad4 20000013 ffffffff
[<c004e2d0>] (__dabt_svc+0x70/0xa0) from [<c0321ad4>] (access_null+0x38/0x30c)
[<c0321ad4>] (access_null+0x38/0x30c) from [<c017692c>] (function_that_calls_access_null+0x50/0x94)
access_null() does the evil access. But the exception stack is not at this function.
What's happening here? What can I do with data in the exception stack section?

Unity Carboard SDK Crash

I make an update including all Cardboard SDK feature into my game https://play.google.com/store/apps/details?id=com.oriongames.spaceshooter
BUT, I found that some Android device (not all, since my Note 2 and editor mode is working perfectly) Crash instantly after the Unity logo.
Here is the repport :
java.lang.Error: FATAL EXCEPTION [UnityMain] Unity version : 5.1.1f1
Device model : samsung SM-T210 Device fingerprint:
samsung/lt02wifixx/lt02wifi:4.1.2/JZO54K/T210XXAMKF:user/release-keys
Caused by: java.lang.Error: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR),
fault addr 6ab6b090 Build fingerprint:
'samsung/lt02wifixx/lt02wifi:4.1.2/JZO54K/T210XXAMKF:user/release-keys'
Revision: '7' pid: 13587, tid: 13600, name: UnityMain >>>
com.oriongames.spaceshooter <<< r0 00000000 r1 00000000 r2 80808080 r3
6ab6b090 r4 6952f800 r5 6ab6a11c r6 5eb20520 r7 6ab6b090 r8 5eb20524
r9 5eb2056c sl 00000328 fp 69530190 ip 6ab5ed60 sp 5eb20500 lr
6a9a1979 pc 400ca174 cpsr 4b34354f
at libc.strlen(strlen:72) at
libvrunity.ion::gfx::GraphicsManager::InitGlInfo()(gfx:136) at
libvrunity.ion::gfx::GraphicsManager::InitFunctions()(gfx:356) at
libvrunity.ion::gfx::GraphicsManager::Init(bool)(gfx:172) at
libvrunity.ion::gfx::GraphicsManager::GraphicsManager()(gfx:6010) at
libvrunity.gvr::VrSessionImpl::InitIonDefaults()(VrSessionImpl:124) at
libvrunity.gvr::CardboardVrSessionFactory::CreateCardboardVrSession(gvr::DisplayMetrics
const&, gvr::VrAppInfo const&, bool, std::function const&,
std::function const&)(CardboardVrSessionFactory:72) at
libvrunity.gvr::CardboardApiImpl::CardboardApiImpl(gvr::DisplayMetrics
const&)(CardboardApiImpl:182) at libvrunity.Start(Start:364) at
Unknown.0000eecc(Unknown Source) at BaseCardboardDevice.Start(Native
Method) at BaseCardboardDevice.Init(<0x00090>:144) at
CardboardAndroidDevice.Init(<0x0001b>:27) at
Cardboard.InitDevice(<0x00073>:115) at Cardboard.Awake(<0x00083>:131)
at Object.runtime_invoke_void__this__(Native Method) at
GameObject.Internal_AddComponentWithType(Native Method) at
GameObject.AddComponent(<0x00024>:36) at
GameObject.AddComponent(<0x0002b>:43) at
Cardboard.get_SDK(<0x000a3>:163) at
CameraManagerVRCardboard.Recenter(<0x00017>:23) at
c__IteratorD.MoveNext(<0x0009f>:159) at
.runtime_invoke_bool__this__(Native Method) at
MonoBehaviour.StartCoroutine(Native Method) at
MonoBehaviour.StartCoroutine(<0x00028>:40) at
CameraManager.changeCameraState(<0x000b3>:179) at
StartMenu.Init(<0x00257>:599) at StartMenu.Start(<0x00043>:67) at
Object.runtime_invoke_void__this__(Native Method) at
libmono.00021bcf(Native Method) at
libmono.mono_runtime_invoke(mono_runtime_invoke:136) at
libunity.002b1e08(Native Method)
The game works again if I simply remove the Cardboard SDK from the game.
I try to changed GPU Skinning and Automatic Graphics API under PlayerPref but nothing works.
Do you have any clue ?
Thanks you !

native crash collection and symbolication

Is there a good way to collect crash dump for crash occurred in native code of an android application and then symbolise that crash dump on desktop machine.
Tried integrating google breakpad and was successful to collect the crash dump. Then tried symbolising the crash stack trace but it was not so useful. There is no filname and line number information available in symbolised crash stack.
Symbolised partial output looks like :
Operating system: Android
0.0.0 Linux 3.4.5-923538 #1 SMP PREEMPT Wed Mar 5 16:20:36 KST 2014 armv7l
CPU: arm
ARMv7 ARM part(0x4100c070) features: swp,half,thumb,fastmult,vfpv2,edsp,neon,vfpv3,tls,vfpv4,idiva,idivt
4 CPUs
Crash reason: SIGSEGV
Crash address: 0x0
Thread 0 (crashed)
0 libctest.so + 0x16dc
r0 = 0x417bba60 r1 = 0x65600019 r2 = 0x00000001 r3 = 0x00000000
r4 = 0x6db6bc18 r5 = 0x417bbfd8 r6 = 0x00000000 r7 = 0x6d753cd4
r8 = 0xbee580f8 r9 = 0x6d753ccc r10 = 0x417bbfe8 r12 = 0x738c76d9
fp = 0xbee5810c sp = 0xbee580f8 lr = 0x417de850 pc = 0x738c76dc
Found by: given as instruction pointer in context
1 dalvik-heap (deleted) + 0x134346
sp = 0xbee58108 pc = 0x42ba5348
Found by: stack scanning
2 libdvm.so + 0x4f28d
sp = 0xbee58110 pc = 0x4180f28f
Found by: stack scanning
3 data#app#com.example.ctest-3.apk#classes.dex + 0x9a3d1
sp = 0xbee58118 pc = 0x778443d3
Found by: stack scanning
4 libctest.so + 0x16d7
sp = 0xbee5811c pc = 0x738c76d9
Found by: stack scanning
5 dalvik-mark-stack (deleted) + 0x2d61017
sp = 0xbee5812c pc = 0x65600019
Found by: stack scanning
6 core.odex + 0x7b6c8
sp = 0xbee58134 pc = 0x6e7d96ca
Is there something which is missing?
Did you dump symbols for libctest.so? The Linux Starter Guide on the Breakpad wiki has information on how to do this. If you don't provide symbols for minidump_stackwalk to use then it can't give you a usable stack.

Categories

Resources