"Unknown Bits Set in Runtime_Flags: 0X8000" Warning in Logcat on Android Q Emulator

Unknown bits set in runtime_flags: 0x8000 warning in Logcat on Android Q emulator

I bring a stone to the building. I retrace the code for the error message. It is at line 345 in the C ++ file dalvik_system_ZygoteHooks.cc
At a minimum, if (runtime_flags! = 0) then the error message will be printed. 0x8000 also corresponds to the USE_APP_IMAGE_STARTUP_CACHE flag (see line 157). The test on the USE_APP_IMAGE_STARTUP_CACHE flag is done on line 340. Normally, runtime_flags should no longer have a raised bit for USE_APP_IMAGE_STARTUP_CACHE but this does not seem to be the case since the error is printed.

But in the end, the error does not seem to have an impact on the application.

ERROR: Unknown bits set in runtime_flags: 0x8000

Solved. I had to add FINE_LOCATION to the manifest and:

  1. Manually give location permissions in Settings.

or


  1. Make a popup that asks for location permissions the first time the user launch the app.

App runs smoothly on emulators but crashes on real device

  1. Najib Raihan is correct: The first thing to check is the android version on your device, vs. your emulator(s).

  2. Even if the versions match, it's entirely possible for one to appear to "work", and the other to "crash". Just because one or the other doesn't "crash", doesn't mean your code is "correct". You DEFINITELY need to pay close attention to the warnings Android Studio gives you when you compile your app.

  3. I don't see any "fatal errors" in the logcat you've shown: you need to look closer. In particular, the "Unknown bits set in runtime_flags: 0x8000" error is NOT the reason your app is crashing. Look here: "Unknown bits set in runtime_flags: 0x8000" warning in Logcat on Android Q emulator

EDUCATED GUESS:

I suspect your device might be running a newer version of Android, with additional "security restrictions". This can sometimes cause the app to terminate - sometimes even terminate without a clear logcat message.

SUGGESTION:

PLAN A:

Plug the failing device in to your USB port (as you're doing), make sure Logcat is running in A/S BEFORE you start your app, and hit "Debug" (not "Run", as I believe you're probably already doing). Look for "fatal errors" in LogCat and/or the A/S debugger.

PLAN B:

If it still slips by without giving you a decent error message, then set breakpoints in your app (starting with the very first display on your very first screen) and "divide and conquer" until you find the point of failure.



Related Topics



Leave a reply



Submit