Closed Bug 25336 Opened 25 years ago Closed 24 years ago

Loading test4.html (with nsViewManager) makes mozilla loop forever...

Categories

(Core :: Web Painting, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED WORKSFORME

People

(Reporter: jst, Assigned: kmcclusk)

References

()

Details

Attachments

(1 file)

... while assering like crazy at

###!!! Break: at file nsViewManager.cpp, line 1066
###!!! ASSERTION: underflow: '!((PRInt32)pushcnt < 0)',
file nsViewManager.cpp, line 1066
Tried backing out kmcclusk's checkins to mozilla/view/src on 01/26/2000 but
that didn't help :(
Target Milestone: M14
I managed to fix the infinite (almost) loop in nsViewManager.cpp, I created a
patch that fixes the loop, cleans up some assertions in the viewmanager and
removes a duplicate call to SetClipRegion.

I tried to attach the patch but for some reason bugzilla doesn't accept it (!)
so in stead I made it available at

	http://www.citec.fi/~jst/nsViewManager.cpp.diff

With this patch I'm able to open test4.html.

beard, could you have a look at this and comment?
Thanks, I went ahead and attached the patch to the bug, so you don't have to keep 
it around on your site.
Status: NEW → ASSIGNED
Adding beta1 keyword since if Joe User gets ahold of beta1 and test4.html is
listed in the debug menu and loading it locks up the product he's thoughts about
the product won't be very high. And, since test9.html includes test4.html he'll
see the same thing there.
Keywords: beta1
Putting on PDT+ radar for beta1. 
Whiteboard: [PDT+]
This is fixed with nsViewManager2.
Applied the patch. Checking it in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Adding verifyme keyword.
Keywords: verifyme
beard, you left out the most important part of the patch! It still loops if
with nsViewManager but it's fixed in nsViewManager2. What happends is that we
enter a while loop that is protected with "pushcnt--" in this case with a
pushcnt that is 0 or negative, thus "pushcnt--" will be valid untill we wrap
arround from negative to positive and back down to 0, 2^32 tims, thus it
appears as if mozilla hangs. Here's a patch.

Index: src/nsViewManager.cpp
===================================================================
RCS file: /cvsroot/mozilla/view/src/nsViewManager.cpp,v
retrieving revision 3.146
diff -u -r3.146 nsViewManager.cpp
--- nsViewManager.cpp   2000/02/15 22:11:31     3.146
+++ nsViewManager.cpp   2000/02/18 14:14:59
@@ -1060,7 +1060,7 @@
 
     NS_ASSERTION((pushcnt >= 0), "underflow");
 
-    while (pushcnt--)
+    while (pushcnt-- > 0)
     {
       NS_ASSERTION((pushcnt >= 0), "underflow");
 
What's the deal, is nsViewManager going to be deleted or is it still going to be
used for something?

Since this works with nsViewManager2 (the current default) I'm removing the PDT+
status and beta1 and verifyme keywords but I'm reopening the bug untill
nsViewManger is removed or fixed, depending on what the plan is.
Status: RESOLVED → REOPENED
Keywords: beta1, verifyme
Resolution: FIXED → ---
Summary: Loading test4.html makes mozilla loop forever... → Loading test4.html (with nsViewManager) makes mozilla loop forever...
Whiteboard: [PDT+]
Target Milestone: M14 → M15
nsViewManager2 has changes in it to fix this bug. Kevin has the files, and should 
check them in.
Assignee: beard → kmcclusk
Status: REOPENED → NEW
Status: NEW → ASSIGNED
Bulk moving to M16
Target Milestone: M15 → M16
ViewManager2 has replaced ViewManager as the default. Eventually ViewManager 
will be removed altogether. It is useful to keep both around until it can be 
determined that ViewManager2 has sufficient performance to replace ViewManager, 
and all the bugs have been shaked out of ViewManager2. I will add the fix to 
ViewManager. Thanks..
Fixed in 4/13/2000 5:08PM build.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago24 years ago
Resolution: --- → FIXED
This problem is still occuring in the July 14th Linux build (2000071408). This 
test page 4 is not rendering and throbber continues to cycle but never stops.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Chris: Are you using view manager 1 or view manager 2? 
This is working fine on Linux. test4.html doesn't load because test4.html is not 
included with the commercial build on Linux. This bug was about assertions in 
the view manager which caused mozilla to look forever.

Marking as WORKSFORME.
Status: REOPENED → RESOLVED
Closed: 24 years ago24 years ago
Resolution: --- → WORKSFORME
Marking verified works for me in the Sept 14th build.
Status: RESOLVED → VERIFIED
Component: Layout: View Rendering → Layout: Web Painting
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: