Closed Bug 842946 Opened 11 years ago Closed 11 years ago

Firefox does not load manually entered webpages after device restart or app install if "Do not keep activities" is enabled

Categories

(Firefox for Android Graveyard :: General, defect)

ARM
Android
defect
Not set
major

Tracking

(firefox19 affected, firefox20 affected, firefox21 affected, firefox22 verified, fennec+)

RESOLVED FIXED
Tracking Status
firefox19 --- affected
firefox20 --- affected
firefox21 --- affected
firefox22 --- verified
fennec + ---

People

(Reporter: AdrianT, Assigned: kats)

References

Details

Attachments

(3 files)

Attached file logs
Firefox Mobile 19/ Aurora 20.0a2 2013-02-19 / Nightly 21.0a1 2013-02-19
Samsung Galaxy S2 (Android 4.0.3)/Samsung Galaxy Note (Android 4.0.3)

Steps to reproduce:
1. Set "Do not keep activities" to enable - from Settings/Developer options
2. Restart the device
3. Open Firefox Mobile and manually enter an url - for e.g. google.com
4. Open any url from bookmarks and history and then manually enter google.com again

Expected results:
The page is loaded each time the user tries to open it

Actual results:
At least the first time a user manually enters an url after device restart or app install nothing happens. After a page is loaded from the about:home thumbnails or history the user can load urls manually again
This was fixed in bug 769269. Are you saying that this regressed?
Ok, I can reproduce this. I'm thinking if this is yet again what people mean on Google Play when websites don't load. They still have the stupid developer option enabled. Do we need to slap a dialog in their face again?
On 19

E/GeckoConsole( 1322): [JavaScript Error: "TypeError: BrowserApp.selectedTab is null" {file: "chrome://browser/content/browser.js" line: 6607}]

E/GeckoConsole( 1322): [JavaScript Error: "TypeError: this.selectedTab is null" {file: "chrome://browser/content/browser.js" line: 1082}]

On 22

D/StrictMode( 1668): StrictMode policy violation; ~duration=112 ms: android.os.StrictMode$StrictModeDiskReadViolation: policy=31 violation=2
D/StrictMode( 1668): 	at android.os.StrictMode$AndroidBlockGuardPolicy.onReadFromDisk(StrictMode.java:1107)


followed by

W/EventDispatcher( 1668): java.lang.IllegalArgumentException
W/EventDispatcher( 1668): 	at org.mozilla.gecko.util.EventDispatcher.registerEventListener(EventDispatcher.java:30)
W/EventDispatcher( 1668): 	at org.mozilla.gecko.JavaAddonManager.init(JavaAddonManager.java:76)
W/EventDispatcher( 1668): 	at org.mozilla.gecko.BrowserApp.onCreate(BrowserApp.java:240)
W/EventDispatcher( 1668): 	at android.app.Activity.performCreate(Activity.java:5008)
W/EventDispatcher( 1668): 	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.access$600(ActivityThread.java:130)
W/EventDispatcher( 1668): 	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
W/EventDispatcher( 1668): 	at android.os.Handler.dispatchMessage(Handler.java:99)
W/EventDispatcher( 1668): 	at android.os.Looper.loop(Looper.java:137)
W/EventDispatcher( 1668): 	at android.app.ActivityThread.main(ActivityThread.java:4745)
W/EventDispatcher( 1668): 	at java.lang.reflect.Method.invokeNative(Native Method)
W/EventDispatcher( 1668): 	at java.lang.reflect.Method.invoke(Method.java:511)
W/EventDispatcher( 1668): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
W/EventDispatcher( 1668): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
W/EventDispatcher( 1668): 	at dalvik.system.NativeStart.main(Native Method)
Filed bug 843300 for the JavaAddonManager thing. That should be mostly benign.

The selectedTab errors were fixed in bug 833777 I think.
For the record, the warning happens because the Viewport:Change handler in browser.js calls this.selectedTab.setViewport if isBrowserContentDocumentDisplayed returns true. Changing it to return false skips the setViewport call and (I believe) should not have any other bad side effects.
Attachment #716204 - Flags: review?(mark.finkle)
The above patch doesn't fix the problem in comment 0 though. If you wait for gecko to fully start up before trying to load the page it works fine. If you open the awesome screen before gecko is fully started up then loading the page fails. In fact it looks like the gecko thread gets blocked completely on starting the compositor. There are a lot of "Gecko event sync taking too long" warnings in the log as a result.
Attachment #716204 - Flags: review?(mark.finkle) → review+
I debugged the problem some more and it appears to be rather moronic. When we start up Gecko, the compositor tries to acquire a surface. When the awesomescreen is displayed, there is no surface available, and the compositor blocks. That's all fine and well, and what should happen is that the compositor gets unblocked once we dismiss the awesomescreen. What's actually happening is that the compositor ends up in GLController.waitForValidSurface and waits for a notify which never arrives. It never arrives because when we dismiss the awesomescreen, we create a new LayerView and new GLController instance, and notify *that* one. So that thread basically gets stuck there forever, or something. It ends up in a pretty bad state, at any rate.
This patch combined with the one I uploaded to bug 834243 fixes this issue. I want to test it a bit more before requesting review though.
Assignee: nobody → bugmail.mozilla
tracking-fennec: ? → +
Landed the r+'d patch: https://hg.mozilla.org/integration/mozilla-inbound/rev/d63e1c2e39b2

But it shouldn't fix this bug so leaving open.
Whiteboard: [leave open]
This should be fixed in the March 1 nightly with the landing of bug 844275. Please reopen if this still happens.
Whiteboard: [leave open]
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Verified fixed on:
-build: Firefox for Android 22 Beta 2
-Device: Samsung Galaxy S2
-OS: Android 4.0.3
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: