Ticket #173 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Stack overflow errors in IE related to context menus

Reported by: chrisclaydon Owned by: pagameba
Priority: P1 Milestone: 2.0
Component: Core Version: SVN
Severity: Major Keywords:
Cc: External ID: 1161259
state: Analysing Browser: IE7
Operating System: All

Description

1) Load the Sheboygan package from  http://download.osgeo.org/mapguide/releases/2.0.0/samples/Sheboygan.mgp

2) Open the LimeGold or TurquoiseYellow layout

3) Click on the legend tab

4) Right click on one of the layers to bring up the context menu

5) Right click on another layer to bring up the context menu

A "Stack overlow at line: 0" error dialog will come up.

It will also come up if you:

1) Bring up a context menu (in the legend or map)

2) Then (left) click anywhere on the "Tasks/Legend/Selection?" pane

I believe that this is IE only.

Change History

Changed 3 years ago by pagameba

  • owner changed from madair to pagameba
  • status changed from new to assigned

Changed 3 years ago by pagameba

  • state changed from Analysis Requested to Analysing

ugh! is all I have to say to this one so far ... researching ...

Changed 3 years ago by pagameba

The culprit is the eventInMenu method of menus, it has a recursive check to see if an event happened inside the menu before deciding if the mouse event should close the menu. The stack overflow seems to be triggered by a deeply nested call stack in IE, and recursion is often at fault.

I'm figuring out if we can refactor the code to remove the recursion.

Changed 3 years ago by pagameba

  • status changed from assigned to closed
  • resolution set to fixed

(In [1692]) Fixes #173. Remove recursive calls in eventInMenu, descendantOf and findElement to avoid stack overflow errors when closing menus from a mouse click in deeply nested HTML structures. This fix will be bundled in jxlib beta 5 which needs to be released in sync with changes to the mapguide templates (for fusion) so I have manually applied the fixes to this version of jxlib for now.

Note: See TracTickets for help on using tickets.