Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#610 closed defect (worksforme)

geos 3.3.6 : WKTReader fails on POINT(0 0) (MSVC 2008, W7)

Reported by: gt75 Owned by: geos-devel@…
Priority: major Milestone: 3.3.7
Component: Default Version: 3.3.6
Severity: Unassigned Keywords:


Simple program fails with heap corruption error.

namespace ggm = geos::geom;

namespace gio = geos::io;

ggm::PrecisionModel? *pm = new ggm::PrecisionModel?(PrecisionModel::FLOATING);

ggm::GeometryFactory? *gf = new ggm::GeometryFactory?(pm);

gio::WKTReader *wktReader = new gio::WKTReader(gf);

const std::string str = " POINT (0 0) ";

ggm::Geometry *geom = wktReader->read(str); HERE IT FAILS

delete wktReader;

Change History (6)

comment:1 Changed 8 years ago by strk

Did "make check" succeed ?

comment:2 Changed 8 years ago by mloskot

Resolution: worksforme
Status: newclosed

My crystal sphere failed to figure out what you mean by "HERE IT FAILS", but the tests confirm everything is in order and the mysterious failure is not reproducible r3740

comment:3 Changed 8 years ago by mloskot

Tested using VS2010

comment:4 Changed 8 years ago by gt75

As concerns diagnostics - I got error like 'HEAP CORRUPTION near variable wktReader". Nothing more. As for "make check" - I am newbie - how can I do it? I built geos with CMake method and further "nmake /f" . Command "msbuild geos.sln" fails just as in Ticket #576 . How did you prepare geos binaries for MSVC ?

WBW&R, Grigory.

comment:5 Changed 8 years ago by mloskot

The "heap corruption" may mean lots of things, including problems in your program that happened earlier, before WKTReader is called.

If you build with CMake, then you should get the geos_unit program built as well. Just execute it and it should run all tests.

Grab and apply the patch from #611, it should help.

comment:6 Changed 8 years ago by gt75

Thanks a lot! The patch solved my problem.

Note: See TracTickets for help on using tickets.