#610 closed defect (worksforme)
geos 3.3.6 : WKTReader fails on POINT(0 0) (MSVC 2008, W7)
Reported by: | gt75 | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | 3.3.7 |
Component: | Default | Version: | 3.3.6 |
Severity: | Unassigned | Keywords: | |
Cc: |
Description
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 by , 11 years ago
comment:2 by , 11 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
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:4 by , 11 years ago
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 makefile.vc" . Command "msbuild geos.sln" fails just as in Ticket #576 . How did you prepare geos binaries for MSVC ?
WBW&R, Grigory.
comment:5 by , 11 years ago
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.
Did "make check" succeed ?