Re: [gdal-dev] EXCEPTION_ACCESS_VIOLATION, when using GDAL Java API

Ivan Lucena ivan.lucena at pmldnet.com
Wed Aug 4 09:31:54 EDT 2010


I noticed that you are reading and writing from the same GeoRaster, "georaster:georaster/georaster at localhost:1521/orcl,rdt_2,0". Is that what you want?


>  -------Original Message-------
>  From:  <181797177 at qq.com>
>  To: gdal-dev <gdal-dev at lists.osgeo.org>
>  Subject: [gdal-dev] EXCEPTION_ACCESS_VIOLATION, when using GDAL Java API
>  Sent: Aug 04 '10 08:23
>  
>  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:
>  #   [LINK: http://java.sun.com/webapps/bugreport/crash.jsp]
>  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:
>  #   [LINK: http://java.sun.com/webapps/bugreport/crash.jsp]
>  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:\Pr


More information about the gdal-dev mailing list