#2594 closed defect (fixed)

MapGuide 3.0: apache child abort on evaluating distance between MgPoints

Reported by: gabrimonfa Owned by: jng
Priority: low Milestone:
Component: General Version: 3.0.0
Severity: minor Keywords:
Cc: External ID:

Description

Mapguide 3.0 on Centos 6 (32bit)

In our code we need to evaluate the distance between two (valid) MgPoints?. We use MgPoint::Distance function. Our code does not complete, apache child aborts.

apache log shows

httpd: GeometryComponentFilter.cpp:34: virtual void geos::geom::GeometryComponentFilter::filter_ro(const geos::geom::Geometry*): Assertion `0' failed.

We probably hit this bug: https://trac.osgeo.org/geos/ticket/535

Change History (7)

comment:1 Changed 12 months ago by jng

Do you have sample code with example points where the MgPoint::Distance call causes the child abort?

comment:2 Changed 12 months ago by gabrimonfa

Sample code that causes abort

$wkt1 = 'POINT (3 3)';
$wkt2 = 'POINT (4 4)';

$wktReaderWriter = new MgWktReaderWriter();
$point1 = $wktReaderWriter->Read($wkt1);
$point2 = $wktReaderWriter->Read($wkt2);
$distance = $point1->Distance($point2, null);

error_log('This will not be logged...');

From apache error_log:

httpd: GeometryComponentFilter.cpp:34: virtual void geos::geom::GeometryComponentFilter::filter_ro(const geos::geom::Geometry*): Assertion `0' failed.
[Tue May 31 12:11:09.460919 2016] [core:notice] [pid 16477:tid 139967641470720] AH00052: child pid 14160 exit signal Aborted (6)

comment:3 Changed 10 months ago by jng

Owner: set to jng
Resolution: fixed
Status: newclosed

In 9010:

Fix #2594. Based on this GEOS ticket (https://trac.osgeo.org/geos/ticket/469), setting explicit -m32/-m64 flags in CFLAGS/CXXFLAGS/CPPFLAGS/FFLAGS/LDFLAGS before calling the geos configure script.

Running "make check" without these changes reproduces the assertion error.
Running "make check" with this change does not produce the assertion error.

comment:4 Changed 10 months ago by jng

In 9011:

Merged revision(s) 9010 from trunk/MgDev:
Fix #2594. Based on this GEOS ticket (https://trac.osgeo.org/geos/ticket/469), setting explicit -m32/-m64 flags in CFLAGS/CXXFLAGS/CPPFLAGS/FFLAGS/LDFLAGS before calling the geos configure script.

Running "make check" without these changes reproduces the assertion error.
Running "make check" with this change does not produce the assertion error.
........

comment:5 Changed 10 months ago by jng

In 9012:

Merged revision(s) 9010 from trunk/MgDev:
Fix #2594. Based on this GEOS ticket (https://trac.osgeo.org/geos/ticket/469), setting explicit -m32/-m64 flags in CFLAGS/CXXFLAGS/CPPFLAGS/FFLAGS/LDFLAGS before calling the geos configure script.

Running "make check" without these changes reproduces the assertion error.
Running "make check" with this change does not produce the assertion error.
........

comment:6 Changed 10 months ago by jng

Resolution: fixed
Status: closedreopened

Reopening.

While this fixes geos in isolation, it broke the build system (probably because I changed the oem build order as well)

comment:7 Changed 10 months ago by jng

Resolution: fixed
Status: reopenedclosed

Fix the build system and confirmed the above PHP code sample works in the beta 2 binaries

Note: See TracTickets for help on using tickets.