Google's WebView is reported to cause a lot of app crashes. Could anyone shed some light on the type of crashes caused by this glitch so that we can ignore them (i.e. not blame our apps).
Looking at crash reports of Google Play Console, I suspect the following crashes are in this category:
backtrace:
#00 pc 00000000034529dc /data/app/com.google.android.webview-fmgcNAbKmGQjSaUydZ05_w==/base.apk!libmonochrome.so (offset 0x2d3000)
backtrace:
#00 pc 00000000034529dc /data/app/com.android.chrome-Yv1VfYaotWfuAadCJoYaHg==/base.apk (offset 0xa0f000)
backtrace:
#00 pc 0000000002919eba /data/app/com.android.chrome-2/base.apk (offset 0xb09000)
Related
I'm facing a problem in release mode only,
App open > log-in > home (At the home screen it crashed).
I've checked by running in profile mode.
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
Cause: null pointer dereference
r0 00000000 r1 000000ff r2 00000000 r3 7f800000
I have already tried to upgrade all dependencies, gradle & kotlin versions also.
Can anyone help me figure it out?
Thanks and Regards,
Ahsan Ali
I have developed a flutter app, signed and built an app bundle. I have included the following lines in the app/build.gradle stating that:
android {
compileSdkVersion 32
ndkPath = "/Users/mmm/Library/Android/sdk/ndk/24.0.8215888"
...
defaultConfig {
applicationId "com.blablabla.my_app"
minSdkVersion 21
targetSdkVersion 32
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
ndk {
abiFilters 'armeabi-v7a', 'arm64-v8a', 'x86_64'
}
}
...
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.release
shrinkResources false
minifyEnabled false
}
}
}
android.buildTypes.release.ndk.debugSymbolLevel = 'symbol_table'
When I publish that app to Closed Beta testing, it keeps saying there is a Native Crash while tested on a GCE x86 emulator. I even tried not including the 'x86_64' abi but the Play Store Console still put the app on that GCE phone to test. The video shows my app's Home page appear for less than a second then disappears. I only knew dart and flutter and the crash report keeps saying something I have absolutely do not understand:
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
Build fingerprint: 'generic/gce_x86_phone/gce_x86:9/PGR1.190916.001/5877764:userdebug/test-keys'
Revision: '0'
ABI: 'x86'
pid: 6487, tid: 7424, name: 1.raster >>> com.blablabla.my_app <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
Abort message: 'vendor/unbundled_google/libs/ndk_translation/ndk_translation/ir/include/ndk_translation/ir/ir.h:685: CHECK failed: IsAligned(offset, GetFormatSize(format))'
eax 00000000 ebx 00001957 ecx 00001d00 edx 00000006
edi 00001957 esi ca3bfb5c
ebp ca3bfb28 esp ca3bfab8 eip f10a2be9
backtrace:
#00 pc 00000be9 [vdso:f10a2000] (__kernel_vsyscall+9)
#01 pc 0001fdf8 /system/lib/libc.so (syscall+40)
#02 pc 00022e73 /system/lib/libc.so (abort+115)
#03 pc 00006c84 /system/lib/liblog.so (__android_log_assert+292)
#04 pc 0009f2b4 /system/lib/libndk_translation.so (ndk_translation::GetInsn::GetInsn(ndk_translation::IR*, ndk_translation::Format, unsigned int)+276)
#05 pc 0009f100 /system/lib/libndk_translation.so (ndk_translation::IRBuilder::Get(ndk_translation::Format, unsigned int)+144)
#06 pc 0009dd2e /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::InsnBuilder::Get(ndk_translation::Format, unsigned int)+46)
#07 pc 000d0b4b /system/lib/libndk_translation.so (ndk_translation::SemanticsDecoder::VTBL(ndk_translation::VTBL_Args const&)+363)
#08 pc 00100568 /system/lib/libndk_translation.so (ndk_translation::ArmDecoder::TranslateThumbInsn(unsigned short const*)+86104)
#09 pc 0009c2b6 /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::GenerateIRHelper(ndk_translation::CompilerHooks*, unsigned int, unsigned int, ndk_translation::IR*)+1142)
#10 pc 0009be1f /system/lib/libndk_translation.so (ndk_translation::GenerateIR(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::IR*, unsigned int*)+47)
#11 pc 0009bbdf /system/lib/libndk_translation.so (ndk_translation::Compile(ndk_translation::CompilerHooks*, unsigned int, ndk_translation::GuestCodeEntry*, unsigned int*, ndk_translation::MachineCode*)+143)
#12 pc 0007a0da /system/lib/libndk_translation.so (ndk_translation::(anonymous namespace)::Translate(ndk_translation::TranslationCache*, unsigned int, ndk_translation::GuestCodeEntry*)+378)
#13 pc 00079f1c /system/lib/libndk_translation.so (ndk_translation_HandleNotTranslated+300)
#14 pc 0018db57 /system/lib/libndk_translation.so
As my app is using bluetooth, I tried a checking method before runApp() to avoid the emulator attempting to run any part that's related to flutter_blue_plus. But that did not help.
I already tried different measures for 10 times, still getting this crash report. I even put the app to production launch, but the console blocks that and put my app to "reviewing".
Then, I upgraded to the newest Flutter 3.0.2 and created a new FLUTTER SAMPLE STARTER PROJECT (that plain old counter one!), signed for release and put onto Play Store Closed Beta, the above crash still happens!
flutter cleaned every time before I build the app, nothing helps!
I am developing on a Macbook Pro M1 2020 version, with Android Studio Chipmunk 2021.2.1 Patch 1 (built on May 19, 2022).
Is there any settings I can make so the Play Store Console skip testing on that GCE x86 phone? I have googled that and it is Google Computing Engine one, it is not shown in the device catalog. All Intel chips, x86 phones and the Google x86 Emulator(I think this is not the GCE one) are excluded from the testing.
Please help! I have been working on this flutter app for over a year. Manual installation on physical devices works fine. I feel very frustrated, anxious and lost, my bosses are giving me very high pressure. I must get it on to the Play Store in 1 week. HELP!
EVEN A PLAIN FLUTTER STARTER PROJECT CRASHES
Crash Report
I see that, Dart stack trace all ends with 3/7/b/f (ARM architecture), while we know ARM/Thumb/Thumb(2) instructions are 2 or 4 bytes.
example: https://github.com/dart-lang/sdk/issues/43274
Warning: This VM has been configured to produce stack traces that violate the Dart standard.
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
pid: 29278, tid: 29340, name 1.ui
isolate_dso_base: 6fe9d64000, vm_dso_base: 6fe9d64000
isolate_instructions: 6fe9d74000, vm_instructions: 6fe9d66000
#00 abs 0000006fe9f4e87b virt 00000000001ea87b _kDartIsolateSnapshotInstructions+0x1da87b
#01 abs 0000006fe9f4e4a3 virt 00000000001ea4a3 _kDartIsolateSnapshotInstructions+0x1da4a3
#02 abs 0000006fe9d83ca3 virt 000000000001fca3 _kDartIsolateSnapshotInstructions+0xfca3
Thus, I wonder how could this happen? IMHO the ARM CPU will run the machine instructions (assembly) in the .so file in Android. But how can the CPU run it if all instructions do not align with 2/4 bytes?
Thanks for any suggestions!
The lsb is the "thumb bit" so to say.
You can switch between ARM and thumb mode with the instruction bx or blx.
These instructions scan the lsb, and if it's set, it will switch to thumb mode and to ARM mode if otherwise. Then branch to address&~1
The stack trace shows the return address of the caller functions, and that they are odd indicates that they are written/compiled in thumb mode.
I am using a third-party C++ app, which owing to some bug occasionally spews out a double free or corruption error. The error does not prevent the app from functioning normally and I do not have desire to debug third-party apps. Therefore, I just lived with the occasional messages. However, after updating Ubuntu from 14.04 to 16.04 the one-line error messages became pages of annoying text in my terminal, like:
*** Error in `/usr/bin/~': double free or corruption (!prev): 0x000055eebccb43d0 ***
======= Backtrace: =========
/lib/x86_64-linux-gnu/libc.so.6(+0x777e5)[0x7f78579047e5]
/lib/x86_64-linux-gnu/libc.so.6(+0x7fe0a)[0x7f785790ce0a]
/lib/x86_64-linux-gnu/libc.so.6(cfree+0x4c)[0x7f785791098c]
/usr/lib/x86_64-linux-gnu/lib~.so.6(Nlm_MemFree+0xe)[0x7f7857e9381e]
/usr/lib/x86_64-linux-gnu/lib~.so.6(ReleaseAppErrInfo+0xb3)[0x7f7857e8e4b3]
/usr/lib/x86_64-linux-gnu/lib~.so.6(Nlm_ReleaseAppContext+0x56)[0x7f7857e91ae6]
/usr/bin/~(NlmThreadExit+0x73)[0x55eebb7d1513]
/usr/bin/~(+0x85d7)[0x55eebb7d15d7]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x76ba)[0x7f7857c5d6ba]
/lib/x86_64-linux-gnu/libc.so.6(clone+0x6d)[0x7f785799382d]
======= Memory map: ========
55eebb7c9000-55eebb7d4000 r-xp 00000000 08:01 4334530 /usr/bin/~
~
~
My question: is there a way to disable backtrace and limit the message to just the first line under Ubuntu 16.04?
I am testing an EXE_BAD_ACCESS error. I have set NSZombieEnabled, MallocStackLogging, MallocStackLoggingNoCompact to YES. now in the debugger I get this message when I run my app in the debug mode from the device I could see this:
iota(3586) malloc: recording malloc stacks to disk using standard recorder
iota(3586) malloc: stack logs being written into /private/var/mobile/Applications/8E21A85B-369E-4487-962B-1550E56602DC/tmp/stack-logs.3586.iota.index
iota(3586) malloc: Please issue: cp /private/var/mobile/Applications/8E21A85B-369E-4487-962B-1550E56602DC/tmp/stack-logs.3586.iota.suRQjy.link /tmp/
and when I am about to hit the error I get,
2011-02-14 14:29:44.350 iota[3586:307] *** -[CFString autorelease]: message sent to deallocated instance 0x81eab70
Finally when I give the command in debugger to see the stack trace
(gdb) shell malloc_history 3586 0x81eab70
I get
malloc_history cannot examine process 3586 because the process does not exist.
Can anyone tell me what I am doing wrong, before the error is about the occur , I set
set env MallocStackLogging 1 in the debugger too
Thanks in Advance
You might not be able to look at the malloc_history because you're running this on the device. I had the same error and Instruments was also freezing or not starting my application.
But - if I ran in the iOS simulator and then configured the allocations tool to handle zombies (this option wasn't available on the device) then I can see pretty quickly the object which was prematurely released.
From what I understand you are releasing manually a string that is already on the autorelease Pool.
All strings created with
[NSString stringWithFormat:#"some %#", #"text"];
And
[NSString stringWithString:#"some text"];
must not be manually released.