java.lang.NullPointerException: at org.mozilla.gecko.AwesomeBarTabs.onBackPressed(AwesomeBarTabs.java)

RESOLVED FIXED in Firefox 13

Status

()

Firefox for Android
General
--
critical
RESOLVED FIXED
6 years ago
2 years ago

People

(Reporter: Scoobidiver (away), Assigned: Margaret)

Tracking

({crash, regression})

13 Branch
Firefox 13
ARM
Android
crash, regression
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [native-crash], crash signature)

Attachments

(1 attachment)

(Reporter)

Description

6 years ago
It first appeared in 13.0a1/20120225.

java.lang.NullPointerException
	at org.mozilla.gecko.AwesomeBarTabs.onBackPressed(AwesomeBarTabs.java:326)
	at org.mozilla.gecko.AwesomeBar$3.onKeyPreIme(AwesomeBar.java:182)
	at org.mozilla.gecko.AwesomeBar$AwesomeBarEditText.onKeyPreIme(AwesomeBar.java:568)
	at android.view.View.dispatchKeyEventPreIme(View.java:3882)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:776)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:776)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:776)
	at android.view.ViewGroup.dispatchKeyEventPreIme(ViewGroup.java:776)
	at android.view.ViewRoot.deliverKeyEvent(ViewRoot.java:2572)
	at android.view.ViewRoot.handleMessage(ViewRoot.java:1883)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:130)
	at org.mozilla.gecko.GeckoApp$35.run(GeckoApp.java:1798)
	at android.os.Handler.handleCallback(Handler.java:587)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:130)
	at android.app.ActivityThread.main(ActivityThread.java:3691)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:507)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A%20at%20org.mozilla.gecko.AwesomeBarTabs.onBackPressed%28AwesomeBarTabs.java%29
Regression from bug 727451
Blocks: 727451
(Assignee)

Updated

6 years ago
Assignee: nobody → margaret.leibovic
(Reporter)

Updated

6 years ago
Keywords: regression
(Assignee)

Comment 2

6 years ago
Created attachment 601452 [details] [diff] [review]
patch

It looks like this could happen if the user switches to the bookmarks tab and then presses back quickly, before BookmarksQueryTask has finished. In this case, the user wouldn't have entered a folder, so returning false will do the correct thing and exit the awesome screen activity.
Attachment #601452 - Flags: review?(lucasr.at.mozilla)
Comment on attachment 601452 [details] [diff] [review]
patch

Review of attachment 601452 [details] [diff] [review]:
-----------------------------------------------------------------

Good catch.

::: mobile/android/base/AwesomeBarTabs.java
@@ +319,5 @@
>      // This method checks to see if we're in a bookmark sub-folder. If we are,
>      // it will go up a level and return true. Otherwise it will return false.
>      public boolean onBackPressed() {
> +        // If we're not in the bookmarks tab, we have nothing to do. We should
> +        // also return false mBookmarksAdapter hasn't been initialized yet.

"if mBookmarksAdapter"
Attachment #601452 - Flags: review?(lucasr.at.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/1798a6497673
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 13
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.