assertion on Mac menu code

RESOLVED FIXED

Status

()

Core
XUL
RESOLVED FIXED
17 years ago
10 years ago

People

(Reporter: Frank Tang, Assigned: Simon Fraser)

Tracking

Trunk
PowerPC
Mac System 9.x
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
on MacOS 9, I always got assertion when I click on menu bar
The assertion said
###!!! ASSERTION: nsVoidArray::ElementAt(negative index) - note on bug 96108: 
'aIndex >= 0', file nsVoidArray.h, line 77

and the stack trace show me
nsDynamicMDEFMain
nsCheckDestroy(MenuInfo**,short*)
nsDebug::Assertion(const char*,const char*,const char*,int)
dprintf(const char*,...)
InterfaceLib 0xFFD03A30 (PPC)

....
for nsCheckDestroy(MenuInfo**,short*), it stop at 
  if(!gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1])

void nsCheckDestroy(MenuHandle theMenu, short * whichItem)
{
the (*gPreviousMenuHandleStack.mImpl).mCount is euqal to 0
and some other time it will assert in the following stack

nsDynamicMDEFMain
nsDynamicSizeTheMenu(MenuInfo**)
nsDoMagic(MenuInfo**)
nsBuildMenu(MenuInfo**,int)
nsPostBuild(nsIMenu*,MenuInfo**,int)
nsDebug::Assertion(const char*,const char*,const char*,int)
dprintf(const char*,...)

again the problem is in 
nsPostBuild(nsIMenu*,MenuInfo**,int)
and the line is
if(isChild || (gPreviousMenuHandleStack[gPreviousMenuHandleStack.Count() - 1] != 
theMenu))
  {

where 
the (*gPreviousMenuHandleStack.mImpl).mCount is euqal to 0
(Reporter)

Comment 1

17 years ago
from cvsblame, it looks like saari's origional code but sfraser also hack
gPreviousMenuHandleStack

reassign to sfraser and cc saari
Assignee: hyatt → sfraser
(Assignee)

Comment 2

17 years ago
Went in with the changes for bug 113480.
Status: NEW → RESOLVED
Last Resolved: 17 years ago
Resolution: --- → FIXED

Updated

10 years ago
Component: XP Toolkit/Widgets: Menus → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.