Closed Bug 117109 Opened 23 years ago Closed 23 years ago

assertion on Mac menu code

Categories

(Core :: XUL, defect)

PowerPC
Mac System 9.x
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: ftang, Assigned: sfraser_bugs)

Details

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
from cvsblame, it looks like saari's origional code but sfraser also hack gPreviousMenuHandleStack reassign to sfraser and cc saari
Assignee: hyatt → sfraser
Went in with the changes for bug 113480.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
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.