java - My library on multiples connections with my JNI applications -


i developing java application uses c++ library. application type client/server rcp (eclipse plugin based). problem when try connect more 2 clients server, frozes. strange problem happens, when running in windows. in linux, works fine.

i want notice also, that, programatically, clients represented c++ threads. may be, want access same resource. if let application running, waiting defroze, crashes , generates log shown below

 # unexpected error has been detected java runtime environment: # #  exception_access_violation (0xc0000005) @ pc=0x6b88cd86, pid=2972, tid=3700 # # java vm: java hotspot(tm) client vm (11.2-b01 mixed mode windows-x86) # problematic frame: # c  [libtlmdevice_ycp-3-0-0.dll+0x4cd86] # # if submit bug report, please visit: #   http://java.sun.com/webapps/bugreport/crash.jsp # crash happened outside java virtual machine in native code. # see problematic frame report bug. #  ---------------  t h r e d  ---------------  current thread (0x637f0800):  javathread "thread-4" [_thread_in_native, id=3700, stack(0x687a0000,0x687f0000)]  siginfo: exceptioncode=0xc0000005, reading address 0x0000000c  registers: eax=0x00000000, ebx=0x6b87b418, ecx=0x003fcd58, edx=0x00000000 esp=0x687efaa8, ebp=0x687efaa8, esi=0x003ffeb8, edi=0x637f0800 eip=0x6b88cd86, eflags=0x00010202  top of stack: (sp=0x687efaa8) 0x687efaa8:   687efb08 6b86246a 00000000 6b897954 0x687efab8:   00000001 6b87b418 003ffeb8 637f0800 0x687efac8:   687efae8 6b87a97c 688946e8 00000000 0x687efad8:   00000001 00000000 68893500 633b3f02 0x687efae8:   687efb02 6b88d032 00000002 00000000 0x687efaf8:   00000000 6b87b418 003ffeb8 637f0800 0x687efb08:   687efb48 6b87b312 003fcd58 00000002 0x687efb18:   00000000 00000011 687efb58 7c90da1c   instructions: (pc=0x6b88cd86) 0x6b88cd76:   08 0f b6 45 fc 88 42 08 c9 c3 55 89 e5 8b 45 08 0x6b88cd86:   8b 40 0c 5d c3 90 55 89 e5 53 83 ec 14 8b 45 08    stack: [0x687a0000,0x687f0000],  sp=0x687efaa8,  free space=318k native frames: (j=compiled java code, j=interpreted, vv=vm code, c=native code) c  [libtlmdevice_ycp-3-0-0.dll+0x4cd86] c  [libtlmdevice_ycp-3-0-0.dll+0x2246a] c  [libtlmdevice_ycp-3-0-0.dll+0x3b312] c  [libtlmdevice_ycp-3-0-0.dll+0x3b42c] c  [libtlmdevice_ycp-3-0-0.dll+0x3db81] c  [libtlmdevice_ycp-3-0-0.dll+0x3de1c] c  [libtlmdevice_ycp-3-0-0.dll+0x22f70] j  com.st.tlmdevice.api.tlmdeviceserver.initialize(ljava/lang/string;iiii)i+0 j  com.st.tlmdevice.api.tlmdeviceserver.run()v+40 v  ~stubroutines::call_stub  java frames: (j=compiled java code, j=interpreted, vv=vm code) j  com.st.tlmdevice.api.tlmdeviceserver.initialize(ljava/lang/string;iiii)i+0 j  com.st.tlmdevice.api.tlmdeviceserver.run()v+40 v  ~stubroutines::call_stub  ---------------  p r o c e s s  ---------------  java threads: ( => current thread )   0x66e52800 javathread "thread-17" [_thread_in_native, id=1324, stack(0x68c30000,0x68c80000)]   0x63063000 javathread "thread-15" [_thread_in_native, id=3060, stack(0x68b30000,0x68b80000)]   0x63035000 javathread "thread-16" [_thread_in_native, id=3720, stack(0x68970000,0x689c0000)]   0x637e5800 javathread "thread-14" [_thread_in_native, id=2672, stack(0x689c0000,0x68a10000)]   0x66da4400 javathread "java sound event dispatcher" daemon [_thread_blocked, id=1532, stack(0x6bf00000,0x6bf50000)] =>0x637f0800 javathread "thread-4" [_thread_in_native, id=3700, stack(0x687a0000,0x687f0000)]   0x637ec800 javathread "thread-5" [_thread_blocked, id=796, stack(0x68750000,0x687a0000)]   0x66be8c00 javathread "worker-1" [_thread_blocked, id=2016, stack(0x684c0000,0x68510000)]   0x66b67400 javathread "worker-0" [_thread_blocked, id=2336, stack(0x67ac0000,0x67b10000)]   0x63408400 javathread "start level event dispatcher" daemon [_thread_blocked, id=3360, stack(0x63760000,0x637b0000)]   0x633ffc00 javathread "framework event dispatcher" daemon [_thread_blocked, id=1268, stack(0x636c0000,0x63710000)]   0x633e6c00 javathread "state data manager" daemon [_thread_blocked, id=1968, stack(0x63670000,0x636c0000)]   0x63025000 javathread "low memory detector" daemon [_thread_blocked, id=3936, stack(0x63270000,0x632c0000)]   0x6301ec00 javathread "compilerthread0" daemon [_thread_blocked, id=468, stack(0x63220000,0x63270000)]   0x6301d400 javathread "attach listener" daemon [_thread_blocked, id=2560, stack(0x631d0000,0x63220000)]   0x6301c000 javathread "signal dispatcher" daemon [_thread_blocked, id=2716, stack(0x63180000,0x631d0000)]   0x6300c400 javathread "finalizer" daemon [_thread_blocked, id=456, stack(0x63130000,0x63180000)]   0x63007800 javathread "reference handler" daemon [_thread_blocked, id=1400, stack(0x630e0000,0x63130000)]   0x003a6c00 javathread "main" [_thread_in_native, id=448, stack(0x008c0000,0x00910000)]  other threads:   0x63004000 vmthread [stack: 0x63090000,0x630e0000] [id=1424]   0x63038800 watcherthread [stack: 0x632c0000,0x63310000] [id=2604]  vm state:not @ safepoint (normal execution)  vm mutex/monitor owned thread: none  heap  def new generation   total 36352k, used 165k [0x02990000, 0x05100000, 0x07850000)   eden space 32320k,   0% used [0x02990000, 0x029b9740, 0x04920000)   space 4032k,   0% used [0x04920000, 0x04920000, 0x04d10000)     space 4032k,   0% used [0x04d10000, 0x04d10000, 0x05100000)  tenured generation   total 483968k, used 30304k [0x07850000, 0x250f0000, 0x42990000)    space 483968k,   6% used [0x07850000, 0x095e83f8, 0x095e8400, 0x250f0000)  compacting perm gen  total 28928k, used 28902k [0x42990000, 0x445d0000, 0x62990000)    space 28928k,  99% used [0x42990000, 0x445c9ac0, 0x445c9c00, 0x445d0000) no shared spaces configured.  dynamic libraries: 0x00400000 - 0x00424000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\javaw.exe 0x7c900000 - 0x7c9af000     c:\windows\system32\ntdll.dll 0x7c800000 - 0x7c8f6000     c:\windows\system32\kernel32.dll 0x77dd0000 - 0x77e6b000     c:\windows\system32\advapi32.dll 0x77e70000 - 0x77f02000     c:\windows\system32\rpcrt4.dll 0x77fe0000 - 0x77ff1000     c:\windows\system32\secur32.dll 0x7e410000 - 0x7e4a1000     c:\windows\system32\user32.dll 0x77f10000 - 0x77f59000     c:\windows\system32\gdi32.dll 0x76390000 - 0x763ad000     c:\windows\system32\imm32.dll 0x7c340000 - 0x7c396000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\msvcr71.dll 0x6d8b0000 - 0x6db06000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\client\jvm.dll 0x76b40000 - 0x76b6d000     c:\windows\system32\winmm.dll 0x6d340000 - 0x6d348000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\hpi.dll 0x76bf0000 - 0x76bfb000     c:\windows\system32\psapi.dll 0x6d860000 - 0x6d86c000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\verify.dll 0x6d3e0000 - 0x6d3ff000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\java.dll 0x6d8a0000 - 0x6d8af000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\zip.dll 0x72000000 - 0x72014000     c:\stm\stworkbenchr4.1.1\plugins\org.eclipse.equinox.launcher.win32.win32.x86_1.0.101.r34x_v20080731\eclipse_1115.dll 0x773d0000 - 0x774d3000     c:\windows\winsxs\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll 0x77c10000 - 0x77c68000     c:\windows\system32\msvcrt.dll 0x77f60000 - 0x77fd6000     c:\windows\system32\shlwapi.dll 0x77c00000 - 0x77c08000     c:\windows\system32\version.dll 0x63530000 - 0x63568000     c:\windows\system32\uxtheme.dll 0x74720000 - 0x7476c000     c:\windows\system32\msctf.dll 0x755c0000 - 0x755ee000     c:\windows\system32\msctfime.ime 0x774e0000 - 0x7761d000     c:\windows\system32\ole32.dll 0x68000000 - 0x68036000     c:\windows\system32\rsaenh.dll 0x769c0000 - 0x76a74000     c:\windows\system32\userenv.dll 0x63610000 - 0x63665000     c:\windows\system32\netapi32.dll 0x6d6c0000 - 0x6d6d3000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\net.dll 0x71ab0000 - 0x71ac7000     c:\windows\system32\ws2_32.dll 0x71aa0000 - 0x71aa8000     c:\windows\system32\ws2help.dll 0x71a50000 - 0x71a8f000     c:\windows\system32\mswsock.dll 0x76f20000 - 0x76f47000     c:\windows\system32\dnsapi.dll 0x76fb0000 - 0x76fb8000     c:\windows\system32\winrnr.dll 0x76f60000 - 0x76f8c000     c:\windows\system32\wldap32.dll 0x76fc0000 - 0x76fc6000     c:\windows\system32\rasadhlp.dll 0x6d6e0000 - 0x6d6e9000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\nio.dll 0x673d0000 - 0x67425000     c:\documents , settings\turkia\workspace2\.metadata\.plugins\org.eclipse.pde.core\new_configuration\org.eclipse.osgi\bundles\561\1\.cp\swt-win32-3452.dll 0x77120000 - 0x771ab000     c:\windows\system32\oleaut32.dll 0x763b0000 - 0x763f9000     c:\windows\system32\comdlg32.dll 0x7c9c0000 - 0x7d1d7000     c:\windows\system32\shell32.dll 0x74d90000 - 0x74dfb000     c:\windows\system32\usp10.dll 0x771b0000 - 0x7727e000     c:\windows\system32\wininet.dll 0x67440000 - 0x67449000     c:\windows\system32\normaliz.dll 0x67450000 - 0x67495000     c:\windows\system32\iertutil.dll 0x67730000 - 0x67744000     c:\documents , settings\turkia\workspace2\.metadata\.plugins\org.eclipse.pde.core\new_configuration\org.eclipse.osgi\bundles\561\1\.cp\swt-gdip-win32-3452.dll 0x67750000 - 0x678f6000     c:\windows\winsxs\x86_microsoft.windows.gdiplus_6595b64144ccf1df_1.0.2600.5512_x-ww_dfb54e0c\gdiplus.dll 0x74c80000 - 0x74cac000     c:\windows\system32\oleacc.dll 0x76080000 - 0x760e5000     c:\windows\system32\msvcp60.dll 0x68040000 - 0x68305000     c:\windows\system32\xpsp2res.dll 0x76380000 - 0x76385000     c:\windows\system32\msimg32.dll 0x67b10000 - 0x67b1f000     c:\documents , settings\turkia\workspace2\.metadata\.plugins\org.eclipse.pde.core\new_configuration\org.eclipse.osgi\bundles\362\1\.cp\jwinhttp.dll 0x67b30000 - 0x67b89000     c:\windows\system32\winhttp.dll 0x76fd0000 - 0x7704f000     c:\windows\system32\clbcatq.dll 0x77050000 - 0x77115000     c:\windows\system32\comres.dll 0x75cf0000 - 0x75d81000     c:\windows\system32\mlang.dll 0x70d00000 - 0x70d23000     c:\test\i686-win5.1-gcc_4.1.1_mingw-2-jdk_1.6.0_12-yac_1.2.5\bin\libyacapi.dll 0x6b840000 - 0x6bef9000     c:\test\i686-win5.1-gcc_4.1.1_mingw-2-jdk_1.6.0_12-yac_1.2.5\bin\libtlmdevice_ycp-3-0-0.dll 0x687f0000 - 0x68848000     c:\windows\system32\hnetcfg.dll 0x73080000 - 0x7309d000     c:\windows\system32\rsvpsp.dll 0x71a90000 - 0x71a98000     c:\windows\system32\wshtcpip.dll 0x6d5d0000 - 0x6d5f4000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\jsound.dll 0x6d600000 - 0x6d608000     c:\spg\ext_tools\jdk\i686-win5.1\jdk1.6.0_12\jre\bin\jsoundds.dll 0x73f10000 - 0x73f6c000     c:\windows\system32\dsound.dll 0x76c30000 - 0x76c5e000     c:\windows\system32\wintrust.dll 0x77a80000 - 0x77b15000     c:\windows\system32\crypt32.dll 0x77b20000 - 0x77b32000     c:\windows\system32\msasn1.dll 0x76c90000 - 0x76cb8000     c:\windows\system32\imagehlp.dll 0x72d20000 - 0x72d29000     c:\windows\system32\wdmaud.drv 0x72d10000 - 0x72d18000     c:\windows\system32\msacm32.drv 0x77be0000 - 0x77bf5000     c:\windows\system32\msacm32.dll 0x77bd0000 - 0x77bd7000     c:\windows\system32\midimap.dll 0x73ee0000 - 0x73ee4000     c:\windows\system32\ksuser.dll  vm arguments: jvm_args: -xms512m -xmx1g -xx:maxpermsize=512m -declipse.pde.launch=true -dfile.encoding=cp1252  java_command: org.eclipse.equinox.launcher.main -launcher c:\stm\stworkbenchr4.1.1\eclipse.exe -name eclipse -showsplash 600 -product com.st.platform.st_ide -data c:\documents , settings\turkia\workspace2/../runtime-new_configuration -configuration file:c:/documents , settings/turkia/workspace2/.metadata/.plugins/org.eclipse.pde.core/new_configuration/ -dev file:c:/documents , settings/turkia/workspace2/.metadata/.plugins/org.eclipse.pde.core/new_configuration/dev.properties -os win32 -ws win32 -arch x86 -nl en_us launcher type: sun_standard  environment variables: path=c:/spg/ext_tools/jdk/i686-win5.1/jdk1.6.0_12/bin/../jre/bin/client;c:/spg/ext_tools/jdk/i686-win5.1/jdk1.6.0_12/bin/../jre/bin;c:\windows\system32;c:\windows;c:\windows\system32\wbem username=turkia os=windows_nt processor_identifier=x86 family 6 model 15 stepping 2, genuineintel    ---------------  s y s t e m  ---------------  os: windows xp build 2600 service pack 3  cpu:total 1 (1 cores per cpu, 1 threads per core) family 6 model 15 stepping 2, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3  memory: 4k page, physical 2086444k(1045564k free), swap 4024844k(2273736k free)  vm_info: java hotspot(tm) client vm (11.2-b01) windows-x86 jre (1.6.0_12-b04), built on jan 17 2009 09:57:14 "java_re" ms vc++ 7.1  time: thu mar 03 11:07:22 2011 elapsed time: 334 seconds 

libtlmdevice_ycp-3-0-0.dll library using

if have idea :) in advance.

kind regards, ali.

the native code needs attach jvm using attachcurrentthread , use jnienv pointer provided function. cannot use first jnienv c++ lib got hands on.

also, there's chance c++ lib isn't thread-safe, can't tell without seeing source.


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

android - layout with fragment and framelayout replaced by another fragment and framelayout -