[gdal-dev] Java bindings with GDAL 1.4.4

Meek, Allan (Contractor) Allan.Meek at drdc-rddc.gc.ca
Mon Feb 25 15:18:12 EST 2008


I've run into a problem with the call to GetGCPs() in
http://trac.osgeo.org/gdal/browser/trunk/gdal/swig/java/apps/gdalinfo.ja
va, line 177. I have the GDAL bindings properly compiled, with GDAL
1.4.4.

If I run the Java version of gdalinfo with an image that uses GCPs
(i.e., RADARSAT-1, ENVISAT), the program crashes whenever it calls
GetGCPs(). If I comment out that line, the program runs properly
(although it doesn't report the GCPs, of course).

Here's an example of the output I get:

==================

C:\gdal-1.4.4\swig\java\apps>java gdalinfo c:\RSAT1\P0368677.img
Driver: SAR_CEOS/CEOS SAR Image
Size is 18556, 16605
Coordinate System is:

Origin = (0.0,0.0)
Pixel Size = (1.0,1.0)
  0.0, 1.0, 0.0
  0.0, 0.0, 1.0
GCP Projection = GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS
84",6378137,
298.257223563,AUTHORITY["EPSG",7030]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["
EPSG
",6326]],PRIMEM["Greenwich",0,AUTHORITY["EPSG",8901]],UNIT["DMSH",0.0174
5329
25199433,AUTHORITY["EPSG",9108]],AXIS["Lat",NORTH],AXIS["Long",EAST],AUT
HORI
TY["EPSG",4326]]

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
#  EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d85cb54, pid=3280, 
#  tid=3264
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_14-b03 mixed mode, sharing)
# Problematic frame:
# V  [jvm.dll+0x11cb54]
#
# An error report file with more information is saved as
hs_err_pid3280.log
#
# If you would like to submit a bug report, please visit:
#   http://java.sun.com/webapps/bugreport/crash.jsp
#

==================

The generated logfile is available if anybody wants to have a look at
it.

This problem does not affect images that don't have GCPs, as the
preceding 'if' structure routes them around this part of the program.

Is there a simple solution to patch this up, or is this a deeper
problem?

Thanks,
Allan


More information about the gdal-dev mailing list