Closed Bug 1610873 Opened 4 years ago Closed 4 years ago

Crash in [@ java.lang.NullPointerException: at org.mozilla.gecko.home.CombinedHistoryPanel.onDestroyView(CombinedHistoryPanel.java)]

Categories

(Firefox for Android Graveyard :: General, defect)

Unspecified
Android
defect
Not set
normal

Tracking

(firefox-esr6873+ verified)

VERIFIED FIXED
Tracking Status
firefox-esr68 73+ verified

People

(Reporter: petru, Assigned: petru)

References

Details

(Keywords: crash)

Crash Data

Attachments

(1 file)

This bug is for crash report bp-d094cfcf-bb58-4223-8bd1-382580200120.

Java stack trace:

java.lang.NullPointerException
	at org.mozilla.gecko.home.CombinedHistoryPanel.onDestroyView(CombinedHistoryPanel.java:686)
	at android.support.v4.app.Fragment.performDestroyView(Fragment.java:2678)
	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1533)
	at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
	at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
	at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3269)
	at android.support.v4.app.FragmentManagerImpl.dispatchDestroy(FragmentManager.java:3260)
	at android.support.v4.app.FragmentController.dispatchDestroy(FragmentController.java:274)
	at android.support.v4.app.FragmentActivity.onDestroy(FragmentActivity.java:419)
	at android.support.v7.app.AppCompatActivity.onDestroy(AppCompatActivity.java:210)
	at org.mozilla.gecko.GeckoActivity.onDestroy(GeckoActivity.java:32)
	at org.mozilla.gecko.GeckoApp.onDestroy(GeckoApp.java:2203)
	at org.mozilla.gecko.BrowserApp.onDestroy(BrowserApp.java:1546)
	at android.app.Activity.performDestroy(Activity.java:7403)
	at android.app.Instrumentation.callActivityOnDestroy(Instrumentation.java:1306)
	at android.app.ActivityThread.performDestroyActivity(ActivityThread.java:4481)
	at android.app.ActivityThread.handleDestroyActivity(ActivityThread.java:4515)
	at android.app.servertransaction.DestroyActivityItem.execute(DestroyActivityItem.java:39)
	at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:145)
	at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1816)
	at android.os.Handler.dispatchMessage(Handler.java:106)
	at android.os.Looper.loop(Looper.java:193)
	at android.app.ActivityThread.main(ActivityThread.java:6718)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

The fix for this would be a continuation of the work done in bug 1579628.

Blocks: 1579628

"mRecentTabsAdapter" could indeed be null in "onDestroyView()" if it's
initialization was skipped because of "isParentFinishing()".
Guarding instance method calls with a null check is all we need here.

Please verify the issue is now fixed on this try build containing my patch against the most recent esr68 - https://treeherder.mozilla.org/#/jobs?repo=try&revision=09308f179c2b1a126105df449ca63b29ab76ecdb

Flags: qe-verify+

I tested the issue on the try build provided in comment 2 by performing the steps found in https://bugzilla.mozilla.org/show_bug.cgi?id=1579628#c17 using a Pixel 3 XL (Android 9) and the issue no longer occurs.

Flags: qe-verify+

Comment on attachment 9122402 [details]
Bug 1610873 - Check for null before calling instance methods; r?VladBaicu

ESR Uplift Approval Request

  • If this is not a sec:{high,crit} bug, please state case for ESR consideration: Complete the work from a previous uplifted patch to resolve a particular crash scenario.
  • User impact if declined: Application crash
  • Fix Landed on Version:
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): Small change verified by QA
  • String or UUID changes made by this patch:
Attachment #9122402 - Flags: approval-mozilla-esr68?

Comment on attachment 9122402 [details]
Bug 1610873 - Check for null before calling instance methods; r?VladBaicu

null check to fix fennec crash, approved for 68.5

Attachment #9122402 - Flags: approval-mozilla-esr68? → approval-mozilla-esr68+
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED

Hi, verified as fixed with Google Pixel 3a (Android 9) and Sony Xperia Z5 (Android 7.0.0) on Firefox Beta 68.5b6 on aarch 64 build and with Samsung Galaxy Tab A (Android 9) on a arm build with both addons:

  • U-block Origin
  • Https Everywhere.
    I will leave the ticket in this state until it reaches the release version.

Hi, verified as fixed on Fennec 68.5.0 RC with Samsung Galaxy Tab A (Android 9)-arm build, Google Pixel 3a (Android 9)-aarch64 build, Samsung Galaxy S8+ (Android 8.0.0)-aarch64 build and Sony Xperia Z5 (Android 7.0.0)-aarch64 build for both addons:

  • U-block Origin
  • Https Everywhere
    I will mark the ticket as VERIFIED.
Status: RESOLVED → VERIFIED
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: