Opened 21 years ago

Closed 21 years ago

#385 closed defect (worksforme)

Python MapScript (and maybe others) segfaults when layer data can't be opened

Reported by: sgillies@… Owned by: sdlime
Priority: high Milestone:
Component: MapScript Version: 4.1
Severity: normal Keywords:
Cc:

Description

If SHAPEPATH and DATA don't add up to a valid filesystem path,
Python MapScript segfaults when we try to draw().

An IOError should be raised instead.

Change History (2)

comment:1 by sgillies@…, 21 years ago

Status: newassigned
Will resolve this for 4.1.

comment:2 by sgillies@…, 21 years ago

Resolution: worksforme
Status: assignedclosed
I think that I was wrong to submit this bug.  Am testing for
it and the test passes.

    def testDrawBadData(self):
        self.mapobj1.getLayerByName('POLYGON').data = 'foo'
        self.assertRaises(MapServerError, self.mapobj1.draw)

Resolving it as 'works for me'.

Note: See TracTickets for help on using tickets.