Changes between Initial Version and Version 25 of Ticket #299


Ignore:
Timestamp:
Oct 4, 2011, 1:05:40 PM (13 years ago)
Author:
hobu
Comment:

After spending an afternoon on this, I think the problem is related to the fact that geos::geom::CoordinateSequenceFactory has virtual methods, and the instance is not complete, and the dynamic_cast at source:/trunk/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp@3496#L53​ is not valid.

From http://www.cplusplus.com/doc/tutorial/typecasting/ in the dynamic_cast section

When dynamic_cast cannot cast a pointer because it is not a complete object of the required class -as in the second conversion in the previous example- it returns a null pointer to indicate the failure.

This test fails for me on OSX using both clang and gcc 4.2.1. That it fails on two recent compilers makes me think the problem is that the test is bad, and that it succeeded before was just luck.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #299

    • Property Keywords mac macosx osx added
    • Property Milestone 3.2.0GEOS Future
    • Property Owner changed from mloskot to geos-devel@…
  • Ticket #299 – Description

    initial v25  
    66The problem goes away when I comment out lines 55 and 56 of the test.
    77
    8 http://trac.osgeo.org/geos/browser/trunk/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp#L55
     8:trac:browser/trunk/tests/unit/geom/CoordinateArraySequenceFactoryTest.cpp#L55
    99
    1010Problem seen on OS/X 10.6, i686-apple-darwin10-gcc-4.2.1