This app instantiates a WebView on app launch without adding it to the UI tree. This is done for preloading purposes.
When finally adding the WebView to the UI tree later on, the app crashes without a stack trace.
At the time the WebView gets added to the UI tree, logcat shows the following on an emulator running API level 22:
D <last app event before adding preloaded webview to ui tree>
W ResourceType: No known package when getting name for resource number 0xffffffff
E eglCodecCommon: glUtilsParamSize: unknow param 0x000085b5
E eglCodecCommon: glUtilsParamSize: unknow param 0x00008b49
E eglCodecCommon: glUtilsParamSize: unknow param 0x00008b4b
E eglCodecCommon: glUtilsParamSize: unknow param 0x00008b4a
D AndroidRuntime: >>>>>> START com.android.internal.os.RuntimeInit uid 10059 <<<<<<
D AndroidRuntime: CheckJNI is ON
E cutils-trace: Error opening trace file: Permission denied (13)
E memtrack: Couldn't load memtrack module (No such file or directory)
E android.os.Debug: failed to load memtrack module: -2
D AndroidRuntime: Calling main entry org.chromium.components.crash.browser.CrashpadMain
W linker : libwebviewchromium.so: unused DT entry: type 0x6ffffef5 arg 0x4c34
W linker : libwebviewchromium.so: unused DT entry: type 0x6ffffffe arg 0x4bd4
W linker : libwebviewchromium.so: unused DT entry: type 0x6fffffff arg 0x3
E chromium: [0722/152535.383241:ERROR:elf_dynamic_array_reader.h(61)] tag not found
E chromium: [0722/152535.394807:ERROR:file_io_posix.cc(140)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq: No such file or directory (2)
E chromium: [0722/152535.394897:ERROR:file_io_posix.cc(140)] open /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq: No such file or directory (2)
E chromium: [0722/152535.401624:ERROR:system_snapshot_linux.cc(125)] Couldn't read property ro.product.board
D AndroidRuntime: Shutting down VM
I WindowState: WIN DEATH: Window{2507ca0c u0 com.myapp.debug}
Does this point to the root cause of the crash?
I'm wondering if they are instead part of a crash recovery/dump mechanism (due to the reference to "CrashpadMain" before the errors), and if I would be able to find a stack trace elsewhere. While I can use adb bugreport, I don't know where to look in the report for information on the crash instance.
Of note, I've only been able to reproduce this crash (though consistently) on emulators, and only running API levels 22, 25, 27 and 29. A physical device, and an emulator running API level 23, do not reproduce it.
From the crash output it looks like the builds you're using have is_official_build=true set? (which makes sense for perf I guess)
This basically prevents Android from generating useful crash dump output at all, because the unwind tables are omitted from the binary. The only way to debug crashes in this kind of binary is to use Crashpad dumps, but those are unlikely to be hooked up usefully in a test environment?
Build with exclude_unwind_tables=false to override the default. This will increase binary size quite a bit, but should result in you getting a meaningful stack backtrace with more than one frame. You should then be able to symbolise the stack trace addresses to find out what's crashing.
exclude_unwind_tables
Current value (from the default) = true
From //build/config/compiler/compiler.gni:103
Exclude unwind tables by default for official builds as unwinding can be
done from stack dumps produced by Crashpad at a later time "offline" in the
crash server. Since this increases binary size, we don't recommend including
them in shipping builds.
For unofficial (e.g. development) builds and non-Chrome branded (e.g. Cronet
which doesn't use Crashpad, crbug.com/479283) builds it's useful to be able
to unwind at runtime.
Related
My Delphi project have both android 32 and 64 destination. I can deploy them on my test devices and they both works fine.
Now google forces me to upload a single app bundle file (.aab), so i flagged the "Generate Android App Bundle file (arm + arm64)" option, set up my provisioning keystore, loaded the alias and then generated that .aab file
I uploaded that as a beta release for my app from the android developer portal and after a few hours it became available to download for my test devices. But.. it shows the start up logo.. and nothing else.
I don't really know how to debug this since both the apks are working fine (32 and 64 bit), so i tried to launch adb logcat *:W, but i still cannot get useful info. I got those lines in endless loop:
10-30 09:59:21.656 13723 13723 E systems.<my app name>: Not starting debugger since process cannot load the jdwp agent.
10-30 09:59:21.688 13723 13723 W systems.<my app name>: JIT profile information will not be recorded: profile file does not exits.
10-30 09:59:21.688 13723 13723 W systems.<my app name>: JIT profile information will not be recorded: profile file does not exits.
10-30 09:59:21.703 922 1100 E ANDR-IOP: IIop:: Iop HAL Service is not available.
10-30 09:59:21.707 13723 13743 E Perf : Fail to get file list oat
10-30 09:59:21.707 13723 13743 E Perf : getFolderSize() : Exception_1 = java.lang.NullPointerException: Attempt to get length of null array
10-30 09:59:21.743 13723 13723 W linker : Warning: "/data/app/<my app name>-43xRWdYLtXcvUAbEkuUk6g==/split_config.arm64_v8a.apk!/lib/arm64-v8a/lib<my app name>.so" unused DT entry: DT_RPATH (type 0xf arg 0x2cf24) (ignoring)
Just for info: getFolderSize() is not a function i use in my code (its not even declared).
Also, i think this is pretty important: my app deploys some .so files (different files for 32 and 64 bit) and some other files, like images and fonts.
Why i think this is important? Just a suspect born reading this similar issue (but with xamarin): https://github.com/xamarin/Xamarin.Forms/issues/11450
I also tried to deploy the .aab manually on my devices but the only thing i found is how to generate the .apks file from the .aab, and i still cannot deploy it on my devices.
I'm using Delphi 10.4.1 and i also tried to recreate the .dproj file setting up everything again.
How i can debug this? Or how i can get more info about the cause?
Edit: Solved it! I had a few problems that, mixed together, caused this; i'll try to list them in case someone will have a similar issue and will end here!
my androidmanifest.template.xml file was generated by an older version of delphi and was missing some important parts
you need to include all the needed .so files in both 32 and 64bit build to actually have them in the bundle
using TPath.GetLibraryPath() when loading .so files can produce different results if you are using it inside a .aab bundle package
i was trying to load one of those .so file from the initialization section using the function TPath.GetLibraryPath() to get the root path, that was causing a unhandled exception that make my app crash into the splash screen
I solved simply removing TPath.GetLibraryPath() from the path i was using to load my .so and now it works
I have an app, in testing, written in Xamarin which I release to google play. Up until recently all updates had gone in fine - but one specific update fails to install on my client devices. The error on the client is simply "cant install appname" and there is no additional information.
Initially I thought it was a device problem but the play stats show that the version has not updated on any of the devices - and usually they auto update.
I have since released 3 different incremental versions (with few unimportant changes) but none of them have managed to install.
Are there any logs or techniques for diagnosing why an application wont install?
The only clue I have at the moment is that during the download of the APK the download progress bar goes way over the 12mb that the app is - up to around 16-20mb before the app attempts to install and then fails.
I have no idea where to start looking - is this a failure of my APK, my code? google play services?
Any help appreciated
Edit:
Errors from the ADB log, thanks to SushiHangover include several errors like this:
E Finsky : [3671] oqt.run(4): Couldn't create session for <appname>: Cannot automatically move <appname> from af01404a-b700-4834-8d5c-b2bcac411834 to internal storage
E Finsky : java.io.IOException: Cannot automatically move <appname> from af01404a-b700-4834-8d5c-b2bcac411834 to internal storage
E Finsky : at java.lang.reflect.Constructor.newInstance0(Native Method)
E Finsky : at java.lang.reflect.Constructor.newInstance(Constructor.java:334)
E Finsky : at android.os.ParcelableException.readFromParcel(ParcelableException.java:56)
E Finsky : at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:82)
E Finsky : at android.os.ParcelableException$1.createFromParcel(ParcelableException.java:80)
E Finsky : at android.os.Parcel.readParcelable(Parcel.java:2852)
E Finsky : at android.os.Parcel.readException(Parcel.java:2000)
E Finsky : at android.os.Parcel.readException(Parcel.java:1951)
E Finsky : at android.content.pm.IPackageInstaller$Stub$Proxy.createSession(IPackageInstaller.java:254)
E Finsky : at android.content.pm.PackageInstaller.createSession(PackageInstaller.java:324)
E Finsky : at opy.b(SourceFile:7)
E Finsky : at oqt.run(Unknown Source:3)
E Finsky : at android.os.Handler.handleCallback(Handler.java:790)
E Finsky : at android.os.Handler.dispatchMessage(Handler.java:99)
E Finsky : at android.os.Looper.loop(Looper.java:164)
E Finsky : at android.os.HandlerThread.run(HandlerThread.java:65)
This second one appears to be unrelated, I cleared the log and retried and the only consistent errors were the one above.
BugleRcsEngine: [2] qbe.a: Unable to get Cs Apk version: android.content.pm.PackageManager$NameNotFoundException: com.google.android.ims
Not sure what either of these mean though - any additional insight appreciated.
This isn't an answer so much as a workaround that may help others.
I uninstalled the application, then reinstalled it from the play store from scratch and the new version came down straight away. I think that the play store must have had an error and cached that locally - despite clearing the play store files, and even reinstalling the play store itself.
I don't know really what the fix is here - but uninstall the app and reinstall worked for me - and I can only hope that it does not affect my app users as they are less likely to try that.
Thanks to SushiHangover and JackHua for their help and guidance
I am getting this error -
A/libc: Fatal signal 31 (SIGSYS), code 1 in tid 4168 (m.messagingdapp)
When I upgrade my app from API 24 to 26 (have to do to get java.nio.file features). It is the only error that I can see in my logcat. It works fine when running with API 24. It gets the error when accessing an API I'm using called go-ethereum on this line -
String f = this.getFilesDir() + "/.ethereum";
Long n = Geth.LightScryptN;
Long p = Geth.LightScryptP;
AccountManager am = Geth.newAccountManager(f, n, p); //HERE
There seem to be lots of other errors on different parts of the logcat in the drop down menu i.e system_process. However, I am new to android and don't really know what I am looking for (I have googled all of them separately but have gotten no fix). Thanks.
Full lolcat -
07-25 22:17:14.774 9625-9625/? I/zygote: Not late-enabling -Xcheck:jni
(already on)
07-25 22:17:14.825 9625-9625/? W/zygote: Unexpected CPU variant for X86
using defaults: x86
07-25 22:17:15.181 9625-9625/benkrarup.ethereum.messagingdapp W/zygote:
Class android.support.v4.util.SimpleArrayMap failed lock verification
and will run slower.
07-25 22:17:15.181 9625-9625/benkrarup.ethereum.messagingdapp W/zygote:
Common causes for lock verification issues are non-optimized dex code
07-25 22:17:15.181 9625-9625/benkrarup.ethereum.messagingdapp W/zygote:
and incorrect proguard optimizations.
07-25 22:17:15.184 9625-9625/benkrarup.ethereum.messagingdapp W/zygote:
Class cz.msebera.android.httpclient.conn.util.PublicSuffixMatcherLoader
failed lock verification and will run slower.
07-25 22:17:15.191 9625-9625/benkrarup.ethereum.messagingdapp
D/NetworkSecurityConfig: No Network Security Config specified, using
platform default
07-25 22:17:15.216 9625-9625/benkrarup.ethereum.messagingdapp
W/Java7Support: Unable to load JDK7 types (annotations,
java.nio.file.Path): no Java7 support added
07-25 22:17:15.596 9625-9657/benkrarup.ethereum.messagingdapp A/libc:
Fatal signal 31 (SIGSYS), code 1 in tid 9657 (m.messagingdapp)
Android 8 O (SDK 26) limits which system calls are allowed for security reasons by enabling a feature called secure computing in the Linux kernel.
This means only whitelisted calls can be executed and that any other call will result in signal 31 (SIGSYS), code 1 (SYS_SECCOMP), like you are experiencing. You will need to examine the stack trace of this signal to find out which system call was not allowed (which was not listed completely in your question).
You can find a list of allowed calls here. Any other call is not allowed.
You can find what Google wrote about this here.
I am an owner of a Lenovo K2; due to having a lot of reboots and application crashes, I flashed the official Lenovo Nougat ROM from their recovery tool, performed system factory reset, cleared cache of everything...
Doing so did not resolve the problem at all, so I replicated the crashes and reboots while logging via adb logcat (treshold level Warning).
Here is the complete log: https://www.dropbox.com/s/c9955zdinyemezx/log4.txt?dl=0
I am no expert so I'd appreciate if someone could help me analyse the log I'd be very thankful; here are the most recurring errors:
07-22 19:34:36.375 5135 5135 W PackageManager: Not granting permission android.permission.WRITE_EXTERNAL_STORAGE to package com.lenovo.leos.cloud.sync.row because it was previously installed without
07-22 19:34:36.375 5135 5135 W PackageManager: Unknown permission android.permission.ACCESS_SUPERUSER in package com.lenovo.leos.cloud.sync.row
07-22 19:34:39.504 5135 5135 E DeviceIdleController: Bad device idle settings
07-22 19:34:39.504 5135 5135 E DeviceIdleController: java.lang.IllegalArgumentException: 'null' in 'null' is not a valid key-value pair
And Fatal exceptions thrown when apps crash:
07-22 19:33:56.796 1422 1516 F art : art/runtime/gc/collector/mark_sweep.cc:413] Tried to mark 0x40 not contained by any spaces
07-22 19:34:28.815 4933 4933 F DEBUG : pid: 665, tid: 665, name: fingerprintd >>> /system/bin/fingerprintd <<<
There is a solution for this.
Go to the Settings Page.
Go to 'Apps' Settings.
Find the app package causing this problem and click into it.
Go to 'Permissions' settings and allow all the permissions shown there.
Hope the issue is now solved.
I am trying to find memory leaks and corruptions in my native code, which is part of a sample java app. Since the procedure for using malloc debug has been updated from Nougat onwards (ref: Malloc Debug for Android N), I have followed the steps in that page to set the options of my interest.
Fortunately, I was able to get the mem corruption detection work (by use of guard option) for a simple buffer overflow in my native code. But, whatever option I use, I couldn't get the leaks detected.
I tried these options:
adb shell setprop libc.debug.malloc.options backtrace
adb shell setprop libc.debug.malloc.options leak_track
I also tried a combination of both options. I didnt see any mallocs or leaks present in my code being captured in logcat. In fact, for most devices I see that device is stuck in bootup when 'backtrace' option is set.
However, what I see is in the logs, is apparently false-positives for leaks in lot of other system programs:
12-16 13:05:51.908 8396 8396 E malloc_debug: +++ chmod leaked block of size 152 at 0x7f7de4b0e0 (leak 1 of 19)
...
12-16 13:05:52.156 8423 8423 E malloc_debug: +++ chown leaked block of size 152 at 0x7f8384b0e0 (leak 1 of 26)
...
12-16 13:05:56.533 8845 8845 E malloc_debug: +++ getprop leaked block of size 152 at 0x7fb684b0e0 (leak 1 of 17)
...
12-16 13:07:24.036 12393 12393 E malloc_debug: +++ /system/bin/dex2oat leaked block of size 131072 at 0xeb22c010 (leak 1 of 2452)
...
12-16 13:07:49.192 13734 13734 E malloc_debug: +++ logcat leaked block of size 5176 at 0x7f8dc5f020 (leak 1 of 21)
So, I have two questions in this context:
Does my apk need to be in a specific location for backtrace/leak_track to work? Was it ever tested for apks before, at least on N?
Do I need to set any other option for leak detection to work?
It looks like Malloc debug on Nougat is not explored much, so I didnt see any results on Google for any known issues or restrictions.
More details on my setup:
- Android Nougat 7.0
- 64 bit chipset
- Java sample app, with native code as shared lib