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.
Related
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
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
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?
I'm currently using the Skobbler SDK in an Android app to handle mapping and turn-by-turn direction tasks. One issue that came up was the desire to change to frequency at which audio advice is issued from the SDK so that we don't have too many instructions being fired off one after the other.
I found this answer to another question which explains the need to modify an advice_places.adv file which I was able to find within the SDK provided SKMaps.zip file.
The issue I'm experiencing seems to be related to how I re-archive the zip file once I've finished making changes to the advice_places.adv file. I'm working on a Mac and it seems that regardless of if I use the built-in "Compress..." context menu option or if I perform a zip operation via the command line similar to:
zip -vr SKMaps.zip SKMaps/ -x "*.DS_Store"; chmod +x SKMaps.zip
I still can't seem to load my app without it crashing during the Skobbler SDK map initialization process.
I've narrowed down the issue to it being a zip/unzip related issue since I can recreate the crash even if I don't modify any of the contents of the SKMaps.zip but only unzip and then rezip.
Here is a dump of the logs that I see when my app crashes.
SKMaps D SKMapViewHolder----#onResume
D SKMapSurfaceView----#onResume
D SKMapSurfaceView----#onResume preserve GL context is TRUE
WindowManager V Adding window Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity} at 23 of 32 (before Window{246caca8 u0 SurfaceView})
V Adding window Window{1b0d49f9 u0 SurfaceView} at 23 of 33 (before Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity})
SKMaps D MapRenderer----#onSurfaceCreated
D MapRenderer----#onSurfaceCreated LinInitialized = true
D MapRenderer---- #initGLView
SkobblerNG D set density JNI - before NG_SetScreenScale
D set density JNI - after NG_SetScreenScale
libc F Fatal signal 11 (SIGSEGV), code 1, fault addr 0x4 in tid 24828 (GLThread 44711)
btif_config_util D btif_config_save_file(L188): in file name:/data/misc/bluedroid/bt_config.new
DEBUG I *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I Build fingerprint: 'google/shamu/shamu:5.1/LMY47I/1767468:user/release-keys'
I Revision: '33696'
I ABI: 'arm'
I pid: 24493, tid: 24828, name: GLThread 44711 >>> com.company.mymapapp <<<
I signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x4
I r0 00000001 r1 00000000 r2 00000001 r3 00000029
I r4 a0edfcd0 r5 00000000 r6 a0edfc00 r7 a044a9b0
I r8 00000000 r9 a044a9d8 sl 00000001 fp 13250820
I ip 80000000 sp a044a978 lr 9e8d5efd pc 9e8d5f22 cpsr 600f0030
I backtrace:
I #00 pc 0018ef22 /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (EarthSphere::SetupTextureInBufferFromTex(SK_WTEXTURE_ID&)+113)
I #01 pc 0018ff23 /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (EarthSphere::Init(unsigned int, unsigned int)+190)
I #02 pc 0011dc7d /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (MapRenderer::InitializeGlobeAndWorldTextures()+116)
I #03 pc 000fe1bd /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (NG_InitializeGL+52)
I #04 pc 000e7fcf /data/app/com.company.mymapapp-1/lib/arm/libngnative.so (Java_com_skobbler_ngx_map_MapRenderer_initgl+14)
I #05 pc 0064b963 /data/dalvik-cache/arm/data#app#com.company.mymapapp-1#base.apk#classes.dex
I Tombstone written to: /data/tombstones/tombstone_07
ActivityManager W Force finishing activity 1 com.company.mymapapp/.activities.MainActivity
BootReceiver I Copying /data/tombstones/tombstone_07 to DropBox (SYSTEM_TOMBSTONE)
JavaBinder E !!! FAILED BINDER TRANSACTION !!!
WindowState I WIN DEATH: Window{23adbb9a u0 SurfaceView}
NetlinkEvent E NetlinkEvent::FindParam(): Parameter 'INTERFACE' not found
E NetlinkEvent::FindParam(): Parameter 'TIME_NS' not found
NetdConnector E Error handling '613 IfaceClass active (null)': java.lang.NumberFormatException: Invalid int: "(null)"
WindowState I WIN DEATH: Window{246caca8 u0 SurfaceView}
I WIN DEATH: Window{259e40bc u0 com.company.mymapapp/com.company.mymapapp.activities.IntroActivity}
I WIN DEATH: Window{278f3a43 u0 com.company.mymapapp/com.company.mymapapp.activities.MainActivity}
I WIN DEATH: Window{1b0d49f9 u0 SurfaceView}
Zygote I Process 24493 exited due to signal (11)
ActivityManager W Exception thrown during pause
W android.os.TransactionTooLargeException
W at android.os.BinderProxy.transactNative(Native Method)
W at android.os.BinderProxy.transact(Binder.java:496)
W at android.app.ApplicationThreadProxy.schedulePauseActivity(ApplicationThreadNative.java:704)
W at com.android.server.am.ActivityStack.startPausingLocked(ActivityStack.java:825)
W at com.android.server.am.ActivityStack.finishActivityLocked(ActivityStack.java:2726)
W at com.android.server.am.ActivityStack.finishTopRunningActivityLocked(ActivityStack.java:2583)
W at com.android.server.am.ActivityStackSupervisor.finishTopRunningActivityLocked(ActivityStackSupervisor.java:2497)
W at com.android.server.am.ActivityManagerService.handleAppCrashLocked(ActivityManagerService.java:11500)
W at com.android.server.am.ActivityManagerService.makeAppCrashingLocked(ActivityManagerService.java:11397)
W at com.android.server.am.ActivityManagerService.crashApplication(ActivityManagerService.java:12081)
W at com.android.server.am.ActivityManagerService.handleApplicationCrashInner(ActivityManagerService.java:11592)
W at com.android.server.am.NativeCrashListener$NativeCrashReporter.run(NativeCrashListener.java:86)
lowmemorykiller E Error opening /proc/24493/oom_score_adj; errno=2
Process com.company.mymapapp (PID: 24493) ended
If anyone has any information as to the preferred method of generating a zip file on a Mac for use with the Skobbler SDK in this fashion, I would appreciate any guidance.
Thank you!
Keith
I've had the same issue (I did the zipping/unzipping manually) - I did not get to the bottom of the problem but the trick is not to zip the SkMaps folder (that you get when unzipping) but the content of that folder (all the subfolders) in an archive named SkMaps.zip (go in the unpacked folder, SKMaps, select all the folder and compress them to an SKMaps.zip.
I'm not sure if this is Mac specific or zip specific. The SDK expects that when unzipping SKMaps.zip it will find a number of folders, but when you compress the SKMaps folder directly you end up with an archive that has as root folder a folder named SkMaps (which is wrong) and only inside that folder the correct folder structure.
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 !