Closed Bug 958267 Opened 11 years ago Closed 7 years ago

[GeckoView] Crash when changing screen orientation of device

Categories

(GeckoView :: General, defect)

ARM
Android
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: BenB, Unassigned)

References

Details

(Keywords: crash)

Attachments

(1 file)

Reproduction: 1. Create an app that embeds GeckoView 2. Run it 3. Turn the device to change the screen orientation Actual result: Crash Expected result: App continues to run Page context stays
I/MyApp(27395): app started W/Clipboard(27395): Clipboard.init() called twice! W/GeckoHardwareUtils(27395): HardwareUtils.init called twice! D/GeckoLayerClient(27395): Screen-size changed to (1920,1128) I/GeckoAxis(27395): Prefs: 0.85,0.97,10.0,0.04,0.04,0.3,0.5 I/GeckoDisplayPort(27395): Set strategy VelocityBiasStrategy mult=2.0, threshold=7.6800003, reverse=0.2, dangerBaseX=1.0, dangerBaseY=1.0, dangerIncrX=0.0, dangerIncrY=0.0 I/MyApp(27395): app started W/Clipboard(27395): Clipboard.init() called twice! W/GeckoHardwareUtils(27395): HardwareUtils.init called twice! I/GeckoAxis(27395): Prefs: 0.85,0.97,10.0,0.04,0.04,0.3,0.5 D/GeckoLayerClient(27395): Screen-size changed to (1200,1848) D/AndroidRuntime(27395): Shutting down VM I/GeckoDisplayPort(27395): Set strategy VelocityBiasStrategy mult=2.0, threshold=7.6800003, reverse=0.2, dangerBaseX=1.0, dangerBaseY=1.0, dangerIncrX=0.0, dangerIncrY=0.0 E/AndroidRuntime(27395): FATAL EXCEPTION: main E/AndroidRuntime(27395): java.lang.NullPointerException E/AndroidRuntime(27395): at org.mozilla.gecko.gfx.LayerRenderer.onTabChanged(LayerRenderer.java:714) E/AndroidRuntime(27395): at org.mozilla.gecko.Tabs$5.run(Tabs.java:586) E/AndroidRuntime(27395): at android.os.Handler.handleCallback(Handler.java:725) E/AndroidRuntime(27395): at android.os.Handler.dispatchMessage(Handler.java:92) E/AndroidRuntime(27395): at android.os.Looper.loop(Looper.java:213) E/AndroidRuntime(27395): at android.app.ActivityThread.main(ActivityThread.java:5092) E/AndroidRuntime(27395): at java.lang.reflect.Method.invokeNative(Native Method) E/AndroidRuntime(27395): at java.lang.reflect.Method.invoke(Method.java:511) E/AndroidRuntime(27395): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:797) E/AndroidRuntime(27395): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:564) E/AndroidRuntime(27395): at dalvik.system.NativeStart.main(Native Method) W/ActivityManager( 672): Force finishing activity org.bucksch.myapp.mozilla/.HTMLViewer
Mark Finkle's GeckoBrowser works, doesn't crash and adapts to screen changes. My app uses almost exactly the same code, and crashes. No idea why the difference. Is there a trick somewhere? The crash is clearly in GeckoView, though.
This is almost identical to GeckoBrowser. Appending only for completeness.
This is intimately connected to supporting Bug 1041633. What's really happening is that the changed configuration creates a second GeckoView instance, and *two* GeckoView instances are competing to be the singleton GeckoView instance that the embedded library expects. Badness of a variable nature ensues.
Move some old bugs with `[geckoview]` in their summary to the GeckoView Bugzilla component.
Component: General → GeckoView
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → GeckoView
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: