Closed Bug 1129840 Opened 7 years ago Closed 5 years ago

Tabs are not always restored on Gingerbread devices

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
normal

Tracking

(fennec+)

RESOLVED WORKSFORME
Tracking Status
fennec + ---

People

(Reporter: cos_flaviu, Unassigned)

Details

Environment: 
Device: Samsung Galaxy R (Android 2.3.4);
Build: Nightly 38.0a1 (2015-02-04);

Steps to reproduce:
1. Go to Settings -> Customize -> Tabs and enable Always restore tabs;
2. Load a few pages each in new tab;
3. Open a new tab and go to about:home;
4. While in about:home tap on Options -> Quit.
5. Launch fennec.

Expected result:
Fennec is launched and all the opened tabs from step 2 are restored.

Actual result:
None of the opened tabs are restored; Fennec launches with one about:home tab.

Notes:
Not reproducible every time. 
The bug is specific to Gingerbread devices because only those have the Quit option in menu.

The following exceptions are thrown when launching Fennec.

E/GeckoSessionParser(3329): JSON error
E/GeckoSessionParser(3329): org.json.JSONException: Index 0 out of range [0..0)
E/GeckoSessionParser(3329): 	at org.json.JSONArray.get(JSONArray.java:263)
E/GeckoSessionParser(3329): 	at org.json.JSONArray.getJSONObject(JSONArray.java:480)
E/GeckoSessionParser(3329): 	at org.mozilla.gecko.SessionParser.parse(SessionParser.java:70)
E/GeckoSessionParser(3329): 	at org.mozilla.gecko.GeckoApp.restoreSessionTabs(GeckoApp.java:1676)
E/GeckoSessionParser(3329): 	at org.mozilla.gecko.GeckoApp.onWindowFocusChanged(GeckoApp.java:1946)
E/GeckoSessionParser(3329): 	at org.mozilla.gecko.BrowserApp.onWindowFocusChanged(BrowserApp.java:985)
E/GeckoSessionParser(3329): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2056)
E/GeckoSessionParser(3329): 	at android.view.View.dispatchWindowFocusChanged(View.java:4048)
E/GeckoSessionParser(3329): 	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:659)
E/GeckoSessionParser(3329): 	at android.view.ViewRoot.handleMessage(ViewRoot.java:2021)
E/GeckoSessionParser(3329): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoSessionParser(3329): 	at android.os.Looper.loop(Looper.java:130)
E/GeckoSessionParser(3329): 	at android.app.ActivityThread.main(ActivityThread.java:3691)
E/GeckoSessionParser(3329): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoSessionParser(3329): 	at java.lang.reflect.Method.invoke(Method.java:507)
E/GeckoSessionParser(3329): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
E/GeckoSessionParser(3329): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
E/GeckoSessionParser(3329): 	at dalvik.system.NativeStart.main(Native Method)
E/GeckoApp(3329): An error occurred during restore
E/GeckoApp(3329): org.mozilla.gecko.GeckoApp$SessionRestoreException: No tabs could be read from session file
E/GeckoApp(3329): 	at org.mozilla.gecko.GeckoApp.restoreSessionTabs(GeckoApp.java:1685)
E/GeckoApp(3329): 	at org.mozilla.gecko.GeckoApp.onWindowFocusChanged(GeckoApp.java:1946)
E/GeckoApp(3329): 	at org.mozilla.gecko.BrowserApp.onWindowFocusChanged(BrowserApp.java:985)
E/GeckoApp(3329): 	at com.android.internal.policy.impl.PhoneWindow$DecorView.onWindowFocusChanged(PhoneWindow.java:2056)
E/GeckoApp(3329): 	at android.view.View.dispatchWindowFocusChanged(View.java:4048)
E/GeckoApp(3329): 	at android.view.ViewGroup.dispatchWindowFocusChanged(ViewGroup.java:659)
E/GeckoApp(3329): 	at android.view.ViewRoot.handleMessage(ViewRoot.java:2021)
E/GeckoApp(3329): 	at android.os.Handler.dispatchMessage(Handler.java:99)
E/GeckoApp(3329): 	at android.os.Looper.loop(Looper.java:130)
E/GeckoApp(3329): 	at android.app.ActivityThread.main(ActivityThread.java:3691)
E/GeckoApp(3329): 	at java.lang.reflect.Method.invokeNative(Native Method)
E/GeckoApp(3329): 	at java.lang.reflect.Method.invoke(Method.java:507)
E/GeckoApp(3329): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:907)
E/GeckoApp(3329): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:665)
E/GeckoApp(3329): 	at dalvik.system.NativeStart.main(Native Method)
tracking-fennec: --- → ?
Is this a recent regression?
Is 37 affected? Regression from bug 1015516?
This could be related to the formdata data patch I landed in bug 671993.
Assignee: nobody → mark.finkle
tracking-fennec: ? → 38+
I'm getting this in my local build on my N7 (non-GB) by swiping-to-close and reinstalling a new build (which kills the old one)
Any news, mfinkle? Should this be reassigned?
Flags: needinfo?(mark.finkle)
Assignee: mark.finkle → nobody
tracking-fennec: 38+ → +
Flags: needinfo?(mark.finkle)
We no longer support Gingerbread, although by enabling the data clearing options or through an add-on the Quit menu can still be used. In any case I think that with the recent work on the session store (in this context especially bug 1228593) this should work now.
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → WORKSFORME
Product: Firefox for Android → Firefox for Android Graveyard
You need to log in before you can comment on or make changes to this bug.