Closed Bug 640068 Opened 9 years ago Closed 9 years ago

Browser does not restart when installing extensions

Categories

(Firefox for Android Graveyard :: Extension Compatibility, defect)

ARM
Android
defect
Not set

Tracking

(fennec2.0+)

VERIFIED FIXED
Tracking Status
fennec 2.0+ ---

People

(Reporter: kbrosnan, Assigned: dougt)

Details

(Keywords: crash)

Attachments

(4 files, 6 obsolete files)

Using the Ideos s7 tablet.

Install an extension that requires a restart or uninstall an extension requiring a restart.
Click the restart Firefox button after the extension installs

results:
Firefox does not restart

expected:
Firefox restarts and the extension is installed

Firefox Mobile build id 20110308121615
Attached file logcat of a restart request (obsolete) —
there's only one line on your log?
The correct log.
Attachment #518086 - Attachment is obsolete: true
I have seen this on my Nexus One and on a Galaxy Tab, too. Installed TwitterBar, hit Restart. Browser shuts down but doesn't restart.
Keywords: crash
OS: Windows 7 → Android
Hardware: x86 → ARM
Assignee: nobody → blassey.bugs
tracking-fennec: ? → 2.0+
Assignee: blassey.bugs → nobody
Attached file Another logcat
This time: trying to install add-on "readability" - same issue - browser quits but fails to restart on my Galaxy Tab
Attached patch patch to sleep after the kill (obsolete) — Splinter Review
Attachment #518287 - Flags: review?(doug.turner)
Attached patch patch to wait after kill (obsolete) — Splinter Review
Attachment #518288 - Flags: review?(doug.turner)
Attached patch patch v.1 (obsolete) — Splinter Review
Assignee: nobody → doug.turner
Attachment #518287 - Attachment is obsolete: true
Attachment #518288 - Attachment is obsolete: true
Attachment #518287 - Flags: review?(doug.turner)
Attachment #518288 - Flags: review?(doug.turner)
Attachment #518304 - Flags: review?(blassey.bugs)
Comment on attachment 518304 [details] [diff] [review]
patch v.1

spoke to brad.  needs to not hardcode processes, and probably should tokenize the ps output so that if anyone ever installs a different ps (or ps output changes), the right thing will continue to happen.
Attachment #518304 - Flags: review?(blassey.bugs) → review-
Comment on attachment 518304 [details] [diff] [review]
patch v.1

gave my review comments to dougt on irc
Attached patch patch v.2 (obsolete) — Splinter Review
Attachment #518304 - Attachment is obsolete: true
Attachment #518553 - Flags: review?(blassey.bugs)
Duplicate of this bug: 640190
Priority: P2 → --
Comment on attachment 518553 [details] [diff] [review]
patch v.2

I'd like to avoid Runtime.exec() if we can. From what I've heard from you, the best way to list processes is to use Runtime.exec("ps"), but let's not open the flood gates because of that. You can use Process.killProcess(pid) rather than Runtime.exed("kill -9 " + pid) and you can use getUidForName(username) to compare the and Process.myUid() to check if the process is one of ours.

As to your comment that killProcess() doesn't work, see the patch I posted last night for how to make that work.

Also, when using Log.i for an exception, you should pass the exception as the third argument rather than appending it to the end of the message.
Attachment #518553 - Flags: review?(blassey.bugs) → review-
Attached patch v.3 (obsolete) — Splinter Review
untested w/ blassey's nits.

please review, and i can test on my devices.
Attachment #518594 - Flags: review?(blassey.bugs)
Attachment #518594 - Attachment is patch: true
Attachment #518594 - Attachment mime type: application/octet-stream → text/plain
Comment on attachment 518594 [details] [diff] [review]
v.3

fixed the commit line.
The build at http://people.mozilla.org/~dougt/fennec.apk restarts fine on Verizon Galaxy Tab.
same on the g2, my tab, and this huawei tablet.
Attached patch v.4Splinter Review
Attachment #518553 - Attachment is obsolete: true
Attachment #518594 - Attachment is obsolete: true
Attachment #518594 - Flags: review?(blassey.bugs)
Attachment #518628 - Flags: review?(blassey.bugs)
Comment on attachment 518628 [details] [diff] [review]
v.4


>-                int pid = Integer.parseInt(p.getName());
>+
>+        class GeckoPidCallback implements GeckoProcessesVisitor {
nit, there's an extra blank line here, remove it

>+                    try {
>+                        Thread.currentThread().sleep(100);
>+                    } catch (InterruptedException ie) {}
>+                }
>+            }
>         } catch (Exception e) {
>             Log.i("Restarter", e.toString());
While you're here, use the 3 argument version of the log method
Attachment #518628 - Flags: review?(blassey.bugs) → review+
http://hg.mozilla.org/mozilla-central/rev/823105711a3b

missed the followups (sry).
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
This issue is still reproducing on Sony Ericsson Xperia X10 - Android 2.1-update1
Please see the following video: http://www.youtube.com/user/qaioana#p/a/u/0/lckokurNxfg

Build id : Mozilla/5.0 (Maemo;Linux armv7l;rv:2.0b13pre)Gecko/201100310
Firefox/4.0b13pre Fennec /4.0b6pre
Device: Sony Ericsson Xperia X10
OS: Android 2.1 update 1
The video from above is a mistake. Sorry
(In reply to comment #23)
> The video from above is a mistake. Sorry

What kind of mistake? Does the problem still happen or not?
This part of my comment shouldn't exits:
"Please see the following video:
http://www.youtube.com/user/qaioana#p/a/u/0/lckokurNxfg"

The issue is still reproducing on the:
Build id : Mozilla/5.0 (Maemo;Linux armv7l;rv:2.0b13pre)Gecko/201100310
Firefox/4.0b13pre Fennec /4.0b6pre
It seems to be fixed on the latest nightly Build id : Mozilla/5.0 (Maemo;Linux armv7l;rv:2.0b13pre)Gecko/201100311
Firefox/4.0b13pre Fennec /4.0b6pre
(In reply to comment #26)
> It seems to be fixed on the latest nightly Build id : Mozilla/5.0 (Maemo;Linux
> armv7l;rv:2.0b13pre)Gecko/201100311
> Firefox/4.0b13pre Fennec /4.0b6pre

that's yesterday's build and doesn't have the patches from this bug
err.. the 3/10 build was yesterday's you already figured that out
Verified fixed w/
Mozilla/5.0 (Android; Linux armv7l; rv:2.0b13pre) Gecko/20110317 Firefox/4.0b13pre Fennec/4.0b6pre
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.