Opened 16 years ago

Last modified 16 years ago

#88 closed defect (fixed)

pgsql2shp crashes on Vista

Reported by: robe Owned by: robe
Priority: high Milestone: PostGIS 1.3.6
Component: postgis Version: 1.3.X
Keywords: Cc:

Description

What steps will reproduce the problem?

  1. pgsql2shp -f C:\test -h t -p 5432 -u postgres somedb sometable Initializing... Done (postgis major version: 1).

Output shape: Polygon

Dumping: X

CRASH Seems to happen on both Vista Home and Professional. Issue existed for at least as far back as 1.3.3 (but don't have a 1.3.2 lying around to test with that).

See thread http://postgis.refractions.net/pipermail/postgis-users/2008-December/022211.html

What is the expected output? shape files created

What do you see instead? 3 more or less empty files. On closer inspection since it gets to the Dumping: X before it crashes and my process mon confirms the pgsql connection seems to be working, I suspect the error is in the addRecord function of pgsql2shp.

Finally got my MingW environment at least working on one of my XPs and I'm apparently the only one with easy access to Vista. So I'll take a stab at at least narrowing the issue down.

Note: works fine on Windows2000/XP

Change History (2)

comment:1 by robe, 16 years ago

After discussion with Mark -- made final change. Tested this on OpenSUSE and Windows XP. Still need to retest on Vista (both binary and non-binary). Issue was the way we were releasing non-binary geom fields which it appears only Vista was sensitive to. Needed to change to use PQfreemem instead of free for newer versions of PostGIS.

comment:2 by robe, 16 years ago

Tested this on Vista and works fine now. Confirmed the old works if using binary (-b) switch. I'm closing this out.

Note: See TracTickets for help on using tickets.