pyshapelib tests

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


Hi,

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 =)

D:\bram\thuban_work\WIP-pyshapelib-bramz>thuban.py
Please update your PATH environment variable to include 
D:\bram\thuban_work\WIP-
pyshapelib-bramz\Thuban\..\gdal\bin
Traceback (most recent call last):
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\thuban.py", line 32, in ?
    import Thuban.UI.main
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\UI\main.py", 
line 18, in
 ?
    import application
  File 
"D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\UI\application.py", line
 27, in ?
    from Thuban.Model.save import save_session
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\Model\save.py", 
line 23,
 in ?
    from Thuban.Model.layer import Layer, RasterLayer
  File "D:\bram\thuban_work\WIP-pyshapelib-bramz\Thuban\Model\layer.py", 
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.

Bram


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 test_dbf_table.py
> 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/test_dbf_table.py :
>
> [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/table.py : '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 intevation.de
> https://intevation.de/mailman/listinfo/thuban-devel
>   




More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)