bugzilla.mozilla.org has resumed normal operation. Attachments prior to 2014 will be unavailable for a few days. This is tracked in Bug 1475801.
Please report any other irregularities here.

java.lang.NullPointerException: at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java)

RESOLVED FIXED in Firefox 23

Status

()

Firefox for Android
Web Apps
P2
critical
RESOLVED FIXED
5 years ago
5 years ago

People

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

Tracking

({crash, regression})

22 Branch
Firefox 23
ARM
Android
crash, regression
Points:
---

Firefox Tracking Flags

(firefox21 unaffected, firefox22 affected, firefox23 fixed)

Details

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

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

5 years ago
There's one crash in 22.0a1/20130323: bp-3d2fe647-3ed4-4743-be4d-4a2242130324.

java.lang.NullPointerException
	at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java:236)
	at org.mozilla.gecko.Tabs$4.run(Tabs.java:518)
	at android.os.Handler.handleCallback(Handler.java:725)
	at android.os.Handler.dispatchMessage(Handler.java:92)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:5226)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562)
	at dalvik.system.NativeStart.main(Native Method)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.fennec.WebApp.onTabChanged%28WebApp.java%29
(Reporter)

Comment 1

5 years ago
More reports also at:
https://crash-stats.mozilla.com/report/list?signature=java.lang.NullPointerException%3A+at+org.mozilla.fennec_aurora.WebApp.onTabChanged%28WebApp.java%29
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java)] → [@ java.lang.NullPointerException: at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java)] [@ java.lang.NullPointerException: at org.mozilla.fennec_aurora.WebApp.onTabChanged(WebApp.java) ]
Assignee: nobody → wjohnston
Component: General → Web Apps
QA Contact: aaron.train
Wes - What's the impact of this crash?

Questions I have are:

1. What Android OS version would hit this crash?
2. What STR would likely trigger this crash?
3. How likely would a user hit this crash?
Flags: needinfo?(wjohnston)

Updated

5 years ago
Whiteboard: [native-crash] → [native-crash][A4A]
Blocks: 862014
(Assignee)

Comment 3

5 years ago
Created attachment 738222 [details] [diff] [review]
Patch

Not really sure. From what I can tell on Aurora this is happening because mSplashScreen is null. I'm not exactly sure how that happens, since we only set it if we're showing the splash screen, I assume this is some case where we didn't show the splashscreen?

This may fix it...
Attachment #738222 - Flags: review?(mark.finkle)
Flags: needinfo?(wjohnston)
(Reporter)

Updated

5 years ago
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java)] [@ java.lang.NullPointerException: at org.mozilla.fennec_aurora.WebApp.onTabChanged(WebApp.java) ] → [@ java.lang.NullPointerException: at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java)] [@ java.lang.NullPointerException: at org.mozilla.fennec_aurora.WebApp.onTabChanged(WebApp.java) ] [@ java.lang.NullPointerException: at org.mozilla.gecko.…
status-firefox21: --- → unaffected
status-firefox23: --- → affected
Keywords: regression
Version: Trunk → Firefox 22

Updated

5 years ago
Priority: -- → P2
Comment on attachment 738222 [details] [diff] [review]
Patch

I am unsure as to how this could fix the issue. It looks like mSplashScreen is null in onAnimationEnd:
http://mxr.mozilla.org/mozilla-aurora/source/mobile/android/base/WebApp.java.in#236

But it was not null shortly before that. We use mSplashScreen to start the animation:
http://mxr.mozilla.org/mozilla-aurora/source/mobile/android/base/WebApp.java.in#243

Can mSplashScreen be killed or reset to null while the animation is happening? Is the splashscreen being closed by some other means?

Doesn't this patch cause a crash here:
http://mxr.mozilla.org/mozilla-aurora/source/mobile/android/base/WebApp.java.in#130

How can you just remove initializing mSplashScreen, but still use the variable?
Attachment #738222 - Flags: review?(mark.finkle) → review-
If we have no clues as to why mSplashScreen is null in onAnimationEnd, I think a bandaid patch would be to null check mSplashScreen here:
http://mxr.mozilla.org/mozilla-aurora/source/mobile/android/base/WebApp.java.in#236

Updated

5 years ago
Status: NEW → ASSIGNED
(Assignee)

Comment 6

5 years ago
Created attachment 747172 [details] [diff] [review]
Patch

(In reply to Mark Finkle (:mfinkle) from comment #4)
> How can you just remove initializing mSplashScreen, but still use the
> variable?

Sorry for the delay. I didn't remove it. I just moved where it was initialized to onCreate(). Maybe we're hitting onCreate while (somehow?, Maybe on a really slow phone super.onCreate() takes long enough that Gecko is running before it returns?)

http://mxr.mozilla.org/mozilla-aurora/source/mobile/android/base/WebApp.java.in#57

so that we never call showSplash and never initialize mSplashScreen. The we get a LOADED event and mSplashscreen is null.

Or maybe we're starting but never hitting onCreate... Not sure how either would happen. I added some null checks to be safe here...
Attachment #738222 - Attachment is obsolete: true
Attachment #747172 - Flags: review?(mark.finkle)
Attachment #747172 - Flags: review?(mark.finkle) → review+

Comment 8

5 years ago
https://hg.mozilla.org/mozilla-central/rev/8f2977671264
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
(Reporter)

Updated

5 years ago
status-firefox23: affected → fixed
(Reporter)

Updated

5 years ago
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java)] [@ java.lang.NullPointerException: at org.mozilla.fennec_aurora.WebApp.onTabChanged(WebApp.java) ] [@ java.lang.NullPointerException: at org.mozilla.gecko.… → [@ java.lang.NullPointerException: at org.mozilla.fennec.WebApp.onTabChanged(WebApp.java)] [@ java.lang.NullPointerException: at org.mozilla.fennec_aurora.WebApp.onTabChanged(WebApp.java) ] [@ java.lang.NullPointerException: at org.mozilla.gecko.…
(Reporter)

Updated

5 years ago
Duplicate of this bug: 872422
(Reporter)

Comment 10

5 years ago
Uplift to Beta 22?
You need to log in before you can comment on or make changes to this bug.