Opened 17 years ago

Closed 17 years ago

#12 closed defect (fixed)

GDAL Unit Test Failures

Reported by: warmerdam Owned by: warmerdam
Priority: major Milestone: 3.3.0
Component: GDAL Provider Version: 3.3.0
Severity: 3 Keywords:
Cc: External ID:

Description

!!!FAILURES!!! Test Results: Run: 57 Failures: 8 Errors: 0

1) test: 10RfpTestJpg.testSpecialCharacters (F) line: 165 RfpTestJpg.cpp

"FDO_1_INVALID_INPUT_ON_CLASS_FUNCTION"

2) test: 10RfpTestJpg.testLoad (F) line: 37 RfpTestJpg.h

"Unhandled FdoException in testLoad"

3) test: 10RfpTestPng.testSpecialCharacters (F) line: 176 RfpTestPng.cpp

"FDO_1_INVALID_INPUT_ON_CLASS_FUNCTION"

4) test: 10RfpTestPng.testLoad (F) line: 106 RfpTestPng.cpp

"FDO_1_INVALID_INPUT_ON_CLASS_FUNCTION"

5) test: 11RfpTestBand.testSelect (F) line: 27 RfpTestBand.h

"Unhandled FdoException in testSelect"

6) test: 17RfpTestBandConfig.testGeoReference (F) line: 192 RfpTestBandConfig.cpp

"Raster image has no geo-reference."

7) test: 17RfpTestBandConfig.testGetNullValue1 (F) line: 32 RfpTestBandConfig.h

"Unhandled FdoException in testGetNullValue1"

8) test: 17RfpTestBandConfig.testResolution (F) line: 34 RfpTestBandConfig.h

"Unhandled FdoException in testResolution"

Change History (7)

comment:1 by warmerdam, 17 years ago

6) test: 17RfpTestBandConfig.testGeoReference (F) line: 192 RfpTestBandConfig?.cpp

"Raster image has no geo-reference."

Post Phase 1, rotated images are not intended to be supported. Commenting out testGeoReference() for the time being.

comment:2 by warmerdam, 17 years ago

this error:

""" 7) test: 17RfpTestBandConfig.testGetNullValue1 (F) line: 32 RfpTestBandConfig?.h

"Unhandled FdoException? in testGetNullValue1"

"""

Seems to be due to this dynamic_cast failing:

FdoPtr<FdoISelect> cmdSelect = dynamic_cast<FdoISelect*>(cmd);

cmd is in fact suitable to dynamically cast to FdoISelect, but the actual class is related to FdoISelect somewhat indirectly (through several layers of dirivation and use of a template). According to the following FAQ this can result in problems with dynamic cast operating across shared library boundaries with gcc 3.x (or later?):

http://www.gnu.org/software/gcc/faq.html#dso

Changing the code to a static_cast resolves the issue. I wonder if we need to require a particular version of gcc, or perhaps that we need to pursue some of the build options mentioned in the FAQ (which are a bit esoteric). I did quickly try changing the dlopen() in FdoConnectionManager to use the _GLOBAL flag but that did not seem to have an effect.

I'm going to take this issue to the mailing list for comment, and for the time being use a static cast off windows.

comment:3 by warmerdam, 17 years ago

Once we got past the dynamic cast problem, testGetNullValue1() was still failing because the null value was NULL. But this seems to be the correct behavior for this test since it just refers to Photo1_1.JPG which has no null value. I have altered the test to verify that the null value is indeed NULL.

I have enabled testGetNullValue2() on linux (after altering the dynamic_cast) and it seems to correctly identify the nodata value in the USGS DEM file.

comment:4 by warmerdam, 17 years ago

Status: newassigned

The following all turn out to be static/dynamic cast issues:

""" 1) test: 10RfpTestJpg.testSpecialCharacters (F) line: 165 RfpTestJpg?.cpp

"FDO_1_INVALID_INPUT_ON_CLASS_FUNCTION"

2) test: 10RfpTestJpg.testLoad (F) line: 37 RfpTestJpg?.h

"Unhandled FdoException? in testLoad"

3) test: 10RfpTestPng.testSpecialCharacters (F) line: 176 RfpTestPng?.cpp

"FDO_1_INVALID_INPUT_ON_CLASS_FUNCTION"

4) test: 10RfpTestPng.testLoad (F) line: 106 RfpTestPng?.cpp

"FDO_1_INVALID_INPUT_ON_CLASS_FUNCTION"

"""

But still left with the following after the dynamic_cast change:

1) test: 10RfpTestPng.testLoad (F) line: 104 RfpTestPng.cpp

"count == 11"

comment:5 by warmerdam, 17 years ago

1) test: 10RfpTestPng.testLoad (F) line: 104 RfpTestPng?.cpp

"count == 11"

---

This problem turned out to be due to the world file corresponding to COTter_U.png being named COTTER_U.pgw instead of COTter_U.pgw. I renamed this in subversion. GDAL requires the basename of world files to have the same case as the basename of the original file.

comment:6 by warmerdam, 17 years ago

5) test: 11RfpTestBand.testSelect (F) line: 27 RfpTestBand?.h

"Unhandled FdoException? in testSelect"

---

This was also a dynamic cast issue.

*

OK, with the above changes all 56 enabled tests in the UnitTests now pass, giving us a baseline for additional work.

comment:7 by warmerdam, 17 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.