Opened 17 years ago
Last modified 17 years ago
#2229 closed defect
msFreeHashItems should not set an error for a table with no items — at Version 5
Reported by: | cph | Owned by: | sdlime |
---|---|---|---|
Priority: | normal | Milestone: | 5.0 release |
Component: | MapServer C Library | Version: | svn-trunk (development) |
Severity: | normal | Keywords: | |
Cc: | hobu |
Description (last modified by )
msFreeHashItems is setting an error that eventually gets thrown as a exception in MapScript.
Change History (5)
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Status: | new → assigned |
---|
comment:3 by , 17 years ago
I don't see the problem. Neither freeLayer nor msFreeMap try to free the hashTableObj. They free the contents of the hash (e.g. msFreeHashItems) as expected.
Am I missing something? Are there errors popping up that can be attributed to this?
Steve
comment:4 by , 17 years ago
Steve,
I think the problem is related to the setting of this error: http://trac.osgeo.org/mapserver/browser/trunk/mapserver/maphash.c#L115
If we have no items, there's nothing to free, but why is this an error?
Howard
Here's a current failure example:
====================================================================== ERROR: MapLayersTestCase.testMapInsertLayer: test insertion of a new layer at default (last) index ---------------------------------------------------------------------- Traceback (most recent call last): File "maptest.py", line 100, in testMapInsertLayer index = self.map.insertLayer(layer) File "/Users/hobu/svn/mapserver/mapscript/python/mapscript.py", line 776, in insertLayer def insertLayer(*args): return _mapscript.mapObj_insertLayer(*args) MapServerError: msFreeHashItems(): Hash table error. No items allocated.
comment:5 by , 17 years ago
Description: | modified (diff) |
---|---|
Summary: | fontObj should really be carrying around *hashTableObj instead of hashTableObj → msFreeHashItems should not set an error for a table with no items |
this is also a problem with "layer->metadata" in freeLayer