kiuliani / geoda

Automatically exported from code.google.com/p/geoda
GNU General Public License v3.0
0 stars 0 forks source link

exporting progress bar not working on win #93

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
The exporting progress bar works on Mac and Ubuntu, not working on Windows.

Original issue reported on code.google.com by lixun...@gmail.com on 18 Feb 2014 at 10:24

GoogleCodeExporter commented 8 years ago

Original comment by mmcc...@gmail.com on 19 Feb 2014 at 8:41

GoogleCodeExporter commented 8 years ago
Fixed in 3096.
Note: this is a "bug" on OGR side the function 
OGRFeature::SetGeometryDirectly(). 
This function should take ownership of the passed geometry. But, it doesn't 
work on windows (works on Mac). Therefore, I need to use 
OGRFeature::SetGeometry() instead. At the same time, I tried to manually clean 
the memory of exported geometries.

Original comment by lixun...@gmail.com on 4 Mar 2014 at 6:33

GoogleCodeExporter commented 8 years ago
Here is a note to fix this issue potentially.

http://osdir.com/ml/gdal-development-gis-osgeo/2013-05/msg00086.html
I am guessing you are working on Windows and are running into problems with a 
mix of runtime heaps. I would suggest avoiding using new and delete directly 
and instead leaving everything to functions from the GDAL DLL.  
I believe you should use OGRGeometryFactory::createGeometry(wkbLinearRing) to 
create the linear ring (use wkbPolygon for the polygon) and 
OGRGeometryFactory::destroyGeometry() to destroy geometries.   
Keep in mind that addRingDirectly() transfers ownership of the ring to the 
polygon so you should not destroy the ring after that.  It will be cleaned up 
by the polygon when that is destroyed. 
Best regards,Frank

Original comment by lixun...@gmail.com on 4 Mar 2014 at 9:25

GoogleCodeExporter commented 8 years ago
Fixed in ci 3098

Original comment by lixun...@gmail.com on 5 Mar 2014 at 10:46

GoogleCodeExporter commented 8 years ago

Original comment by lixun...@gmail.com on 5 Mar 2014 at 10:46