Closed Bug 804926 Opened 7 years ago Closed 7 years ago

java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp.requestRender(GeckoApp.java)

Categories

(Firefox for Android :: General, defect, critical)

19 Branch
ARM
Android
defect
Not set
critical

Tracking

()

RESOLVED FIXED
Firefox 19

People

(Reporter: scoobidiver, Assigned: bnicholson)

References

Details

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

Crash Data

Attachments

(1 file)

It has been hit by 2 users in 19.0a1/20121023. The regression range is:
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=1c3e4cb1f754&tochange=48502b61a63e

Here is a crash ID: bp-cf0b87b1-63db-4cb1-b79d-7a13c2121024.

java.lang.NullPointerException
	at org.mozilla.gecko.GeckoApp.requestRender(GeckoApp.java:1407)
	at org.mozilla.gecko.GeckoApp.hidePlugins(GeckoApp.java:1419)
	at org.mozilla.gecko.GeckoApp.onTabChanged(GeckoApp.java:236)
	at org.mozilla.gecko.BrowserApp.onTabChanged(BrowserApp.java:116)
	at org.mozilla.gecko.Tabs.notifyListeners(Tabs.java:408)
	at org.mozilla.gecko.Tabs.notifyListeners(Tabs.java:397)
	at org.mozilla.gecko.Tabs$2.run(Tabs.java:144)
	at android.app.Activity.runOnUiThread(Activity.java:4591)
	at org.mozilla.gecko.Tabs.selectTab(Tabs.java:136)
	at org.mozilla.gecko.Tabs.loadUrl(Tabs.java:511)
	at org.mozilla.gecko.Tabs.loadUrl(Tabs.java:467)
	at org.mozilla.gecko.BrowserApp.initializeChrome(BrowserApp.java:276)
	at org.mozilla.gecko.GeckoApp.initialize(GeckoApp.java:1647)
	at org.mozilla.gecko.GeckoApp.onWindowFocusChanged(GeckoApp.java:2068)
	at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2423)
	at android.view.View.dispatchWindowFocusChanged(View.java:7321)
	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:933)
	at android.view.ViewRootImpl$ViewRootHandler.handleMessage(ViewRootImpl.java:2883)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4745)
	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:786)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
	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.gecko.GeckoApp.requestRender%28GeckoApp.java%29
Crash Signature: [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp.requestRender(GeckoApp.java)] → [@ java.lang.NullPointerException: at org.mozilla.gecko.GeckoApp.requestRender(GeckoApp.java) ]
Bug 803293 moved the call to Tabs.registerOnTabsChangedListener(this); in GeckoApp.java up to before initializeChrome call, which caused this regression. mLayerView is not initialized yet at that point, so when it tries to handle the tab selection it throws an NPE.
Blocks: 803293
I haven't been able to reproduce this, but I think this patch should fix it.
Assignee: nobody → bnicholson
Attachment #674757 - Flags: review?(bugmail.mozilla)
Comment on attachment 674757 [details] [diff] [review]
Move view initializations to initializeChrome()

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

Oh boy. While I think this change is a good one to have, I'd recommend running it through try before landing. This changes the layer view initialization to before the gecko thread is started, which may have timing/correctness implications.
Attachment #674757 - Flags: review?(bugmail.mozilla) → review+
https://hg.mozilla.org/mozilla-central/rev/91698ac90375
Status: NEW → RESOLVED
Closed: 7 years ago
Flags: in-testsuite-
Resolution: --- → FIXED
Target Milestone: --- → Firefox 19
You need to log in before you can comment on or make changes to this bug.