Bug #1229
openCrash when opening the bookmarks/folders list or main menu
0%
Description
Thanks for privacy browser, it's my main browser since quite some time. The stack trace below refers to the latest version available from f-droid.
Lately (since a few months at least) I am experiencing an issue when opening the bookmarks or the menu upon staring the application. The application immediately crashes with the following stack trace:
```
10:25:14.598 E FATAL EXCEPTION: main
Process: com.stoutner.privacybrowser.standard, PID: 27104
java.lang.IllegalStateException: ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)
at k0.O.i(Unknown Source:930)
at k0.s.b(Unknown Source:62)
at androidx.recyclerview.widget.LinearLayoutManager.Y0
at androidx.recyclerview.widget.LinearLayoutManager.L0
at androidx.recyclerview.widget.LinearLayoutManager.c0(Unknown Source:920)
at androidx.recyclerview.widget.RecyclerView.r(Unknown Source:34)
at androidx.recyclerview.widget.RecyclerView.p(Unknown Source:42)
at androidx.recyclerview.widget.RecyclerView.onLayout(Unknown Source:7)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at androidx.drawerlayout.widget.DrawerLayout.onLayout(Unknown Source:125)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:807)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4562)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3830)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2718)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9937)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1406)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
at android.view.Choreographer.doFrame(Choreographer.java:945)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
```
After manually entering any url and opening a first webpage, the app behaves correctly.
In the settings I have "" (an empty string) as homepage, in case it helps with reproducing the bug.
Files
Updated by Soren Stoutner about 2 months ago
- Assignee set to Soren Stoutner
- Priority changed from 3.x to Next Release
I am not able to easily recreate this bug. Can you please post a copy of About > Version from inside the app? This might give me some clue as to what makes your environment different than my testing environment.
Updated by Daniele Gobbetti about 2 months ago
Soren Stoutner wrote in #note-1:
I am not able to easily recreate this bug. Can you please post a copy of About > Version from inside the app? This might give me some clue as to what makes your environment different than my testing environment.
Sure, see below:
```
Privacy Browser
Versione 3.18.1 (codice versione 75)
Hardware
Brand: google
Costruttore: Google
Modello: Pixel 8a
Dispositivo: akita
Bootloader: akita-14.5-12100691
Radio: g5300o-240308-240517-B-11857457,g5300o-240308-240517-B-11857457
Software
Android: 14 (API 34)
Patch si sicurezza: 2024-09-05
Build: AP2A.240905.003.24511030
Kernel: 5.15.137-android14-11-gbc062a78e195-ab12057991
Provider di WebView: com.android.webview
Versione di WebView: 129.0.6668.81
OpenKeychain: 6.0.4
Utilizzo della Memoria
Memoria utilizzata dalla App: 21,20 MiB
Memoria disponibile App: 42,75 MiB
Memoria totale App: 63,95 MiB
Memoria massima App: 256,00 MiB
Memoria di sistema utilizzata: 4.411,34 MiB
Memoria di sistema disponibile: 2.944,14 MiB
Memoria totale del sistema: 7.355,48 MiB
Lista dei filtri
EasyList: 202407182236
EasyPrivacy: 202407182236
Fanboy’s Annoyance List: 202407182240
Fanboy’s Social Blocking List: 202407182236
UltraList: 1
UltraPrivacy: 3
Firma del Pacchetto
Emittente: CN=FDroid, OU=FDroid, O=fdroid.org, L=ORG, ST=ORG, C=UK
Soggetto: CN=FDroid, OU=FDroid, O=fdroid.org, L=ORG, ST=ORG, C=UK
Data di inizio: 17 apr 2016 10:14:13 CEST
Data finale: 3 set 2043 10:14:13 CEST
Versione del Certificato: 3
Numero di Serie: 166629308
Algoritmo di firma: SHA256withRSA
```
Updated by Soren Stoutner about 2 months ago
Try installing the ALT version from https://www.stoutner.com/privacy-browser-android/changelog/. The ALT version can be installed alongside your current version and will be differentiated by the icon having the word TEST.
Launch the ALT version and see if you can replicate this crash without making any modifications to the settings. If not, export your settings from your current version and import them into ALT and see if that causes the crash.
Updated by Daniele Gobbetti about 2 months ago
Soren Stoutner wrote in #note-3:
Try installing the ALT version from https://www.stoutner.com/privacy-browser-android/changelog/. The ALT version can be installed alongside your current version and will be differentiated by the icon having the word TEST.
Launch the ALT version and see if you can replicate this crash without making any modifications to the settings. If not, export your settings from your current version and import them into ALT and see if that causes the crash.
I can confirm that the alt version works with pristine settings and that after importing the settings from the main installation it crashes.
I can reliably reproduce the crash by performing these two changes:
- setting the homepage as empty
- setting the main bar of the app to be at the bottom of the screen
Edit: To be clear: starting from default settings and applying these two changes is sufficient to make the app crash when opening a side panel after launch and before opening a webpage.
I thought the main bar at bottom could be the culprit because it also caused issues a few months ago (that I can't remember honestly :-)
I can provide an export of the settings if needed, just let me know.
Updated by Soren Stoutner about 2 months ago
I am still not able to replicte your problem. Here is a link to a video I recorded with the ALT version of 3.18.1.
https://nextcloud.stoutner.com/s/4kKGY9GHiYoxXKm
Settings changed from default:
1. Bottom app bar.
2. Homepage set to be blank.
3. Allow screenshots (so that the video could be recorded). Note that I did not experience a crash with this either enabled or disabled.
Could you please attach a video of the crash happening on your device? Perhaps there is something in the way it behaves that would provide me a clue as to what is happening.
Updated by Soren Stoutner about 2 months ago
- Status changed from New to Feedback
Updated by Daniele Gobbetti about 2 months ago
- File recording.mp4 recording.mp4 added
Please find the video attached.
First part: open the menu (crash)
Second part: try to swipe in the bookmarks (crash)
In the thirt part of the video a "fix" of sorts I found out by chance: if I close the IME (which is standard AOSP) before opening either side drawer, they do work.
I tried debugging the app but the stack trace seems to be too deep in android internal methods for me to make sense of them.
Updated by Soren Stoutner about 2 months ago
Are you perchance using a custom launcher? I noticed that you appear to have a custom icon shape. The reason why I ask is because I experienced one other difficult-to-diagnose bug years ago that ended up being caused by a custom launcher.
Updated by Daniele Gobbetti about 2 months ago
I'm using the stock launcher of calyxos, in all honesty I don't know if/how much it would be considered custom but usually they are very close to AOSP. App infos (of the launcher) shows name is Quickstep and package id is com.android.launcher3
I believe theme and shape of launcher icons are part of the android 14 standard theming options, at least I performed the changes from the system theme settings.
Updated by Soren Stoutner about 2 months ago
Being able to set icon themes like that used to be part of Android, but it was removed a while back (about Android 12 or so, much to my dismay). I don't know for sure if it was removed from the AOSP or just from Google's Pixel build, but without taking time to look into it I would imagine that the most likely scenario is that Google removed it from AOSP and CalyxOS put it back in.
I would suggest you try opening a bug report with CalyxOS (and reference this bug report) to see if they know what is going on here. I recommend this for three reasons.
1. I have been unable to replicate the buggy behavior on my device, even with identical settings.
2. The initial part of the crash log indicates to me the problem is something with the OS and not something inside of Privacy Browser:
at k0.O.i(Unknown Source:930) at k0.s.b(Unknown Source:62)
3. You mentioned that the crash doesn't happen if you close the OS keyboard before interacting with Privacy Browser. To me, that also points to the crash happening somewhere in the OS/IME code and not in Privacy Browser itself.
Updated by Daniele Gobbetti about 2 months ago
At least I can provide unredact logcat after installing a locally compiled alt version as mentioned previously (sorry I could have done it earlier).
Also actually I do use helium keyboard and reverted to stock AOSP just to make the issue as reproducible as possible (this stack track is with helium keyboard set as IME)
I will try to reach out to calyxos developers, but maybe you find additional pointers here (I could not find the code where the ``onRequestHide`` rows are outputted in the codebase, and those inverted three lines are the only difference I can spot between the two cases...
These are the entries from launching up to the app opening up:
```
2024-10-11 15:44:34.293 9096-9096 cr_WVCFactoryProvider com.stoutner.privacybrowser.alt I version=129.0.6668.81 (666808133) minSdkVersion=29 isBundle=false multiprocess=true packageId=2
2024-10-11 15:44:34.303 9096-9096 nativeloader com.stoutner.privacybrowser.alt D Load /product/app/TrichromeLibrary/TrichromeLibrary.apk!/lib/arm64-v8a/libmonochrome_64.so using ns product-clns-8 from class loader (caller=<unknown>): ok
2024-10-11 15:44:34.304 9096-9096 nativeloader com.stoutner.privacybrowser.alt D Load /system/lib64/libwebviewchromium_plat_support.so using ns product-clns-8 from class loader (caller=<unknown>): ok
2024-10-11 15:44:34.306 9096-9138 chromium com.stoutner.privacybrowser.alt E [1011/154434.306566:ERROR:variations_seed_loader.cc(39)] Seed missing signature.
2024-10-11 15:44:34.307 9096-9138 chromium com.stoutner.privacybrowser.alt I [1011/154434.307021:INFO:variations_seed_loader.cc(68)] Failed to open file for reading.: No such file or directory (2)
2024-10-11 15:44:34.308 9096-9096 cr_LibraryLoader com.stoutner.privacybrowser.alt I Successfully loaded native library
2024-10-11 15:44:34.309 9096-9096 cr_CachingUmaRecorder com.stoutner.privacybrowser.alt I Flushed 6 samples from 6 histograms, 0 samples were dropped.
2024-10-11 15:44:34.312 9096-9096 cr_CombinedPProvider com.stoutner.privacybrowser.alt I #registerProvider() provider:WV.J6@69be76c isPolicyCacheEnabled:false policyProvidersSize:0
2024-10-11 15:44:34.313 9096-9096 cr_PolicyProvider com.stoutner.privacybrowser.alt I #setManagerAndSource() 0
2024-10-11 15:44:34.320 9096-9096 cr_CombinedPProvider com.stoutner.privacybrowser.alt I #linkNativeInternal() 1
2024-10-11 15:44:34.320 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 183155436; UID 10284; state: ENABLED
2024-10-11 15:44:34.320 9096-9096 cr_AppResProvider com.stoutner.privacybrowser.alt I #getApplicationRestrictionsFromUserManager() Bundle[EMPTY_PARCEL]
2024-10-11 15:44:34.320 9096-9096 cr_PolicyProvider com.stoutner.privacybrowser.alt I #notifySettingsAvailable() 0
2024-10-11 15:44:34.320 9096-9096 cr_CombinedPProvider com.stoutner.privacybrowser.alt I #onSettingsAvailable() 0
2024-10-11 15:44:34.320 9096-9096 cr_CombinedPProvider com.stoutner.privacybrowser.alt I #flushPolicies()
2024-10-11 15:44:34.332 9096-9143 chromium com.stoutner.privacybrowser.alt W [WARNING:dns_config_service_android.cc(81)] Failed to read DnsConfig.
2024-10-11 15:44:34.347 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 214741472; UID 10284; state: ENABLED
2024-10-11 15:44:34.372 9096-9096 vacybrowser.alt com.stoutner.privacybrowser.alt W Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed)
2024-10-11 15:44:34.372 9096-9096 vacybrowser.alt com.stoutner.privacybrowser.alt W Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed)
2024-10-11 15:44:34.409 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 171228096; UID 10284; state: ENABLED
2024-10-11 15:44:34.413 9096-9096 TabLayout com.stoutner.privacybrowser.alt W MODE_SCROLLABLE + GRAVITY_FILL is not supported, GRAVITY_START will be used instead
2024-10-11 15:44:34.420 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 210923482; UID 10284; state: ENABLED
2024-10-11 15:44:34.420 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 63938206; UID 10284; state: DISABLED
2024-10-11 15:44:34.428 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 303326708; UID 10284; state: DISABLED
2024-10-11 15:44:34.505 9096-9105 vacybrowser.alt com.stoutner.privacybrowser.alt I Compiler allocated 4207KB to compile void android.widget.TextView.<init>(android.content.Context, android.util.AttributeSet, int, int)
2024-10-11 15:44:34.567 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 237531167; UID 10284; state: DISABLED
2024-10-11 15:44:34.774 9096-9105 vacybrowser.alt com.stoutner.privacybrowser.alt I Compiler allocated 4669KB to compile void android.view.ViewRootImpl.performTraversals()
2024-10-11 15:44:34.957 9096-9105 vacybrowser.alt com.stoutner.privacybrowser.alt I Compiler allocated 4727KB to compile void com.stoutner.privacybrowser.helpers.ParseFilterListHelper$parseFilterList$1.invoke(java.lang.String)
2024-10-11 15:44:35.629 9096-9096 ImeTracker com.stoutner.privacybrowser.alt I com.stoutner.privacybrowser.alt:db67cb2a: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
2024-10-11 15:44:35.658 9096-9151 cr_media com.stoutner.privacybrowser.alt W BLUETOOTH_CONNECT permission is missing.
2024-10-11 15:44:35.658 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 193247900; UID 10284; state: ENABLED
2024-10-11 15:44:35.660 9096-9151 cr_media com.stoutner.privacybrowser.alt W getBluetoothAdapter() requires BLUETOOTH permission
2024-10-11 15:44:35.661 9096-9151 cr_media com.stoutner.privacybrowser.alt W registerBluetoothIntentsIfNeeded: Requires BLUETOOTH permission
2024-10-11 15:44:35.662 9096-9096 View com.stoutner.privacybrowser.alt W requestLayout() improperly called by android.widget.RelativeLayout{fdb92b6 V.E...... ......ID 89,0-806,118 #7f090352 app:id/url_relativelayout} during layout: running second layout pass
2024-10-11 15:44:35.662 9096-9096 View com.stoutner.privacybrowser.alt W requestLayout() improperly called by androidx.appcompat.view.menu.ActionMenuItemView{5f51bb7 VFED..C.. ......ID 0,10-127,136 #7f0901b0 app:id/javascript} during layout: running second layout pass
2024-10-11 15:44:35.662 9096-9096 View com.stoutner.privacybrowser.alt W requestLayout() improperly called by androidx.appcompat.widget.ActionMenuView{e58bf24 V.E...... ......ID 848,0-1080,147} during layout: running second layout pass
2024-10-11 15:44:35.712 9096-9191 chromium com.stoutner.privacybrowser.alt W [WARNING:viz_main_impl.cc(85)] VizNullHypothesis is disabled (not a warning)
2024-10-11 15:44:35.738 9096-9096 ImeTracker com.stoutner.privacybrowser.alt I com.stoutner.privacybrowser.alt:b0ba0bff: onRequestShow at ORIGIN_CLIENT reason SHOW_SOFT_INPUT fromUser false
2024-10-11 15:44:35.742 9096-9096 Compatibil...geReporter com.stoutner.privacybrowser.alt D Compat change id reported: 163400105; UID 10284; state: ENABLED
2024-10-11 15:44:35.743 9096-9096 InputMethodManager com.stoutner.privacybrowser.alt D showSoftInput() view=androidx.appcompat.widget.AppCompatEditText{2d6f1b4 VFED..CL. .F....ID 0,0-717,118 #7f090351 app:id/url_edittext aid=1073741825} flags=0 reason=SHOW_SOFT_INPUT
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 65536 of codec video/avc
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 1 of codec video/avc
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 2 of codec video/avc
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 524288 of codec video/avc
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 8 of codec video/avc
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 65536 of codec video/avc
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 1 of codec video/avc
2024-10-11 15:44:35.802 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 2 of codec video/avc
2024-10-11 15:44:35.803 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 524288 of codec video/avc
2024-10-11 15:44:35.803 9096-9167 cr_VAUtil com.stoutner.privacybrowser.alt W Unknown level: 131072 for profile 8 of codec video/avc
2024-10-11 15:44:35.810 9096-9096 InsetsController com.stoutner.privacybrowser.alt D show(ime(), fromIme=true)
2024-10-11 15:44:35.816 9096-9238 InteractionJankMonitor com.stoutner.privacybrowser.alt W Initializing without READ_DEVICE_CONFIG permission. enabled=false, interval=1, missedFrameThreshold=3, frameTimeThreshold=64, package=com.stoutner.privacybrowser.alt
2024-10-11 15:44:36.032 9096-9096 ImeTracker com.stoutner.privacybrowser.alt I com.stoutner.privacybrowser.alt:b0ba0bff: onShown
```
If I close the keyboard and then open the menu it does not crash and I see this:
```
2024-10-11 15:41:55.426 8276-8276 InsetsController com.stoutner.privacybrowser.alt D hide(ime(), fromIme=true)
2024-10-11 15:41:55.428 8276-8276 WindowOnBackDispatcher com.stoutner.privacybrowser.alt W sendCancelIfRunning: isInProgress=falsecallback=ImeCallback=ImeOnBackInvokedCallback@47892717 Callback=android.window.IOnBackInvokedCallback$Stub$Proxy@1f9528b
2024-10-11 15:41:55.666 8276-8276 ImeTracker com.stoutner.privacybrowser.alt I com.stoutner.privacybrowser.alt:5864e9d1: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT_ON_ANIMATION_STATE_CHANGED fromUser false
2024-10-11 15:41:55.669 8276-8276 ImeTracker com.stoutner.privacybrowser.alt I helium314.keyboard:ff149f7a: onHidden
2024-10-11 15:41:56.364 8276-8452 ProfileInstaller com.stoutner.privacybrowser.alt D Installing profile for com.stoutner.privacybrowser.alt
2024-10-11 15:42:01.147 8276-8286 vacybrowser.alt com.stoutner.privacybrowser.alt I Background concurrent mark compact GC freed 42MB AllocSpace bytes, 17(340KB) LOS objects, 75% free, 16MB/66MB, paused 330us,4.302ms total 196.539ms
2024-10-11 15:42:01.154 8276-8288 vacybrowser.alt com.stoutner.privacybrowser.alt W ApkAssets: Deleting an ApkAssets object '<empty> and /product/app/TrichromeWebView/TrichromeWebView.apk' with 1 weak references
2024-10-11 15:42:05.676 8276-8276 ImeTracker com.stoutner.privacybrowser.alt I com.stoutner.privacybrowser.alt:4b5ce3aa: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
```
If I don't close the keyboard:
```
---------------------------- PROCESS ENDED (9096) for package com.stoutner.privacybrowser.alt ----------------------------
2024-10-11 15:44:39.826 9096-9096 ImeTracker com.stoutner.privacybrowser.alt I com.stoutner.privacybrowser.alt:95e5f9f3: onRequestHide at ORIGIN_CLIENT reason HIDE_SOFT_INPUT fromUser false
2024-10-11 15:44:39.867 9096-9096 WindowOnBackDispatcher com.stoutner.privacybrowser.alt W sendCancelIfRunning: isInProgress=falsecallback=ImeCallback=ImeOnBackInvokedCallback@47892717 Callback=android.window.IOnBackInvokedCallback$Stub$Proxy@1f9528b
2024-10-11 15:44:39.869 9096-9096 InsetsController com.stoutner.privacybrowser.alt D hide(ime(), fromIme=true)
2024-10-11 15:44:39.895 9096-9096 AndroidRuntime com.stoutner.privacybrowser.alt D Shutting down VM
2024-10-11 15:44:39.899 9096-9096 AndroidRuntime com.stoutner.privacybrowser.alt E FATAL EXCEPTION: main
Process: com.stoutner.privacybrowser.alt, PID: 9096
java.lang.IllegalStateException: ViewHolder views must not be attached when created. Ensure that you are not passing 'true' to the attachToRoot parameter of LayoutInflater.inflate(..., boolean attachToRoot)
at androidx.recyclerview.widget.RecyclerView$Adapter.createViewHolder(RecyclerView.java:7080)
at androidx.recyclerview.widget.RecyclerView$Recycler.tryGetViewHolderForPositionByDeadline(RecyclerView.java:6235)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6118)
at androidx.recyclerview.widget.RecyclerView$Recycler.getViewForPosition(RecyclerView.java:6114)
at androidx.recyclerview.widget.LinearLayoutManager$LayoutState.next(LinearLayoutManager.java:2303)
at androidx.recyclerview.widget.LinearLayoutManager.layoutChunk(LinearLayoutManager.java:1627)
at androidx.recyclerview.widget.LinearLayoutManager.fill(LinearLayoutManager.java:1587)
at androidx.recyclerview.widget.LinearLayoutManager.onLayoutChildren(LinearLayoutManager.java:675)
at androidx.recyclerview.widget.RecyclerView.dispatchLayoutStep2(RecyclerView.java:4134)
at androidx.recyclerview.widget.RecyclerView.dispatchLayout(RecyclerView.java:3851)
at androidx.recyclerview.widget.RecyclerView.onLayout(RecyclerView.java:4404)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at androidx.drawerlayout.widget.DrawerLayout.onLayout(DrawerLayout.java:1297)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1891)
at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1729)
at android.widget.LinearLayout.onLayout(LinearLayout.java:1638)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.widget.FrameLayout.layoutChildren(FrameLayout.java:332)
at android.widget.FrameLayout.onLayout(FrameLayout.java:270)
at com.android.internal.policy.DecorView.onLayout(DecorView.java:807)
at android.view.View.layout(View.java:25159)
at android.view.ViewGroup.layout(ViewGroup.java:6460)
at android.view.ViewRootImpl.performLayout(ViewRootImpl.java:4562)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3830)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2718)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:9937)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1406)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1415)
at android.view.Choreographer.doCallbacks(Choreographer.java:1015)
at android.view.Choreographer.doFrame(Choreographer.java:945)
2024-10-11 15:44:39.899 9096-9096 AndroidRuntime com.stoutner.privacybrowser.alt E at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1389)
at android.os.Handler.handleCallback(Handler.java:959)
at android.os.Handler.dispatchMessage(Handler.java:100)
at android.os.Looper.loopOnce(Looper.java:232)
at android.os.Looper.loop(Looper.java:317)
at android.app.ActivityThread.main(ActivityThread.java:8592)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:580)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:878)
2024-10-11 15:44:39.917 9096-9096 Process com.stoutner.privacybrowser.alt I Sending signal. PID: 9096 SIG: 9
```
Updated by Soren Stoutner about 2 months ago
Thank you for the detailed logcat.
I think the core of this problem has something to do with how the OS is calculating insets. Notice the `InsetsController` line right here before the crash.
2024-10-11 15:44:39.869 9096-9096 InsetsController com.stoutner.privacybrowser.alt D hide(ime(), fromIme=true) 2024-10-11 15:44:39.895 9096-9096 AndroidRuntime com.stoutner.privacybrowser.alt D Shutting down VM 2024-10-11 15:44:39.899 9096-9096 AndroidRuntime com.stoutner.privacybrowser.alt E FATAL EXCEPTION: main
Insets are parts of the OS that force the app to get smaller, like the keyboard coming up from the bottom or a cutout for a camera. The OS calculates insets and resizes the app accordingly.
That would explain why this bug only manifests with the bottom app bar. The top app bar doesn't have to adjust for an inset when the keyboard is open. It would also explain why this only manifests when the homepage is set to a blank string. If the homepage is populated, they keyboard is not automatically displayed when the app starts, but if the homepage is null then the keyboard automatically displays because it the most likely user action is to type a URL.
Opening either of the drawers automatically closes the keyboard. Opening the options menu has to calculate the inset for the displayed keyboard so the menu is above it. In either case, if something in the OS hasn't fully initialized the inset caused by the keyboard being displayed, this could trigger a crash.
Privacy Browser have very simple code that relates to the displaying of the keyboard. When the app opens, if the homepage is null, it runs this code:
// Display the keyboard.
inputMethodManager.showSoftInput(urlEditText, 0)
When a drawer is opened, it runs this code to hide the keyboard:
// Hide the keyboard (if displayed).
inputMethodManager.hideSoftInputFromWindow(currentWebView!!.windowToken, 0)
Something about interacting with the app (closing and opening the keyboard, loading a URL) fixes the issue with the `InsetController`. I would be interested to know what that is. When you create the CalyxOS bug, please post a link to it here. I would like to follow along.
Updated by Daniele Gobbetti about 2 months ago
Many thanks for the additional details.
Another Calyxos user could reproduce the issue: https://matrix.to/#/!aZmLRhgGyXgdVmhzoH:matrix.org/$kkF5AJ9pNXsLpGWPnf2i11qkc0OKCjqPlZXafV8fN04?via=matrix.org&via=calyx.dev&via=nitro.chat
One of the main calyxos devs asked whether you're running android 14 or an older version just to exclude upstream is to blame.
I've noticed that you're using gesture navigation and the "navigation indicator" at the bottom of the screen was shown in your video, while on my phone I'm using gesture navigation with the indicator hidden.
Indeed if I configure the phone to show the indicator, the app does not crash! I'm wondering if you could hide the navigation indicator and see what happens, or if this is a calyxos specific feature.
Here is the link to the issue I opened for calyxos:
https://gitlab.com/CalyxOS/calyxos/-/issues/2760
Updated by Soren Stoutner about 2 months ago
Daniele Gobbetti wrote in #note-13:
I've noticed that you're using gesture navigation and the "navigation indicator" at the bottom of the screen was shown in your video, while on my phone I'm using gesture navigation with the indicator hidden.
Indeed if I configure the phone to show the indicator, the app does not crash! I'm wondering if you could hide the navigation indicator and see what happens, or if this is a calyxos specific feature.
As far as I know that is not a standard Android feature and there is no provision for removing the navigation indicator on an unmodified Pixel. If this is something custom CalyxOS has enabled, I could see it being the root cause of the problem.
Here is the link to the issue I opened for calyxos:
https://gitlab.com/CalyxOS/calyxos/-/issues/2760
Thanks.
Updated by Daniele Gobbetti about 2 months ago
(I don't see an option to close the issue, feel free to close it)
Updated by Soren Stoutner about 2 months ago
Thank you. I'll probably wait until I see the upstream bug resolved.
Updated by Soren Stoutner about 1 month ago
- Priority changed from Next Release to 3.x