pyshapelib tests

Bram de Greve bram.degreve at
Wed Mar 21 14:25:58 CET 2007


Weekends are mostly spent on other stuff, so sorry for the late reply =)

I've tried to build Thuban on my windows box, but I almost gave up after 
finding too much hurdles to take.  After adding tons of include and 
library dirs, and setting PATHs, I've bumped into this nice traceback 
after which I felt kind of tired =)

Please update your PATH environment variable to include 
Traceback (most recent call last):
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\", line 32, in ?
    import Thuban.UI.main
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\UI\", 
line 18, in
    import application
"D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\UI\", line
 27, in ?
    from import save_session
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\Model\", 
line 23,
 in ?
    from Thuban.Model.layer import Layer, RasterLayer
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\Model\", 
line 15
, in ?
    from wxproj import point_in_polygon_shape, shape_centroid
ImportError: DLL load failed: A dynamic link library (DLL) 
initialization routin
e failed.

BUT, the test script you told of did seem to work (or rather not to work 
=) though.  Fortunately I've put the tons of include and library dirs in 
a batch file so that I could build a debug version rather quickly.  And 
so I was able to trace the first problem back to DBFClose(DBFHandle) 
which fails to check for a NULL handle.  Well, at least in my opinion 
this is a failure, because I'm of the believe that freeing, destructing 
and closing NULL pointers should be harmless.  I've fixed this in 
dbfopen.c and will send a patch for future versions ...

However, the test still crashes a bit later ... dbflib_read_record is 
called with args = NULL.  I've haven't been able to track down the cause 
of this problem yet.


Didrik Pinte wrote:
> Bram,
> I've just tested a bit the new version.
> Running the test suite gives a segmentation fault :
> did at geru-itae:bramz/test$ python
> Segmentation fault
> BUT :
> using the UI, everything seems to work fine. I have successfully loaded
> a shapefile with a name containing UTF8 characters !
> Considering the problems with tests/ :
> [1] it seems that calling the close() method on a dbf object causes a
> segmentation fault
> [2] it segfaults too in TestDBFTableWriting when calling
> DBFTable.__init__ when initialisating the new file (line 90 of
> Thuban/Models/ : 'self.dbf = dbflib.DBFFile(filename)').
> Could you have a look at this ?
> I'm going on testing the new version by using the UI. 
> Didrik
> ------------------------------------------------------------------------
> _______________________________________________
> Thuban-devel mailing list
> Thuban-devel at

More information about the Thuban-devel mailing list