Ticket #106 (closed task: fixed)
pgsql2shp memory leak on WIndows
| Reported by: | krellor | Owned by: | robe |
|---|---|---|---|
| Priority: | medium | Milestone: | |
| Component: | postgis | Version: | |
| Keywords: | Cc: |
Description
What steps will reproduce the problem? 1. Export NHD table to shp file using pgsql2shp.exe
What is the expected output? What do you see instead?
After 3.1 million records exported the process fails giving a generic fwrite() error. The expected output is a shp file.
What version of the product are you using? On what operating system?
1.3.5 on 32bit Windows XP pro, and 32bit Windows Vista Business
Please provide any additional information below.
I have a table that holds the flowline hydrography of Washington State. When I export to shapefile on Windows XP the processes memory usage swells to 1.6GB and then fails with a generic fwrite() error. When I attach my debugger to the running process I see a Heap Coruption error for every single row exported. I've looked at the source but don't see anything that stands out as an error. I tried re-building with cygwin changing it to be more verbose, but ran into some problems.
On Windows Vista Business windows terminates the process on the first row, presumably because it has stricter memory management than Windows XP, which only fails when the system is out of memory. On Windows XP I tried breaking up the 4 million records across 4 tables, 1 million records each.
I was able to successfully export them that way so I know it is not a
problem with the data. And like I said, every single row exported throws a Heap Corruption error.
