Opened 11 years ago

Closed 9 years ago

#1304 closed defect (fixed)

Possible bug in constructor MgSelection (MgMap *map, CREFSTRING xmlSelectionString) triggered by empty xmlSelectionString

Reported by: gabrimonfa Owned by:
Priority: low Milestone: 2.4
Component: Server Version: 2.2.0
Severity: trivial Keywords: haspatch
Cc: External ID:


I have mapguide 2.1.0 on Debian etch with apache (let's call it mapguide_apache) and php. In my setup main apache web server is configured to use mapguide_apache with proxy/reverseProxy directives.

If MgSelection? (MgMap? *map, CREFSTRING xmlSelectionString) is called with an empty xmlSelectionString (it happens when no elements are selected in the map), my main apache logs:

502 Proxy Error

while mapguide_apache logs

[notice] child pid 24438 exit signal Segmentation fault (11)

The server appears to continue without problems but I'm not sure since I have also sporadic crashes (without log entries...)

Attachments (3)

1304.patch (12.3 KB) - added by jng 9 years ago.
1304_v2.patch (3.3 KB) - added by jng 9 years ago.
1304_v3.patch (3.5 KB) - added by jng 9 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 11 years ago by jng

The MgSelection? constructor just delegates to its parent constructor, which internally calls the FromXml?() method (

From what I can see, it just assumes as though the selection string is not empty (it doesn't actually check for an empty string).

I guess the solution is to check for an empty string, but then what to do once we encounter an empty string? Do nothing (return)? Throw MG exception?

comment:2 Changed 10 years ago by gabrimonfa


Is that solved in 2.2RC1 or in trunk?

Changed 9 years ago by jng

Attachment: 1304.patch added

comment:3 Changed 9 years ago by jng

Keywords: haspatch added
Milestone: 2.4

Changed 9 years ago by jng

Attachment: 1304_v2.patch added

Changed 9 years ago by jng

Attachment: 1304_v3.patch added

comment:4 Changed 9 years ago by jng

Resolution: fixed
Status: newclosed

Fixed trunk (r6758) and 2.4 (r6756)

Note: See TracTickets for help on using tickets.