Closed lobontiumira closed 3 years ago
This seems like a pretty bad crash. That being said, I'm not able to reproduce on my Galaxy S9. Perhaps it's device specific or related to memory running out?
According to the logcat this is a native code crash
@softvision-miralobontiu could you retest in the same way?
Hi, I've managed to reproduce the crash on the latest Nightly Build #20310607 from 1/31
using
a Google Pixel 3a (Android 9)
I've opened 30 tabs, the last opened tab was twitter.com and afterwards Fenix crashed.
Please find attached the Logcat with the entire run. Logcat
```kotlin
2020-01-31 10:29:57.195 28103-28277/? E/Adreno-GSL:
I'll remove the QA needed label until further notice.
I'm able to reproduce this on a Pixel 2 if I open these tabs AND individually load each one.
All of the linked stack traces include low memory warnings.
onTrimMemory
is being called when I reproduce. We're currently telling the SessionManager
to ~remove old sessions in that callback~ (EDIT: looks like we're just nulling out their thumbnails), but as a user I notice that previously opened tabs are still immediately loaded when I select them. I suspect there's something in Gecko that we should be calling in onTrimMemory
.
Opened discussion on how to solve the problem here https://github.com/mozilla-mobile/android-components/issues/5933.
Reproducible on Fenix Beta 4.0.0-beta.4
using a OnePlus A3 (Android 6.0.1)
► Log
--------- beginning of crash
03-06 14:16:18.100 22651-22651/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.mozilla.fenix.beta, PID: 22651
java.lang.OutOfMemoryError: Failed to allocate a 6635532 byte allocation with 873976 free bytes and 853KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:831)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
at org.mozilla.geckoview.GeckoDisplay$ScreenshotBuilder.capture(GeckoDisplay.java:21)
at org.mozilla.geckoview.GeckoDisplay.capturePixels(GeckoDisplay.java:1)
at org.mozilla.geckoview.GeckoView$Display.capturePixels(GeckoView.java:3)
at org.mozilla.geckoview.GeckoView.capturePixels(GeckoView.java:1)
at mozilla.components.browser.engine.gecko.GeckoEngineView.captureThumbnail(GeckoEngineView.kt:3)
at org.mozilla.fenix.components.toolbar.DefaultBrowserToolbarController.handleTabCounterClick(BrowserToolbarController.kt:11)
at org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration$tabsAction$1.invoke(ToolbarIntegration.kt:3)
at -$$LambdaGroup$js$QYY6x8xlXquP7EfVuMVbZgw1g5I.onClick(java-style lambda group:211)
at android.view.View.performClick(View.java:5233)
at android.view.View$PerformClick.run(View.java:21209)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-06 14:16:18.100 22651-22651/? D/AppTracker: App Event: crash
Reproducible on Fenix Beta 4.0.0-beta.5 using a OnePlus A3 (Android 6.0.1)
► Log
--------- beginning of crash
03-09 11:48:30.600 2710-2710/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: org.mozilla.fenix.beta, PID: 2710
java.lang.OutOfMemoryError: Failed to allocate a 6635532 byte allocation with 2313664 free bytes and 2MB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:831)
at android.graphics.Bitmap.createBitmap(Bitmap.java:808)
at android.graphics.Bitmap.createBitmap(Bitmap.java:775)
at org.mozilla.geckoview.GeckoDisplay$ScreenshotBuilder.capture(GeckoDisplay.java:21)
at org.mozilla.geckoview.GeckoDisplay.capturePixels(GeckoDisplay.java:1)
at org.mozilla.geckoview.GeckoView$Display.capturePixels(GeckoView.java:3)
at org.mozilla.geckoview.GeckoView.capturePixels(GeckoView.java:1)
at mozilla.components.browser.engine.gecko.GeckoEngineView.captureThumbnail(GeckoEngineView.kt:3)
at org.mozilla.fenix.components.toolbar.DefaultBrowserToolbarController.handleTabCounterClick(BrowserToolbarController.kt:11)
at org.mozilla.fenix.components.toolbar.DefaultToolbarIntegration$tabsAction$1.invoke(ToolbarIntegration.kt:3)
at -$$LambdaGroup$js$QYY6x8xlXquP7EfVuMVbZgw1g5I.onClick(java-style lambda group:211)
at android.view.View.performClick(View.java:5233)
at android.view.View$PerformClick.run(View.java:21209)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:152)
at android.app.ActivityThread.main(ActivityThread.java:5507)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
03-09 11:48:30.600 2710-2710/? D/AppTracker: App Event: crash```
We added memory management in AC in mid March https://github.com/mozilla-mobile/android-components/issues/5933 that might address this issue.
Hi, I was able to reproduce the crash again. Had 34 tabs opened, opened each tab individually, and Fenix crashed: https://crash-stats.mozilla.org/report/index/a4474300-25ed-4c7e-a9f2-5a07f0200612 Tested on the latest Nightly build from 6/12 with GV 79.0a1-20200609092134, AS 60.0.0, using HTC 10 (Android 8). I'll remove the qa:needed label for now.
Capturing screenshots is a fallible operation, because screenshots can be quite big. Shouldn't some method in the call stack that's pasted above be responsible for catching the exception?
I was not able to reproduce the crash. I had over 30 tabs opened, I left Fenix in the background for a day, then browsed again through all the tabs. No crash. Environment: 12/30 Nightly build, HTC 10 (Android 8), Google Pixel (Android 10) I'll close this issue.
I'll reopen this issue because Firefox RC 84.1.3 just crashed. I had about 28 tabs opened, uBlock origin add-on installed, and I was signed in with an old account. Device: Sony Xperia Z5 Premium (Android 7.1.1)
b0dbe666-d614-4850-b24a-20e1955dde2e java.lang.OutOfMemoryError: Failed to allocate a 36876 byte allocation with 8808 free bytes and 8KB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 36876 byte allocation with 8808 free bytes and 8KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:879)
at android.graphics.Bitmap.createBitmap(Bitmap.java:856)
at android.graphics.Bitmap.createBitmap(Bitmap.java:823)
at mozilla.components.browser.icons.generator.DefaultIconGenerator.generate(DefaultIconGenerator.kt:2)
at mozilla.components.browser.icons.BrowserIcons.access$loadIconInternal(BrowserIcons.kt:25)
at mozilla.components.browser.icons.BrowserIcons$loadIcon$1.invokeSuspend(BrowserIcons.kt:2)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:3)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:15)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at java.lang.Thread.run(Thread.java:761)
Suppressed: java.lang.OutOfMemoryError: Failed to allocate a 36876 byte allocation with 8240 free bytes and 8KB until OOM
... 13 more
Suppressed: java.lang.OutOfMemoryError: Failed to allocate a 36876 byte allocation with 7880 free bytes and 7KB until OOM
... 13 more
Suppressed: java.lang.OutOfMemoryError: Failed to allocate a 36876 byte allocation with 5592 free bytes and 5KB until OOM
... 13 more
I reproduced the crash on the Beta 85.0.0-beta.8 build with Sony Xperia Z5 Premium (Android 7.1.1).
556538a8-b039-4525-9720-e5c884f0ad3e java.lang.OutOfMemoryError: Failed to allocate a 1249932 byte allocation with 1197536 free bytes and 1169KB until OOM
java.lang.OutOfMemoryError: Failed to allocate a 1249932 byte allocation with 1197536 free bytes and 1169KB until OOM
at dalvik.system.VMRuntime.newNonMovableArray(Native Method)
at android.graphics.BitmapFactory.nativeDecodeAsset(Native Method)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:620)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:455)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:1155)
at android.content.res.ResourcesImpl.loadDrawableForCookie(ResourcesImpl.java:720)
at android.content.res.ResourcesImpl.loadDrawable(ResourcesImpl.java:571)
at android.content.res.Resources.getDrawable(Resources.java:775)
at android.content.Context.getDrawable(Context.java:529)
at androidx.core.content.ContextCompat.getDrawable(ContextCompat.java:1)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:9)
at androidx.appcompat.widget.ResourceManagerInternal.getDrawable(ResourceManagerInternal.java:1)
at androidx.appcompat.content.res.AppCompatResources.getDrawable(AppCompatResources.java:1)
at androidx.appcompat.widget.AppCompatImageHelper.loadFromAttributes(AppCompatImageHelper.java:7)
at androidx.appcompat.widget.AppCompatImageView.<init>(AppCompatImageView.java:8)
at androidx.appcompat.widget.AppCompatImageView.<init>(AppCompatImageView.java:2)
at androidx.appcompat.app.AppCompatViewInflater.createView(AppCompatViewInflater.java:37)
at androidx.appcompat.app.AppCompatDelegateImpl.onCreateView(AppCompatDelegateImpl.java:13)
at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:192)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:769)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:727)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:858)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:861)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:821)
at android.view.LayoutInflater.inflate(LayoutInflater.java:518)
at android.view.LayoutInflater.inflate(LayoutInflater.java:426)
at org.mozilla.fenix.home.HomeFragment.onCreateView(HomeFragment.kt:1)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:4)
at androidx.fragment.app.FragmentStateManager.createView(FragmentStateManager.java:13)
at androidx.fragment.app.FragmentManager.moveToState(FragmentManager.java:25)
at androidx.fragment.app.FragmentManager.addAddedFragments(FragmentManager.java:5)
at androidx.fragment.app.FragmentManager.executeOpsTogether(FragmentManager.java:53)
at androidx.fragment.app.FragmentManager.removeRedundantOperationsAndExecute(FragmentManager.java:11)
at androidx.fragment.app.FragmentManager.execPendingActions(FragmentManager.java:12)
at androidx.fragment.app.FragmentManager$4.run(FragmentManager.java:1)
at android.os.Handler.handleCallback(Handler.java:751)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:241)
at android.app.ActivityThread.main(ActivityThread.java:6274)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
I reproduced this crash on the Beta 87.0.0-beta.6 build with Samsung Galaxy Tab A6 (Android 5.1.1). I had about 18 tabs opened, signed in with an old account, had uBlock origin add-on installed.
95a1137c-8ea3-4e59-930b-3d2d4644e6ee
See: https://github.com/mozilla-mobile/fenix/issues/17373 This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
Steps to reproduce
Expected behavior
The app shouldn't crash.
Actual behavior
The app crashed. Happened 2/2.
Device information
logcat (2).txt
┆Issue is synchronized with this Jira Task