Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash when switching to Chromite from another app #839

Closed
5 tasks done
thatAkiraFox opened this issue Mar 1, 2024 · 12 comments
Closed
5 tasks done

Crash when switching to Chromite from another app #839

thatAkiraFox opened this issue Mar 1, 2024 · 12 comments
Labels
bug Something isn't working

Comments

@thatAkiraFox
Copy link

thatAkiraFox commented Mar 1, 2024

Preliminary checklist

  • I have read the README.
  • I have searched the existing issues for my problem. This is a new ticket, NOT a duplicate or related to another open issue.
  • I have read the FAQs.
  • I have updated Cromite to the latest version. The bug is reproducible on this latest version.
  • This is a bug report about the Cromite browser; not the website nor F-Droid nor anything else.

Can the bug be reproduced with corresponding Chromium version?

No

Cromite version

122.0.6261.94

Device architecture

arm64

Platform version

Android 13

Android Device model

OnePlus 6 (enchilada)

Is the device rooted?

Yes

Changed flags

no flags changed

Is this bug happening in an incognito tab?

No

Is this bug caused by the adblocker?

No

Is this bug a crash?

5ea87446-1e18-4f37-8dd9-cac60e9494f2.zip

Describe the bug

Cromite will crash when opening it from memory with a non-incognito tab currently in focus

Steps to reproduce the bug

  1. Open Cromite
  2. Open any web page
  3. Go back home or switch to another app
  4. Open Cromite again or switch back to it from another app via multitasking
  5. Cromite will crash (it won't crash if the focused tab is an incognito one)

Expected behavior

Reopening Cromite with a tab open shouldn't make it crash

Screenshots

Details

screen-20240301-161356.webm

@uazo
Copy link
Owner

uazo commented Mar 1, 2024

stack log:

java.lang.RuntimeException: Unable to resume activity {HTTP://WEBADDRESS.ELIDED}: java.lang.NullPointerException: Attempt to write to field 'org.chromium.chrome.browser.tab.Tab cb0.a' on a null object reference in method 'void org.chromium.chrome.browser.tasks.ReturnToChromeUtil.showHomeSurfaceUiOnNtp(org.chromium.chrome.browser.tab.Tab, org.chromium.chrome.browser.tab.Tab, org.chromium.chrome.browser.tasks.HomeSurfaceTracker)'
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4774)
        at android.app.ActivityThread.handleResumeActivity(ActivityThread.java:4807)
        at android.app.servertransaction.ResumeActivityItem.execute(ResumeActivityItem.java:57)
        at android.app.servertransaction.ActivityTransactionItem.execute(ActivityTransactionItem.java:45)
        at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:179)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:97)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2307)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loopOnce(Looper.java:201)
        at android.os.Looper.loop(Looper.java:288)
        at android.app.ActivityThread.main(ActivityThread.java:7924)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Caused by: java.lang.NullPointerException: Attempt to write to field 'org.chromium.chrome.browser.tab.Tab cb0.a' on a null object reference in method 'void org.chromium.chrome.browser.tasks.ReturnToChromeUtil.showHomeSurfaceUiOnNtp(org.chromium.chrome.browser.tab.Tab, org.chromium.chrome.browser.tab.Tab, org.chromium.chrome.browser.tasks.HomeSurfaceTracker)'
        at org.chromium.chrome.browser.tasks.HomeSurfaceTracker.updateHomeSurfaceAndTrackingTabs(HomeSurfaceTracker.java:24)
        at org.chromium.chrome.browser.tasks.ReturnToChromeUtil.showHomeSurfaceUiOnNtp(ReturnToChromeUtil.java:1051)
        at org.chromium.chrome.browser.tasks.ReturnToChromeUtil.createNewTabAndShowHomeSurfaceUi(ReturnToChromeUtil.java:778)
        at org.chromium.chrome.browser.tasks.ReturnToChromeUtil.setInitialOverviewStateOnResumeWithNtp(ReturnToChromeUtil.java:835)
        at org.chromium.chrome.browser.ChromeTabbedActivity.setInitialOverviewStateWithNtp(ChromeTabbedActivity.java:1522)
        at org.chromium.chrome.browser.ChromeTabbedActivity.setInitialOverviewState(ChromeTabbedActivity.java:1475)
        at org.chromium.chrome.browser.ChromeTabbedActivity.onResumeWithNative(ChromeTabbedActivity.java:1239)
        at org.chromium.chrome.browser.init.NativeInitializationController.onResume(NativeInitializationController.java:158)
        at org.chromium.chrome.browser.init.AsyncInitializationActivity.onResume(AsyncInitializationActivity.java:560)
        at org.chromium.chrome.browser.app.ChromeActivity.onResume(ChromeActivity.java:1596)
        at org.chromium.chrome.browser.ChromeTabbedActivity.onResume(ChromeTabbedActivity.java:3797)
        at android.app.Instrumentation.callActivityOnResume(Instrumentation.java:1564)
        at android.app.Activity.performResume(Activity.java:8474)
        at android.app.ActivityThread.performResumeActivity(ActivityThread.java:4764)
        ... 13 more

@uazo uazo added the bug Something isn't working label Mar 1, 2024
uazo added a commit that referenced this issue Mar 1, 2024
@uazo
Copy link
Owner

uazo commented Mar 3, 2024

please try with latest version

This was referenced Mar 3, 2024
@thatAkiraFox
Copy link
Author

Still crashing unfortunately, same as before.

9b998ff2-8111-4020-9224-0e541e8c3304.zip

@uazo
Copy link
Owner

uazo commented Mar 3, 2024

please disable (enable and disable) the settings/homepage/Show NTP at startup flag until I found a way to reproduce the crash.
you can force the browser open with a long press on the icon to open an incognito page.

@thatAkiraFox
Copy link
Author

That option was already disabled for me, but messing around with all the toggles in Settings > Homepage seems to have fixed it, at least for now.

Specifically, I think that:

  1. turning off the Homepage option
  2. restarting Cromite
  3. enabling that option again
  4. restarting Cromite again

fixed the issue. I will report back if it happens again.

@eetun
Copy link

eetun commented Mar 4, 2024

I can still reproduce the crash in the latest version. It happens only when the 'Close all open tabs on exit' setting is enabled, but disabling it seems to fix the issue.

@uazo
Copy link
Owner

uazo commented Mar 4, 2024

when the 'Close all open tabs on exit' setting is enabled

thanks!

@HighPriest
Copy link

Disabling Homepage or NTP setting didn't do it for me. Switching between application to Cromite caused a crash.

Disabling "Clear open pages on close" from Privacy settings, is working, for now.

@Parsnip
Copy link

Parsnip commented Mar 6, 2024

Toggling the "close all open tabs on exit" off fixed it indeed. But after toggling it back on, the crash didn't return. Kind of weird.

@DKB-91
Copy link

DKB-91 commented Mar 6, 2024

For some reason, I managed to keep close all tabs on without crashing...if I activate always incognito mode.

Otherwise it crashes with close all tabs on and AI mode off everytime Cromite runs in the background. Tried turning off homepage but that doesn't fix it for me.

@uazo
Copy link
Owner

uazo commented Mar 8, 2024

please check with latest version, thanks

@Lion-box
Copy link

Lion-box commented Mar 8, 2024

It works correctly now. No crashes when switching apps or after "minimizing" (on Grapheme)
Thanks a lot for solving this one

@uazo uazo closed this as completed Mar 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants