Crashes & ANR section of google play developer console provides this kind of feedback when native code crashes on user's device:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: '...'
Revision: '...'
ABI: 'arm'
pid: ...., tid: ...., name: .... >>> com.package <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
<registers>
backtrace:
#00 pc 003ba9be /data/app/com.package/lib/arm/libx.so (sl_setVolumeSound(unsigned int, float)+105)
#01 pc 003b9db7 /data/app/com.package/lib/arm/libx.so (Audio::setVolumeSound(unsigned int, float)+106)
so far, so good. But how could one determine a source code line out of bytecode offset(?), such as +105 for the sl_setVolumeSound function in the sample output above?
I would especially appreciate a solution which would work completely in macosx command line, with no IDEs engaged.
ndk-stack is specially suited for this purpose. Note, that to get it working you need a non-stripped versions of your native libraries. More details here.
Related
Getting - com.example W/Unity: Timeout while trying detaching primary window.
After getting this message in Logcat -
React Native App is crashing on goBack to previous screen(React Native App screen) from the Unity screen
https://github.com/azesmway/react-native-unity/issues/38#issuecomment-1288892945
2022-10-24 /com.example W/Unity: Timeout while trying detaching primary window.
2022-10-24 /com.example E/CRASH: other thread is trapped; signum = 11
2022-10-24 /com.example E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example, PID: 123
java.lang.Error: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Version '2021.3.11f1 (asdf)', Build type 'Release', Scripting Backend 'il2cpp', CPU 'arm64-v8a'
Build fingerprint: 'mobiledevice/dreamltexx/dreamlte:9/PPR1.180610.011/ASDF09876:user/release-keys'
Revision: '10'
ABI: 'arm64'
Timestamp: 2022-10-24 16:53:25+123
pid: 123, tid: 123, name: Thread-11 >>> com.example <<<
uid: 123
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x44
Cause: null pointer dereference
x0 0000000000000000 x1 0000006e59afed38 x2 0000006e59afed44 x3 0000000000000002
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
I have created an Android emulator with OS(6.0) and when the emulator starts i launch directly the "Browser" app and get a crash.
Here are some logs :
W/System(1617): ClassLoader referenced unknown path: /system/app/webview/lib/arm
E/ActivityThread(1617): Failed to find provider info for com.google.settings
### WebView Version 44.0.2403.119 (code 246011900)
Fatal signal 6 (SIGABRT), code -6 in tid 1667 (GpuThread)
SELinux: Loaded file_contexts contexts from /file_contexts.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'generic/sdk_phone_armv7/generic:6.0/MRA44C/2166767:eng/test-keys'
Revision: '0'
ABI: 'arm'
pid: 1617, tid: 1667, name: GpuThread >>> com.android.browser <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: '[FATAL:gl_surface_android.cc(58)] Check failed: kGLImplementationNone != GetGLImplementation() (0 vs. 0)
does anyone know something about that?
Please find the tombstone file that contains the full crash log :
Tombstone01
Resolved by checking "Use GPU Host" when creating the emulator.
I trying the full version of apportable and I have a problem with the CoreData:
I have the correct features at configuration.json:
"FEATURES": ["opengles2","landscape","prefer_external_storage","write_external_storage","write_settings"],
Setting the storageURL where I want to store the DB:
#ifdef ANDROID
//tried many different locations but not luck, I think there is the problem
NSURL *storeURL = [NSURL URLWithString:#"/data/data/com.bluepiggames.zombieSlice/files/Documents/ZS_SuperDatabase.db"];
#else
NSURL *storeURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:#"ZS_SuperDatabase"];
#endif
Creating the persistenceCoordinatore:
NSDictionary *options = [NSDictionary dictionaryWithObjectsAndKeys:
[NSNumber numberWithBool:YES],
NSMigratePersistentStoresAutomaticallyOption,
[NSNumber numberWithBool:YES],
NSInferMappingModelAutomaticallyOption, nil];
_persistentStoreCoordinator = [[NSPersistentStoreCoordinator alloc]
initWithManagedObjectModel: [self managedObjectModel]];
Finally, these is the place where the app crash:
if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error]) {
NSLog(#"Unresolved error %#, %#", error, [error userInfo]);
//abort();
And no error prompt in the debugger, only a crash like these.
F/libc (10177): Fatal signal 11 (SIGSEGV) at 0xe1a0d013 (code=1)
D/dalvikvm( 7227): GC_CONCURRENT freed 387K, 12% free 6566K/7431K, paused 2ms+2ms
D/IabHelper(10177): Querying SKU details.
I/DEBUG ( 8708): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG ( 8708): Build fingerprint: 'SoftWinnner/crane_a1002jhenergy/crane-a1002jhenergy:4.0.4/IMM76D/20120822:eng/test-keys'
I/DEBUG ( 8708): pid: 10177, tid: 10218 >>> com.bluepiggames.zombieSlice <<<
I/DEBUG ( 8708): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr e1a0d013
I/DEBUG ( 8708): r0 63c40b68 r1 6412b13c r2 6412b13c r3 00000000
(EDIT) To solve this crash we must set the before:
NSError *error = nil. //!!!!!
if (![_persistentStoreCoordinator addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeURL options:options error:&error])
Now the problem is in a different place:
// Returns the managed object model for the application.
// If the model doesn't already exist, it is created from the application's model.
- (NSManagedObjectModel *)managedObjectModel
{
if (_managedObjectModel != nil) {
return _managedObjectModel;
}
NSURL *modelURL = [[NSBundle mainBundle] URLForResource:#"ZSDataModel" withExtension:#"momd"];
NSLog(#"Test managedModel found %#",modelURL);
_managedObjectModel = [[NSManagedObjectModel alloc] initWithContentsOfURL:modelURL];
return _managedObjectModel;
}
And the error is because the DataModel compiled not found. Anybody knows how to put the compiled DataModel "DataModel.momod" inside a apportable project?
Thanks
sorry for such a late response, but i didn't want to let the question go unanswered. right now momd files aren't automatically added as assets. unfortunately, there's a manual step you'll need to do every time you update the xcdatamodeld.
navigate to your simulator's Applications directory (e.g. ~/Library/Application\ Support/iPhone\ Simulator/6.1/Applications/<randomString>/<YourApp>.app/)
navigate into the momd directory
run the following in terminal: plutil -convert xml1 <ModelName>.mom -o <pathNearYourApprojFolder>/<ModelName>.mom
in your configuration.json in the add_params dictionary, then in the assets array, add the path <pathRelativeToApprojFolder>/<ModelName>.mom of the file you converted with plutil
As you should know, Google annonced that Apple Http Live Streaming is now supported in the SDK V3.0 via the mediaPlayer Framework.
So I wrote some lines to test this. I started with a "3gp" movie that is correclty displayed on the emulator (a tablet). When I feed the source with a working m3u8 URL nothing is displayed and the debugger reports an error
Can someone lead me from darkness to light ???
I guess it has something to do with codec but...
Many thanks for any clue.
Zbb
02-15 09:49:31.284: INFO/avc_utils(33): found AVC codec config (320 x 180, Main-profile level 1.3)
02-15 09:49:31.444: INFO/ESQueue(33): found AAC codec config (24000 Hz, 2 channels)
02-15 09:49:31.444: INFO/ESQueue(33): [ 02-15 09:49:31.454 33:0x1b9 F/ACodec ]
02-15 09:49:31.444: INFO/ESQueue(33): frameworks/base/media/libstagefright/ACodec.cpp:1594
CHECK_EQ( omx->allocateNode(componentName.c_str(), observer, &node),(status_t)OK) failed: -2147483648 vs. 0
02-15 09:49:31.605: INFO/DEBUG(31): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
02-15 09:49:31.605: INFO/DEBUG(31): Build fingerprint: 'generic/sdk/generic:Honeycomb/HPI20B/eng.xav.20110125.162619:eng/test-keys'
02-15 09:49:31.605: INFO/DEBUG(31): pid: 33, tid: 441 >>> /system/bin/mediaserver <<<
02-15 09:49:31.615: INFO/DEBUG(31): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad