Skip to content
This repository has been archived by the owner on Feb 20, 2023. It is now read-only.

[Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 #10277

Closed
AndiAJ opened this issue Apr 29, 2020 · 11 comments
Assignees
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Bookmarks Feature:History needs:triage Issue needs triage Release Blocker Blocks a Release S1 Blocks development/testing, may impact more than 25% of users, causes data loss, potential chemspill

Comments

@AndiAJ
Copy link
Collaborator

AndiAJ commented Apr 29, 2020

Steps to reproduce

  1. From the Home screen tap the ⋮ Main menu
  2. Tap on Bookmarks

Expected behavior

Bookmarks section is properly opened

Actual behavior

Crash

Device information

  • Android device:
    • OnePlus A3 (Android 6.0.1)
    • Samsung Galaxy A6 (Android 5.1.1)
  • Fenix version:
    • Nightly 200429 from 4/29
    • Beta 5.0.0-beta.1 from 4/29

Notes

❗The crash when trying to access the History section occurs only on Beta 5.0.0-beta.1
❗ Not reproducible on Android >= 7

► Video
20200429-100212

► Video
20200429-095844

► Log Bookmarks

 --------- beginning of crash
04-29 09:57:29.451 10802-10802/? E/AndroidRuntime: FATAL EXCEPTION: main
    Process: org.mozilla.fenix.beta, PID: 10802
    java.lang.NoSuchMethodError: No virtual method putBoolean(Ljava/lang/Object;JZ)V in class Lsun/misc/Unsafe; or its super classes (declaration of 'sun.misc.Unsafe' appears in /system/framework/core-libart.jar)
        at com.google.protobuf.UnsafeUtil$JvmMemoryAccessor.putBoolean(UnsafeUtil.java:1)
        at com.google.protobuf.UnsafeUtil.putBoolean(UnsafeUtil.java:1)
        at com.google.protobuf.MessageSchema.mergeFromHelper(MessageSchema.java:224)
        at com.google.protobuf.MessageSchema.mergeFrom(MessageSchema.java:84)
        at com.google.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:6)
        at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:23)
        at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:22)
        at mozilla.appservices.places.MsgTypes$BookmarkNode.parseFrom(MsgTypes.java:13)
        at mozilla.appservices.places.PlacesReaderConnection.getBookmarksTree(PlacesConnection.kt:11)
        at mozilla.components.browser.storage.sync.PlacesBookmarksStorage$getTree$2.invokeSuspend(PlacesBookmarksStorage.kt:3)
        at mozilla.components.browser.storage.sync.PlacesBookmarksStorage$getTree$2.invoke(PlacesBookmarksStorage.kt)
        at kotlin.jvm.internal.Intrinsics.startUndispatchedOrReturn(Intrinsics.java:2)
        at kotlin.jvm.internal.Intrinsics.withContext(Intrinsics.java:9)
        at mozilla.components.browser.storage.sync.PlacesBookmarksStorage.getTree(PlacesBookmarksStorage.kt:1)
        at kotlin.jvm.internal.Intrinsics.getTree$default(Intrinsics.java:1)
        at org.mozilla.fenix.library.bookmarks.BookmarkFragment$loadInitialBookmarkFolder$1$currentRoot$1.invokeSuspend(BookmarkFragment.kt:6)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:19)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:14)
04-29 09:57:29.451 10802-10802/? D/AppTracker: App Event: crash

► Log History

--------- beginning of crash
04-29 12:15:40.335 21628-21721/? E/AndroidRuntime: FATAL EXCEPTION: arch_disk_io_2
    Process: org.mozilla.fenix.beta, PID: 21628
    java.lang.NoSuchMethodError: No virtual method putBoolean(Ljava/lang/Object;JZ)V in class Lsun/misc/Unsafe; or its super classes (declaration of 'sun.misc.Unsafe' appears in /system/framework/core-libart.jar)
        at com.google.protobuf.UnsafeUtil$JvmMemoryAccessor.putBoolean(UnsafeUtil.java:1)
        at com.google.protobuf.UnsafeUtil.putBoolean(UnsafeUtil.java:1)
        at com.google.protobuf.MessageSchema.mergeFromHelper(MessageSchema.java:224)
        at com.google.protobuf.MessageSchema.mergeFrom(MessageSchema.java:84)
        at com.google.protobuf.CodedInputStreamReader.readMessage(CodedInputStreamReader.java:9)
        at com.google.protobuf.CodedInputStreamReader.readMessageList(CodedInputStreamReader.java:2)
        at com.google.protobuf.MessageSchema.readMessageList(MessageSchema.java:4)
        at com.google.protobuf.MessageSchema.mergeFromHelper(MessageSchema.java:156)
        at com.google.protobuf.MessageSchema.mergeFrom(MessageSchema.java:84)
        at com.google.protobuf.GeneratedMessageLite.parsePartialFrom(GeneratedMessageLite.java:6)
        at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:23)
        at com.google.protobuf.GeneratedMessageLite.parseFrom(GeneratedMessageLite.java:22)
        at mozilla.appservices.places.MsgTypes$HistoryVisitInfos.parseFrom(MsgTypes.java:13)
        at mozilla.appservices.places.PlacesReaderConnection.getVisitPage(PlacesConnection.kt:8)
        at mozilla.components.browser.storage.sync.PlacesHistoryStorage$getVisitsPaginated$2.invokeSuspend(PlacesHistoryStorage.kt:7)
        at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:2)
        at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:19)
        at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:1)
        at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:14)
04-29 12:15:40.336 21628-21721/? E/AbstractTracker: Can't create handler inside thread that has not called Looper.prepare()
04-29 12:15:40.336 21628-21721/? D/AppTracker: App Event: crash
04-29 12:15:40.336 21628-21628/? D/AppTracker: App Event: stop
04-29 12:15:40.340 21628-21721/? E/AbstractTracker: mTrackerAsyncQueryHandler is null

┆Issue is synchronized with this Jira Task

@AndiAJ AndiAJ added 🐞 bug Crashes, Something isn't working, .. S1 Blocks development/testing, may impact more than 25% of users, causes data loss, potential chemspill Feature:Bookmarks b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info labels Apr 29, 2020
@github-actions github-actions bot added the needs:triage Issue needs triage label Apr 29, 2020
@BMEduard BMEduard self-assigned this Apr 29, 2020
@AndiAJ AndiAJ changed the title [Bug]Crash when opening the Bookmarks section [Bug]Crash when opening the Bookmarks & History section Apr 29, 2020
@BMEduard
Copy link
Contributor

Upon further investigation, the cause of this issue might be the version of the com.google.protobuf:protobuf-javalite plugin that is used in the application services, as indicated by protocolbuffers/protobuf#6551 .

The version that is currently used is 3.9.2, and the issue that I mentioned is fixed in 3.10. However, it is mentioned that they (application services) are blocked from updating the version by another issue: protocolbuffers/protobuf#7422, so this seems to be a recent regression from android-services.

I think it's worth mentioning that reverting the android component version changes that were made in #10269 prevents these crashes from happening, as this issue occurs only on the most recent builds.

@BMEduard BMEduard removed their assignment Apr 29, 2020
@pocmo
Copy link
Contributor

pocmo commented Apr 29, 2020

Upon further investigation, the cause of this issue might be the version of the com.google.protobuf:protobuf-javalite plugin that is used in the application services

CC @grigoryk, @eoger

@pocmo
Copy link
Contributor

pocmo commented Apr 29, 2020

I think it's worth mentioning that reverting the android component version changes that were made in #10269 prevents these crashes from happening, as this issue occurs only on the most recent builds.

-    const val VERSION = "39.0.20200427130108"
+    const val VERSION = "40.0.20200428130031"

@pocmo
Copy link
Contributor

pocmo commented Apr 29, 2020

I don't see any AS dependency change in this range. 🤔

Not exact range, much larger: mozilla-mobile/android-components@02c1759...master

The only remotely interesting change in that range is maybe the Glean update? But then again it doesn't look like Glean uses protobuf. At least not directly as a dependency (Just in case CC @Dexterp37, @mdboom)

@pocmo
Copy link
Contributor

pocmo commented Apr 29, 2020

Ah, no, I may have been confused by the commit date (which can be much older than the date the merge happened).

The AS bump to 0.58.1 just happened two days ago:
mozilla-mobile/android-components#6636

CC @grigoryk @eoger

@Dexterp37
Copy link
Contributor

The only remotely interesting change in that range is maybe the Glean update? But then again it doesn't look like Glean uses protobuf. At least not directly as a dependency (Just in case CC @Dexterp37, @mdboom)

Nope, Glean doesn't use protobuf. Moreover, the changes introduced in version 28 do not really change the dependencies compared to 27.1.0

@AndiAJ AndiAJ changed the title [Bug]Crash when opening the Bookmarks & History section [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 Apr 29, 2020
@eliserichards eliserichards moved this from Inbox to Group triage in Engineering triage Apr 29, 2020
@liuche liuche added the Release Blocker Blocks a Release label Apr 29, 2020
@eoger
Copy link
Contributor

eoger commented Apr 29, 2020

v0.58.2 is out (bump in a-c here), switching assignee to @grigoryk who'll take it from there.

@eoger eoger removed their assignment Apr 29, 2020
@mcarare mcarare added this to API 23 in API-specific issues Apr 30, 2020
@pocmo
Copy link
Contributor

pocmo commented Apr 30, 2020

Preparing an AC 39.0.1 dot release now that includes the AS bump to 0.58.2.

@pocmo
Copy link
Contributor

pocmo commented Apr 30, 2020

The 39.0.1 release went out earlier today!

@AndiAJ
Copy link
Collaborator Author

AndiAJ commented Apr 30, 2020

Hi, verified as fixed on the Debug Build from Master I've just created: 39.0.1, f19856fa4 GV: 77.0a1 20200427094322 AS: 0.58.2 using the following devices:
• OnePlus A3 (Android 6.0.1)
• HTC Desire 820 (Android 6.0.1)
• Samsung Galaxy A6 (Android 5.1.1)

► Video
20200430-153335

@AndiAJ AndiAJ closed this as completed Apr 30, 2020
@AndiAJ AndiAJ added the eng:qa:verified QA Verified label Apr 30, 2020
@eliserichards eliserichards removed this from Group triage in Engineering triage Apr 30, 2020
liuche added a commit to liuche/fenix that referenced this issue Apr 30, 2020
@AndiAJ
Copy link
Collaborator Author

AndiAJ commented May 4, 2020

Hi, verified as fixed on Beta 76.0.0-beta.1 from 5/1 using the following devices:
• OnePlus A3 (Android 6.0.1)
• Samsung Galaxy A6 (Android 5.1.1)

@data-sync-user data-sync-user changed the title [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 FNX2-15846 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 Jul 30, 2020
@data-sync-user data-sync-user changed the title FNX2-15846 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 FNX3-13776 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 Aug 10, 2020
@data-sync-user data-sync-user changed the title FNX3-13776 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 FNX-3399 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 Aug 10, 2020
@data-sync-user data-sync-user changed the title FNX-3399 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 FNX2-15846 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 Aug 10, 2020
@data-sync-user data-sync-user changed the title FNX2-15846 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 FNX-3399 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 Aug 11, 2020
@mcarare mcarare removed this from API 23 in API-specific issues Jan 12, 2021
@data-sync-user data-sync-user changed the title FNX-3399 ⁃ [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 [Bug]Crash when opening the Bookmarks & History section on devices with Android 5 & 6 May 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
b:crash Crashes Fenix: should link to Sentry, Crash-Stats or GPlay info 🐞 bug Crashes, Something isn't working, .. eng:qa:verified QA Verified Feature:Bookmarks Feature:History needs:triage Issue needs triage Release Blocker Blocks a Release S1 Blocks development/testing, may impact more than 25% of users, causes data loss, potential chemspill
Projects
None yet
Development

No branches or pull requests

8 participants