Closed
Bug 11674
Opened 25 years ago
Closed 25 years ago
[infinite loop] bugs - nsViewManager.cpp
Categories
(Core :: Web Painting, defect, P3)
Tracking
()
VERIFIED
FIXED
M15
People
(Reporter: jay, Assigned: kmcclusk)
References
Details
Analysis of the code has determined possible infinite loop
or problem in the code below. See bug
http://bugzilla.mozilla.org/show_bug.cgi?id=11588
for more information
nsViewManager.cpp:138: warning: unsigned value < 0 is always 0
Updated•25 years ago
|
Assignee: michaelp → kipp
Comment 1•25 years ago
|
||
michealp -> kipp, cc hyatt and warren.
Comment 2•25 years ago
|
||
124 hyatt 3.103 nsViewManager :: ~nsViewManager()
125 kipp 1.1 {
126 michaelp 3.7 if (nsnull != mTimer)
127 {
128 mTimer->Cancel(); //XXX this should not be
necessary. MMP
129 NS_RELEASE(mTimer);
130 }
131
132 kipp 1.1 NS_IF_RELEASE(mRootWindow);
133
134 michaelp 3.72 mRootScrollable = nsnull;
135
136 michaelp 3.33 --mVMCount;
137
138 NS_ASSERTION(!(mVMCount < 0), "underflow of
viewmanagers");
139
140 michaelp 3.72 if ((0 == mVMCount) &&
141 ((nsnull != mDrawingSurface) || (nsnull != gOffScreen)
||
142 (nsnull != gRed) || (nsnull != gBlue)))
143 kipp 1.1 {
144 nsIRenderingContext *rc;
145
146 warren 3.77 nsresult rv =
nsComponentManager::CreateInstance(kRenderingContextCID,
147 kipp 1.1 nsnull,
148
kIRenderingContextIID,
149 (void **)&rc);
150
Comment 3•25 years ago
|
||
who can own this one?...
Updated•25 years ago
|
Status: NEW → ASSIGNED
Comment 5•25 years ago
|
||
No loop here, so assertion is harmless.
Updated•25 years ago
|
Severity: normal → trivial
Target Milestone: M15
Comment 7•25 years ago
|
||
I'm now seeing infinite loop on test #8, linux, apprunner & viewer.
Break: at file nsViewManager.cpp, line 970
Assertion: "underflow" (!((PRInt32)pushcnt < 0)) at file nsViewManager.cpp, line
970
Break: at file nsViewManager.cpp, line 970
Assertion: "underflow" (!((PRInt32)pushcnt < 0)) at file nsViewManager.cpp, line
970
...
Assignee | ||
Comment 8•25 years ago
|
||
This one is easy to fix. All we need to do is change
static PRUint32 mVMCount; //number of viewmanagers
in nsViewManager.h to
static PRInt32 mVMCount; //number of viewmanagers
We don't need the larger maximum value that PRUInt gives us.
Old bug - petersen, does this still occur for you?
QA Contact: leger → petersen
Comment 10•25 years ago
|
||
Reassigning all view bugs to kevin.
Assignee: beard → kmcclusk
Status: ASSIGNED → NEW
Component: Browser-General → Views
Assignee | ||
Comment 11•25 years ago
|
||
There really isn't an infinite loop here.
I have a fix which will get rid of the warning.
Status: NEW → ASSIGNED
Assignee | ||
Comment 12•25 years ago
|
||
Fixed in 3/17/2000 build. Changed mVMCount from PRUint32 to PRInt32 to make
ASSERTION checking for a negative value in mWMCount valid
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updated•6 years ago
|
Component: Layout: View Rendering → Layout: Web Painting
You need to log in
before you can comment on or make changes to this bug.
Description
•