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