Closed Bug 854179 Opened 12 years ago Closed 11 years ago

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

Categories

(Firefox for Android Graveyard :: Web Apps (PWAs), defect, P2)

22 Branch
ARM
Android
defect

Tracking

(firefox21 unaffected, firefox22 affected, firefox23 fixed)

RESOLVED FIXED
Firefox 23
Tracking Status
firefox21 --- unaffected
firefox22 --- affected
firefox23 --- fixed

People

(Reporter: scoobidiver, Assigned: wesj)

References

Details

(Keywords: crash, regression, Whiteboard: [native-crash][A4A])

Crash Data

Attachments

(1 file, 1 obsolete file)

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
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)
Whiteboard: [native-crash] → [native-crash][A4A]
Blocks: 862014
Attached patch Patch (obsolete) — Splinter Review
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)
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.WebApp.…
Keywords: regression
Version: Trunk → Firefox 22
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
Status: NEW → ASSIGNED
Attached patch PatchSplinter Review
(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+
https://hg.mozilla.org/mozilla-central/rev/8f2977671264
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 23
Crash Signature: org.mozilla.gecko.WebApp.onTabChanged(WebApp.java) ] → org.mozilla.gecko.WebApp.onTabChanged(WebApp.java) ] [@ java.lang.NullPointerException: at org.mozilla.firefox_beta.WebApp.onTabChanged(WebApp.java)]
Uplift to Beta 22?
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: