App crashes when device switches its orientation from portrait to landscape and reversal for several times

VERIFIED FIXED in Firefox 8

Status

defect
--
major
VERIFIED FIXED
8 years ago
6 years ago

People

(Reporter: xti, Assigned: blassey)

Tracking

Firefox 7
Firefox 8
ARM
Android

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(3 attachments)

Posted file Crash logcat
Build id : Mozilla/5.0 (Android;Linux armv7l;rv:7.0a2)Gecko/20110726
Firefox/7.0a2 Fennec/7.0a2
Device: HTC Desire Z
OS: Android 2.2.1

Build id : Mozilla/5.0 (Android;Linux armv7l;rv:8.0a1)Gecko/20110726
Firefox/8.0a1 Fennec/8.0a1
Device: HTC Desire Z
OS: Android 2.2.1

Steps to reproduce:
1. Open Fennec App
2. Switch device orientation to landscape
3. Switch device orientation to portrait
4. Repeat step 2&3 for several times

Expected result:
App view is update due to every new change orientation without any errors.

Actual result:
App crashes and a Force Close message is displayed.

Note:
Please see the following video: http://www.youtube.com/user/qaioana#p/a/u/0/fX2naxFl1eI
Posted patch patchSplinter Review
Assignee: nobody → blassey.bugs
Attachment #548487 - Flags: review?(doug.turner)
Posted file logcat
Here's a more illustrative logcat. The problem is that we're attaching a new top level exception handler on every context restart. This was never the intention for that code. Bug 670773 mentions this stack overflow crash, but patches for the null pointer, so let's let that bug track that issue and this bug track the stack overflow.
tracking-fennec: --- → ?
Comment on attachment 548487 [details] [diff] [review]
patch


>+    private static boolean sTopLevelTryCatchAttached = false;

Verbose name, don't you think?  How about sTryCatchAttached.


Also add a comment as to why this boolean is needed.  I think something like:

// We do not want to attach a new top level exception handler on every context restart  See bug 674245.

>+        if (!sTopLevelTryCatchAttached) {
>+            sTopLevelTryCatchAttached = true;
>+            mMainHandler.post(new Runnable() {

add white space betwween the setting of sTryCatchAttached and the post() call.


We should clear sTopLevelTryCatchAttached when run() exits, right?
Attachment #548487 - Flags: review?(doug.turner) → review-
Comment on attachment 548487 [details] [diff] [review]
patch

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

r+ with those changes.  You can tell me that setting the sTopLevelTryCatchAttached to false is pointless.
Attachment #548487 - Flags: review- → review+
http://hg.mozilla.org/mozilla-central/rev/0d37af9e506f
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Whiteboard: [inbound]
Target Milestone: --- → Firefox 8
Verified Fixed
Mozilla/5.0 (Android; Linux armv7l; rv:8.0a1) Gecko/20110728 Firefox/8.0a1 Fennec/8.0a1
Status: RESOLVED → VERIFIED
tracking-fennec: ? → ---
You need to log in before you can comment on or make changes to this bug.