[mapguide][MG280][Modified] Fix crash when opening invalid package

Walt Welton-Lair walt.welton-lair at autodesk.com
Fri May 5 14:18:36 EDT 2006


You can view the artifact detail at the following URL:

    https://mapguide.osgeo.org/servlets/Scarab/id/MG280

Type:
Defect

Artifact ID:
MG280 (Fix crash when opening invalid package)

Modified by:
Walt Welton-Lair
waltweltonlair (walt.welton-lair at autodesk.com)

The following modifications were made to this artifact:
---------------------------------------------------------------------

-- Artifact Status changed:
Old value:
New
New value:
Resolved
-- Resolution set to new value:
Submitted
-- Developer Notes set to new value:
The crash is caused by a bug with gcc 3.2.3.  When compiling with 'g++ -O2 -fomit-frame-pointer', throwing an exception will sometimes cause the program to abort.  The dwfcore library is compiled with these settings, and it's raising an exception when the invalid package file is loaded.  This causes the server to segfault.

If I recompile dwfcore without the -fomit-frame-pointer option then the server doesn't crash.

Once the crash was fixed, I noticed that the error message returned to the admin tool (on the gcc 3.2.3 Linux machine) was "Failed to retrieve the third party exception mesage. This message may not be unicode compliant."  The expected message (works on Windows and gcc 4.0.2) is "File not found in archive."  Again this is due to some gcc 3.2.3 compiler weirdness under release.

Changing the following code:
    MgStringCollection arguments;
    arguments.Add(e.message());

(where e.message() returns a wchar_t*) to:

    MgStringCollection arguments;
    arguments.Add(STRING(e.message()));

fixed the problem.



---------------------------------------------------------------------
This message was automatically generated by Project Tracker.








More information about the Mapguide_issues mailing list