[gdal-dev] EXCEPTION_ACCESS_VIOLATION, when using GDAL Java API
=?gbk?B?3dXdzLXEyfnS9A==?=
181797177 at qq.com
Wed Aug 4 09:23:24 EDT 2010
Hi,all:
I use GDAL Java API to write raster data to Oracle Spatial GeoRaster Object, and encouter a strange problem:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0afa0770, pid=5904, tid=5548
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 )
# Problematic frame:
# C [gdal17.dll+0x190770]
#
# An error report file with more information is saved as:
# D:\workspace\GDALTest\hs_err_pid5904.log
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
This is my Java codes:
import org.gdal.gdal.gdal;
import org.gdal.gdalconst.gdalconstConstants;
import org.gdal.gdal.Band;
import org.gdal.gdal.Dataset;
import org.gdal.gdal.Driver;
import java.nio.ByteBuffer;
public class GDALTest1 {
/**
* @param args
*/
public static void main(String[] args) {
Dataset Dataset1;
Dataset Dataset2;
Band Band1;
Band Band2;
gdal.AllRegister();
// Dataset1 = gdal.Open("georaster:georaster/georaster at localhost:1521/orcl,rdt_2,0");
Dataset1 = gdal.Open("georaster:georaster/georaster at localhost:1521/orcl,rdt_2,0");
// Dataset2 = gdal.Open("D:/gdal_charles/GeoRasterDemo/private2/georaster_demo/demo_data/data/237898.tif",
// gdalconstConstants.GA_Update);
Dataset2 = gdal.Open("georaster:georaster/georaster at localhost:1521/orcl,rdt_2,0",
gdalconstConstants.GA_Update);
Band1 = Dataset1.GetRasterBand(1);
Band2 = Dataset2.GetRasterBand(1);
Dataset2.SetProjection(Dataset1.GetProjection());
Dataset2.SetGeoTransform(Dataset1.GetGeoTransform());
System.out.println("Passing information from input dataset to output dataset");
int XSize = 100;
ByteBuffer buffer = ByteBuffer.allocateDirect(XSize);
buffer = Band1.ReadRaster_Direct(0,0,XSize,1);
Band2.WriteRaster_Direct(0,0,XSize,1,buffer);
Dataset2.FlushCache();
System.out.println(buffer.getLong());
Dataset1.delete();
Dataset2.delete();
}
}
When executing the sentence "Dataset2.FlushCache();", the above problem rises.
The error report is as following:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x0afa0770, pid=5904, tid=5548
#
# JRE version: 6.0_15-b03
# Java VM: Java HotSpot(TM) Client VM (14.1-b02 mixed mode windows-x86 )
# Problematic frame:
# C [gdal17.dll+0x190770]
#
# If you would like to submit a bug report, please visit:
# http://java.sun.com/webapps/bugreport/crash.jsp
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#
--------------- T H R E A D ---------------
Current thread (0x00847c00): JavaThread "main" [_thread_in_native, id=5548, stack(0x008e0000,0x00930000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x0000000c
Registers:
EAX=0x0d5335d4, EBX=0x00200000, ECX=0x00000000, EDX=0x0b678908
ESP=0x0092fb78, EBP=0x0e1d0020, ESI=0x0b676b38, EDI=0x00000000
EIP=0x0afa0770, EFLAGS=0x00010217
Top of Stack: (sp=0x0092fb78)
0x0092fb78: 0aedb0f8 0d5335d4 0e1d0020 00200000
0x0092fb88: 00000000 0092fc68 00000000 0b679810
0x0092fb98: 0aed6b97 00000000 00000000 00000000
0x0092fba8: 00000000 0dfc0020 0b6788d0 00000000
0x0092fbb8: 0b67cf38 0ae40cf3 00000000 00000000
0x0092fbc8: 0dfc0020 00000000 0ae3cb70 00000000
0x0092fbd8: 0b679810 00000000 0ae3e9e7 00000000
0x0092fbe8: 00000000 00000000 06c10db0 0b67c9e8
Instructions: (pc=0x0afa0770)
0x0afa0760: c4 08 f7 d8 1b c0 f7 d0 23 44 24 0c c2 0c 00 cc
0x0afa0770: 8b 41 0c 8b 54 24 08 56 8b 74 24 10 50 6a 01 6a
Stack: [0x008e0000,0x00930000], sp=0x0092fb78, free space=318k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [gdal17.dll+0x190770]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j org.gdal.gdal.gdalJNI.Dataset_FlushCache(JLorg/gdal/gdal/Dataset;)V+0
j org.gdal.gdal.Dataset.FlushCache()V+5
j oracle.spatial.georaster.gdaltest.GDALTest1.main([Ljava/lang/String;)V+93
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0ab17800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=4276, stack(0x0ad60000,0x0adb0000)]
0x0ab11400 JavaThread "CompilerThread0" daemon [_thread_blocked, id=1824, stack(0x0ad10000,0x0ad60000)]
0x0ab0c400 JavaThread "Attach Listener" daemon [_thread_blocked, id=1452, stack(0x0acc0000,0x0ad10000)]
0x0ab23c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2400, stack(0x0ac70000,0x0acc0000)]
0x0aaf5800 JavaThread "Finalizer" daemon [_thread_blocked, id=4672, stack(0x0ac20000,0x0ac70000)]
0x0aaf4400 JavaThread "Reference Handler" daemon [_thread_blocked, id=4668, stack(0x0abd0000,0x0ac20000)]
=>0x00847c00 JavaThread "main" [_thread_in_native, id=5548, stack(0x008e0000,0x00930000)]
Other Threads:
0x0aaf1400 VMThread [stack: 0x0ab80000,0x0abd0000] [id=4820]
0x0ab21c00 WatcherThread [stack: 0x0adb0000,0x0ae00000] [id=1532]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 960K, used 596K [0x029e0000, 0x02ae0000, 0x02ec0000)
eden space 896K, 66% used [0x029e0000, 0x02a75210, 0x02ac0000)
from space 64K, 0% used [0x02ac0000, 0x02ac0000, 0x02ad0000)
to space 64K, 0% used [0x02ad0000, 0x02ad0000, 0x02ae0000)
tenured generation total 4096K, used 0K [0x02ec0000, 0x032c0000, 0x069e0000)
the space 4096K, 0% used [0x02ec0000, 0x02ec0000, 0x02ec0200, 0x032c0000)
compacting perm gen total 12288K, used 2410K [0x069e0000, 0x075e0000, 0x0a9e0000)
the space 12288K, 19% used [0x069e0000, 0x06c3aa68, 0x06c3ac00, 0x075e0000)
No shared spaces configured.
Dynamic libraries:
0x00400000 - 0x00424000 C:\Program Files\Java\jre6\bin\javaw.exe
0x7c920000 - 0x7c9b6000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c91e000 C:\WINDOWS\system32\kernel32.dll
0x77da0000 - 0x77e49000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e50000 - 0x77ee2000 C:\WINDOWS\system32\RPCRT4.dll
0x77fc0000 - 0x77fd1000 C:\WINDOWS\system32\Secur32.dll
0x77d10000 - 0x77da0000 C:\WINDOWS\system32\USER32.dll
0x77ef0000 - 0x77f39000 C:\WINDOWS\system32\GDI32.dll
0x76300000 - 0x7631d000 C:\WINDOWS\system32\IMM32.DLL
0x62c20000 - 0x62c29000 C:\WINDOWS\system32\LPK.DLL
0x73fa0000 - 0x7400b000 C:\WINDOWS\system32\USP10.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jre6\bin\msvcr71.dll
0x6d800000 - 0x6da8b000 C:\Program Files\Java\jre6\bin\client\jvm.dll
0x76b10000 - 0x76b3a000 C:\WINDOWS\system32\WINMM.dll
0x6d7b0000 - 0x6d7bc000 C:\Program Files\Java\jre6\bin\verify.dll
0x6d330000 - 0x6d34f000 C:\Program Files\Java\jre6\bin\java.dll
0x6d290000 - 0x6d298000 C:\Program Files\Java\jre6\bin\hpi.dll
0x76bc0000 - 0x76bcb000 C:\WINDOWS\system32\PSAPI.DLL
0x6d7f0000 - 0x6d7ff000 C:\Program Files\Java\jre6\bin\zip.dll
0x10000000 - 0x10031000 C:\gdal-1.7.1\swig\java\gdaljni.dll
0x0ae10000 - 0x0b3ae000 C:\gdal-1.7.1\gdal17.dll
0x0b3c0000 - 0x0b4b4000 C:\app\Admin\product\11.2.0\dbhome_1\bin\OCI.dll
0x78130000 - 0x781cb000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCR80.dll
0x77be0000 - 0x77c38000 C:\WINDOWS\system32\msvcrt.dll
0x73540000 - 0x7357d000 C:\WINDOWS\system32\ODBC32.dll
0x77180000 - 0x77283000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\COMCTL32.dll
0x77f40000 - 0x77fb6000 C:\WINDOWS\system32\SHLWAPI.dll
0x76320000 - 0x76367000 C:\WINDOWS\system32\comdlg32.dll
0x7d590000 - 0x7dd84000 C:\WINDOWS\system32\SHELL32.dll
0x78520000 - 0x785c3000 C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\MSVCR90.dll
0x78480000 - 0x7850e000 C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.1_x-ww_6f74963e\MSVCP90.dll
0x1f840000 - 0x1f857000 C:\WINDOWS\system32\odbcint.dll
0x0b760000 - 0x0bb07000 C:\app\Admin\product\11.2.0\dbhome_1\bin\OraClient11.Dll
0x60f00000 - 0x60ff1000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oracore11.dll
0x61400000 - 0x614ca000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oranls11.dll
0x65830000 - 0x6584b000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraunls11.dll
0x618c0000 - 0x618c7000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orauts.dll
0x71a20000 - 0x71a37000 C:\WINDOWS\system32\WS2_32.dll
0x71a10000 - 0x71a18000 C:\WINDOWS\system32\WS2HELP.dll
0x76990000 - 0x76acd000 C:\WINDOWS\system32\ole32.dll
0x619b0000 - 0x61be3000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oracommon11.dll
0x65630000 - 0x65660000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orasnls11.dll
0x0bb80000 - 0x0c78f000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orageneric11.dll
0x65910000 - 0x65c80000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraxml11.dll
0x7c420000 - 0x7c4a7000 C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.4053_x-ww_e6967989\MSVCP80.dll
0x0c7b0000 - 0x0cbb0000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oran11.dll
0x0cbc0000 - 0x0cc22000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oranl11.dll
0x0cc40000 - 0x0cc76000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orantcp11.dll
0x0cc90000 - 0x0ccdd000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oranldap11.dll
0x642f0000 - 0x64422000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orannzsbb11.dll
0x71a40000 - 0x71a4b000 C:\WINDOWS\system32\WSOCK32.dll
0x638b0000 - 0x63a3c000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraldapclnt11.dll
0x0cd10000 - 0x0cd2e000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orancrypt11.dll
0x76d30000 - 0x76d48000 C:\WINDOWS\system32\iphlpapi.dll
0x65cb0000 - 0x65e38000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orazt11.dll
0x770f0000 - 0x7717b000 C:\WINDOWS\system32\OLEAUT32.dll
0x0cd50000 - 0x0cd9c000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oranro11.dll
0x0cdb0000 - 0x0cdbd000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oranhost11.dll
0x0cdd0000 - 0x0cdd6000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orancds11.dll
0x0cdf0000 - 0x0ce01000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orantns11.dll
0x65e40000 - 0x65ed3000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraztkg11.dll
0x614d0000 - 0x618b2000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orapls11.dll
0x65620000 - 0x65629000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraslax11.dll
0x65850000 - 0x65856000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oravsn11.dll
0x65100000 - 0x653d1000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraplp11.dll
0x632b0000 - 0x63633000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orahasgen11.dll
0x5fdd0000 - 0x5fe25000 C:\WINDOWS\system32\NETAPI32.dll
0x64630000 - 0x646ce000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraocr11.dll
0x646d0000 - 0x6478d000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraocrb11.dll
0x64790000 - 0x6479d000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oraocrutl11.dll
0x0cea0000 - 0x0cf71000 C:\app\Admin\product\11.2.0\dbhome_1\bin\dbghelp.dll
0x62bd0000 - 0x62c0e000 C:\app\Admin\product\11.2.0\dbhome_1\bin\oracell11.dll
0x65690000 - 0x65728000 C:\app\Admin\product\11.2.0\dbhome_1\bin\orasql11.dll
0x650e0000 - 0x650f8000 C:\app\Admin\product\11.2.0\dbhome_1\bin\OraPlc11.Dll
0x719c0000 - 0x719fe000 C:\WINDOWS\system32\mswsock.dll
0x0d410000 - 0x0d465000 C:\WINDOWS\system32\hnetcfg.dll
0x71a00000 - 0x71a08000 C:\WINDOWS\System32\wshtcpip.dll
0x71f00000 - 0x71f04000 C:\WINDOWS\system32\security.dll
0x77c40000 - 0x77c65000 C:\WINDOWS\system32\msv1_0.dll
0x76760000 - 0x7676c000 C:\WINDOWS\system32\cryptdll.dll
0x5adc0000 - 0x5adf7000 C:\WINDOWS\system32\uxtheme.dll
0x74680000 - 0x746cc000 C:\WINDOWS\system32\MSCTF.dll
0x63000000 - 0x63014000 C:\WINDOWS\system32\SynTPFcs.dll
0x77bd0000 - 0x77bd8000 C:\WINDOWS\system32\VERSION.dll
0x0db80000 - 0x0db8a000 C:\gdal-1.7.1\swig\java\gdalconstjni.dll
VM Arguments:
jvm_args: -Djava.library.path=C:\gdal-1.7.1\swig\java -Dfile.encoding=GBK
java_command: oracle.spatial.georaster.gdaltest.GDALTest1
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Java\jdk1.6.0_10
CLASSPATH=.;C:\Java\jdk1.6.0_10\lib\dt.jar;C:\Java\jdk1.6.0_10\lib\tools.jar;C:\GeoRaster\jar\11gR2\ojdbc5.jar;C:\Java\jdk1.6.0_10\jre\lib\ext\jai_codec.jar;C:\Java\jdk1.6.0_10\jre\lib\ext\jai_core.jar;C:\GeoRaster\jar\11gR2\xdb.jar;C:\GeoRaster\jar\11gR2\xmlcomp.jar;C:\GeoRaster\jar\11gR2\xmlparserv2.jar;C:\GeoRaster\jar\11gR2\xxschema.jar;C:\GeoRaster\jar\11gR2\jewt4.jar;C:\GeoRaster\jar\11gR2\sdoapi.jar;C:\GeoRaster\jar\11gR2\sdoutl.jar;C:\GeoRaster\jar\11gR2\xtiff-jai.jar;C:\GeoRaster\jar\11gR2\geotiff-jai.jar;C:\GeoRaster\jar\11gR2\jai_imageio.jar;C:\Java\jdk1.6.0_10\jre\lib\ext\mlibwrapper_jai.jar;C:\GeoRaster\jar\11gR2\georaster_tools.jar;C:\app\Admin\product\11.2.0\dbhome_1\sqldeveloper\jlib\orai18n.jar;..\gdal.jar
PATH=C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\app\Admin\product\11.2.0\dbhome_1\bin;C:\Program Files\ThinkPad\Utilities;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Thunder Network\KanKan\Codecs;C:\Java\jdk1.6.0_10\bin;C:\Java\jdk1.6.0_10\jre\bin;C:\gdal-1.7.1;C:\apache-ant-1.8.1\bin
USERNAME=Admin
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 14 Stepping 12, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 3
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 14 stepping 12, cmov, cx8, fxsr, mmx, sse, sse2, sse3
Memory: 4k page, physical 2087276k(334648k free), swap 4022628k(2155428k free)
vm_info: Java HotSpot(TM) Client VM (14.1-b02) for windows-x86 JRE (1.6.0_15-b03), built on Jul 25 2009 01:22:46 by "java_re" with MS VC++ 7.1
time: Wed Aug 04 17:34:44 2010
elapsed time: 1 seconds
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20100804/9027d7bb/attachment-0001.html
More information about the gdal-dev
mailing list