

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
2 messages in net.java.dev.jna.users[jna-users] when free memory, VM cra...| From | Sent On | Attachments |
|---|---|---|
| schin | Jan 19, 2009 12:50 am | |
| Timothy Wall | Jan 22, 2009 4:08 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [jna-users] when free memory, VM crash(BufferBlob::Interpreter) | Actions... |
|---|---|---|
| From: | schin (sch...@sdg.mdd.ricoh.co.jp) | |
| Date: | Jan 19, 2009 12:50:42 am | |
| List: | net.java.dev.jna.users | |
HI Timothy,
I am using jna to get data (Struct array) from c program. The Struct as below:
typedef __declspec(dllexport) struct { char id[255]; char name[255]; double createDate; char name1[255]; int number; double date1; double date1; int status; int sze; int sections char name2[255]; char name3[255]; } MYSTRUCT;
Java mapping class as below:
public static class _MyData extends Structure {
public byte[] id = new byte[255] public byte[] name = new byte[255]; public double date1 = 0.0; public byte[] name1 = new byte[255]; public int number = 0; public double date2 = 0.0; public double date3 = 0.0; public int status = 0; public int size = 0; public int sections = 0; public byte[] name2 = new byte[255]; public byte[] name3 = new byte[255]; }
//Original C code MYSTRUCT* get_datas(int* pcount); void free_datas(MYSTRUCT* datas);
// Equivalent JNA mapping _MyData get_datas(IntByReference pcount); void free_datas(_MyData[] datas); ... IntByReference pcount = new IntByReference(); _MyData d = lib.get_datas(pcount); _MyData[] datas = (_MyData[])d.toArray(pcount.getValue()); ... lib.free_datas(datas); //VM crash
when exec lib.free_datas(datas) and datas size > 10 ? the VM crash
the crash file as below: # # An unexpected error has been detected by Java Runtime Environment: # # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x6d94fbf5, pid=3456, tid=3264 # # Java VM: Java HotSpot(TM) Client VM (10.0-b22 mixed mode, sharing windows-x86) # Problematic frame: # V [jvm.dll+0xdfbf5] # # If you would like to submit a bug report, please visit: # http://java.sun.com/webapps/bugreport/crash.jsp #
--------------- T H R E A D ---------------
Current thread (0x003f7400): JavaThread "main" [_thread_in_vm, id=3264, stack(0x008d0000,0x00920000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x053a1000
Registers: EAX=0x000000ff, EBX=0x003f7400, ECX=0x00000035, EDX=0x000000ff ESP=0x0091f0b0, EBP=0x0091f1a8, ESI=0x053a1000, EDI=0x06f34734 EIP=0x6d94fbf5, EFLAGS=0x00010207
Top of Stack: (sp=0x0091f0b0) 0x0091f0b0: 003f7400 26a57dd0 26a57dd0 003f7400 0x0091f0c0: 00000000 0091f2f8 0091f1e4 03694ce9 0x0091f0d0: 003f7400 0091f20c 00000000 000000ff 0x0091f0e0: 053a0fd8 0091f330 0091f1b8 03695cfb 0x0091f0f0: 053b3580 6d871086 003f7400 00000000 0x0091f100: 003f7400 003f7400 003f7188 6d9e62f5 0x0091f110: 0091f138 003f7400 00000001 00000000 0x0091f120: 003f7400 003f7400 003f7400 0091f278
Instructions: (pc=0x6d94fbf5) 0x6d94fbe5: 83 e1 3f d3 e0 8d 7c 3a 0c 8b c8 8b d1 c1 e9 02 0x6d94fbf5: f3 a5 8b ca 83 e1 03 f3 a4 8b 44 24 10 85 c0 74
Stack: [0x008d0000,0x00920000], sp=0x0091f0b0, free space=316k Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code) V [jvm.dll+0xdfbf5] v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::StubRoutines (1)
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code) v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::StubRoutines (1) v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::Interpreter v ~BufferBlob::StubRoutines (1)
--------------- P R O C E S S ---------------
Java Threads: ( => current thread ) 0x03134400 JavaThread "ReaderThread" [_thread_in_native, id=680, stack(0x03240000,0x03290000)] 0x02cca800 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=1936, stack(0x02f20000,0x02f70000)] 0x02cc4c00 JavaThread "CompilerThread0" daemon [_thread_blocked, id=2404, stack(0x02ed0000,0x02f20000)] 0x02cc3c00 JavaThread "Attach Listener" daemon [_thread_blocked, id=2004, stack(0x02e80000,0x02ed0000)] 0x02cc2c00 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3840, stack(0x02e30000,0x02e80000)] 0x02c66800 JavaThread "Finalizer" daemon [_thread_blocked, id=2288, stack(0x02de0000,0x02e30000)] 0x02c5f000 JavaThread "Reference Handler" daemon [_thread_blocked, id=2200, stack(0x02d90000,0x02de0000)] =>0x003f7400 JavaThread "main" [_thread_in_vm, id=3264, stack(0x008d0000,0x00920000)]
Other Threads: 0x02c5dc00 VMThread [stack: 0x02d40000,0x02d90000] [id=280] 0x02ccc400 WatcherThread [stack: 0x02f70000,0x02fc0000] [id=2400]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap def new generation total 18176K, used 6867K [0x069d0000, 0x07d80000, 0x09130000) eden space 16192K, 42% used [0x069d0000, 0x07084d00, 0x079a0000) from space 1984K, 0% used [0x079a0000, 0x079a0000, 0x07b90000) to space 1984K, 0% used [0x07b90000, 0x07b90000, 0x07d80000) tenured generation total 241984K, used 0K [0x09130000, 0x17d80000, 0x269d0000) the space 241984K, 0% used [0x09130000, 0x09130000, 0x09130200, 0x17d80000) compacting perm gen total 12288K, used 1364K [0x269d0000, 0x275d0000, 0x2a9d0000) the space 12288K, 11% used [0x269d0000, 0x26b251c8, 0x26b25200, 0x275d0000) ro space 8192K, 66% used [0x2a9d0000, 0x2af20e10, 0x2af21000, 0x2b1d0000) rw space 12288K, 52% used [0x2b1d0000, 0x2b8204c8, 0x2b820600, 0x2bdd0000)
Dynamic libraries: 0x00400000 - 0x00423000 C:\Program Files\Java\jdk1.6.0_06\bin\javaw.exe 0x7c940000 - 0x7c9dd000 C:\WINDOWS\system32\ntdll.dll 0x7c800000 - 0x7c932000 C:\WINDOWS\system32\kernel32.dll 0x77d80000 - 0x77e29000 C:\WINDOWS\system32\ADVAPI32.dll 0x77e30000 - 0x77ec2000 C:\WINDOWS\system32\RPCRT4.dll 0x77fa0000 - 0x77fb1000 C:\WINDOWS\system32\Secur32.dll 0x77cf0000 - 0x77d7f000 C:\WINDOWS\system32\USER32.dll 0x77ed0000 - 0x77f18000 C:\WINDOWS\system32\GDI32.dll 0x762e0000 - 0x762fd000 C:\WINDOWS\system32\IMM32.DLL 0x60740000 - 0x60749000 C:\WINDOWS\system32\LPK.DLL 0x73f80000 - 0x73feb000 C:\WINDOWS\system32\USP10.dll 0x77bc0000 - 0x77c18000 C:\WINDOWS\system32\msvcrt.dll 0x7c340000 - 0x7c396000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\msvcr71.dll 0x6d870000 - 0x6dac0000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\client\jvm.dll 0x76af0000 - 0x76b1b000 C:\WINDOWS\system32\WINMM.dll 0x6d320000 - 0x6d328000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\hpi.dll 0x76ba0000 - 0x76bab000 C:\WINDOWS\system32\PSAPI.DLL 0x6d820000 - 0x6d82c000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\verify.dll 0x6d3c0000 - 0x6d3df000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\java.dll 0x6d860000 - 0x6d86f000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\zip.dll 0x6d620000 - 0x6d633000 C:\Program Files\Java\jdk1.6.0_06\jre\bin\net.dll 0x719e0000 - 0x719f7000 C:\WINDOWS\system32\WS2_32.dll 0x719d0000 - 0x719d8000 C:\WINDOWS\system32\WS2HELP.dll 0x71980000 - 0x719bf000 C:\WINDOWS\system32\mswsock.dll 0x607c0000 - 0x60816000 C:\WINDOWS\system32\hnetcfg.dll 0x719c0000 - 0x719c8000 C:\WINDOWS\System32\wshtcpip.dll 0x03690000 - 0x036e2000 C:\Documents and Settings\schin.DEV\Local Settings\Temp\jna47932.tmp 0x036f0000 - 0x03704000 D:\Ricoh\Sys0\release\sys0_jnadaptor.dll 0x03710000 - 0x03757000 D:\Ricoh\Sys0\release\Sys0_TkBackGateway.dll 0x03760000 - 0x03782000 C:\Program Files\RICOH\Ridoc Document\RSvrInfo.dll 0x03790000 - 0x0379d000 C:\Program Files\RICOH\Ridoc Document\DmTkErrorLog.dll 0x037a0000 - 0x037d3000 C:\Program Files\RICOH\Ridoc Document\rdsmisc.dll 0x77bb0000 - 0x77bb8000 C:\WINDOWS\system32\VERSION.dll 0x75fd0000 - 0x76035000 C:\WINDOWS\system32\MSVCP60.dll 0x037e0000 - 0x037ee000 C:\Program Files\RICOH\Ridoc Document\RdmCommon.dll 0x76970000 - 0x76aad000 C:\WINDOWS\system32\ole32.dll 0x770d0000 - 0x7715b000 C:\WINDOWS\system32\OLEAUT32.dll 0x71a00000 - 0x71a0b000 C:\WINDOWS\system32\WSOCK32.dll 0x037f0000 - 0x0381c000 C:\Program Files\RICOH\Ridoc Document\RATMgr.dll 0x03820000 - 0x03844000 C:\Program Files\RICOH\Ridoc Document\soapPrcm.dll 0x03850000 - 0x03864000 C:\Program Files\RICOH\Ridoc Document\soapCdom.dll 0x03870000 - 0x0389d000 C:\Program Files\RICOH\Ridoc Document\expat.dll 0x038a0000 - 0x038cd000 C:\Program Files\RICOH\Ridoc Document\RInetwrp.dll 0x771b0000 - 0x7727e000 C:\WINDOWS\system32\WININET.dll 0x77f20000 - 0x77f96000 C:\WINDOWS\system32\SHLWAPI.dll 0x038d0000 - 0x038d9000 C:\WINDOWS\system32\Normaliz.dll 0x5dca0000 - 0x5dce5000 C:\WINDOWS\system32\iertutil.dll 0x038e0000 - 0x03905000 C:\Program Files\RICOH\Ridoc Document\uaproxy-v3.dll 0x03910000 - 0x03953000 C:\Program Files\RICOH\Ridoc Document\udproxy-v3.dll 0x03960000 - 0x03971000 C:\Program Files\RICOH\Ridoc Document\ruasi.dll 0x03980000 - 0x03988000 C:\Program Files\RICOH\Ridoc Document\RuaAuthProt.dll 0x03990000 - 0x039a4000 C:\Program Files\RICOH\Ridoc Document\SimpleDMTKConnection.dll 0x5ab60000 - 0x5abfa000 C:\WINDOWS\system32\COMCTL32.dll 0x72f50000 - 0x72f76000 C:\WINDOWS\system32\WINSPOOL.DRV 0x03c50000 - 0x03d53000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0 .2600.2982_x-ww_ac3f9c03\comctl32.dll 0x76ed0000 - 0x76ef7000 C:\WINDOWS\system32\DNSAPI.dll 0x76f60000 - 0x76f68000 C:\WINDOWS\System32\winrnr.dll 0x76f10000 - 0x76f3c000 C:\WINDOWS\system32\WLDAP32.dll 0x76f70000 - 0x76f76000 C:\WINDOWS\system32\rasadhlp.dll 0x7d5b0000 - 0x7ddaf000 C:\WINDOWS\system32\SHELL32.dll 0x76e90000 - 0x76ecc000 C:\WINDOWS\system32\RASAPI32.dll 0x76e40000 - 0x76e52000 C:\WINDOWS\system32\rasman.dll 0x59250000 - 0x592a4000 C:\WINDOWS\system32\NETAPI32.dll 0x76e60000 - 0x76e8f000 C:\WINDOWS\system32\TAPI32.dll 0x76e30000 - 0x76e3e000 C:\WINDOWS\system32\rtutils.dll 0x759b0000 - 0x75a60000 C:\WINDOWS\system32\USERENV.dll 0x77cb0000 - 0x77cd3000 C:\WINDOWS\system32\msv1_0.dll 0x76d10000 - 0x76d29000 C:\WINDOWS\system32\iphlpapi.dll 0x72220000 - 0x72225000 C:\WINDOWS\system32\sensapi.dll 0x76f80000 - 0x76fff000 C:\WINDOWS\system32\CLBCATQ.DLL 0x77000000 - 0x770ab000 C:\WINDOWS\system32\COMRes.dll 0x04c60000 - 0x051c0000 C:\WINDOWS\system32\xpsp2res.dll 0x05260000 - 0x0526d000 C:\Program Files\Ricoh\Ridoc Document\DmTkBackps.dll
VM Arguments: jvm_args: -Xms256m -Xmx512m java_command: org.eclipse.jdt.internal.junit.runner.RemoteTestRunner -version 3 -port 1853 -testLoaderClass org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestLoader -classNames jp.co.ricoh.smc.sys0.tkback.api.Sys0TkbackFacadeTest Launcher Type: SUN_STANDARD
Environment Variables: JAVA_HOME=C:\Program Files\Java\jdk1.6.0_06 PATH=C:\temp\Windows Resource Kits\Tools\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Progr am Files\Common Files\Roxio Shared\DLLShared\;C:\SQL10N\DLL;C:\SQL10N\BIN;\\carrot\vss\win32;D:\Program Files\Apache Software Foundation\maven-2.0.7\bin;C:\Program Files\RICOH\Limedio\bin;C:\cygwin\bin;C:\Program Files\RICOH\Ridoc Document;C:\Program Files\Microsoft Visual Studio\Common\Tools\WinNT;C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin;C:\Program Files\Microsoft Visual Studio\Common\Tools;C:\Program Files\Microsoft Visual Studio\VC98\bin;C:\Program Files\Java\jdk1.5.0_12\bin USERNAME=schin OS=Windows_NT PROCESSOR_IDENTIFIER=x86 Family 15 Model 6 Stepping 5, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows XP Build 2600 Service Pack 2
CPU:total 2 (2 cores per cpu, 1 threads per core) family 15 model 6 stepping 5, cmov, cx8, fxsr, mmx, sse, sse2, sse3
Memory: 4k page, physical 2086440k(1271768k free), swap 4024856k(2789416k free)
vm_info: Java HotSpot(TM) Client VM (10.0-b22) for windows-x86 JRE (1.6.0_06-b02), built on Mar 25 2008 01:22:05 by "java_re" with MS VC++ 7.1
time: Mon Jan 19 17:09:03 2009 elapsed time: 1 seconds
please give me some advises.
Thanks a lot
========== schin







