Aew galera, alguem conhece e ja trabalhou com impressoras TermoPrinter 1002?
Estou implementando esse modelo em uma aplicação de ecf e estou tendo problemas para fazer funcionar, consegui fazer a conexao com a DLL mas vendo o manual é muito estranho a forma como faço as chamadas, consigo abrir a porta serial, limpar os parametros mas na hora de adicionar um parametro me retorna o seguinte
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x04cccc0f, pid=5768, tid=2568
#
# JRE version: 6.0_17-b04
# Java VM: Java HotSpot(TM) Client VM (14.3-b01 mixed mode, sharing windows-x86 )
# Problematic frame:
# C [DLLG2.dll+0x6cc0f]
#
# 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 (0x013fa800): JavaThread "main" [_thread_in_native, id=2568, stack(0x000c0000,0x00110000)]
siginfo: ExceptionCode=0xc0000005, reading address 0x00000001
Registers:
EAX=0x0010f77c, EBX=0x00000018, ECX=0x00000000, EDX=0x00000001
ESP=0x0010f6e8, EBP=0x0010f71c, ESI=0x0010f8b0, EDI=0x013fa800
EIP=0x04cccc0f, EFLAGS=0x00010202
Top of Stack: (sp=0x0010f6e8)
0x0010f6e8: 00000001 04cde6f6 00000018 0010f72c
0x0010f6f8: 04cd019b 04cf1ca4 0010f6f0 00000008
0x0010f708: 00000008 00000008 00000000 00000000
0x0010f718: 0010f77c 0010f788 04c63f67 0010f778
0x0010f728: 0010f774 0010fd8c 04cd019b 04ce0ddc
0x0010f738: 0010f72c 00000020 0010f76c 2c26fe70
0x0010f748: 00000002 013fa800 0010f780 1000980c
0x0010f758: 0010f7a0 0010f8c8 00000008 00000000
Instructions: (pc=0x04cccc0f)
0x04cccbff: 00 e8 03 ff ff ff 5a c3 90 31 c9 85 d2 74 21 52
0x04cccc0f: 3a 0a 74 17 3a 4a 01 74 11 3a 4a 02 74 0b 3a 4a
Stack: [0x000c0000,0x00110000], sp=0x0010f6e8, free space=317k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
C [DLLG2.dll+0x6cc0f]
C [DLLG2.dll+0x3f67]
C [jna3396400588819566164.tmp+0xe327]
C [jna3396400588819566164.tmp+0x99e9]
C [jna3396400588819566164.tmp+0x215d]
C [jna3396400588819566164.tmp+0x28fc]
j com.sun.jna.Function.invokeVoid(I[Ljava/lang/Object;)V+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+45
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+214
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
j $Proxy0.DLLG2_AdicionaParam(JLjava/lang/String;Ljava/lang/String;J)V+36
j config.impressora.termoprinter.ThermoPrinterECFTEFPDV.leituraX()V+44
j Teste.main([Ljava/lang/String;)V+23
v ~StubRoutines::call_stub
V [jvm.dll+0xecf9c]
V [jvm.dll+0x1741d1]
V [jvm.dll+0xed01d]
V [jvm.dll+0xf5be5]
V [jvm.dll+0xfd83d]
C [java.exe+0x2155]
C [java.exe+0x82ce]
C [kernel32.dll+0x4d0e9]
C [ntdll.dll+0x416c3]
C [ntdll.dll+0x41696]
Java frames: (J=compiled Java code, j=interpreted, Vv=VM code)
j com.sun.jna.Function.invokeVoid(I[Ljava/lang/Object;)V+0
j com.sun.jna.Function.invoke([Ljava/lang/Object;Ljava/lang/Class;Z)Ljava/lang/Object;+45
j com.sun.jna.Function.invoke(Ljava/lang/Class;[Ljava/lang/Object;Ljava/util/Map;)Ljava/lang/Object;+214
j com.sun.jna.Library$Handler.invoke(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+344
j $Proxy0.DLLG2_AdicionaParam(JLjava/lang/String;Ljava/lang/String;J)V+36
j config.impressora.termoprinter.ThermoPrinterECFTEFPDV.leituraX()V+44
j Teste.main([Ljava/lang/String;)V+23
v ~StubRoutines::call_stub
--------------- P R O C E S S ---------------
Java Threads: ( => current thread )
0x0227ac00 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=5820, stack(0x04340000,0x04390000)]
0x02276000 JavaThread "CompilerThread0" daemon [_thread_blocked, id=4424, stack(0x042f0000,0x04340000)]
0x02275800 JavaThread "Attach Listener" daemon [_thread_blocked, id=3188, stack(0x02160000,0x021b0000)]
0x0226b000 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=3824, stack(0x02110000,0x02160000)]
0x02225c00 JavaThread "Finalizer" daemon [_thread_blocked, id=4976, stack(0x01350000,0x013a0000)]
0x02224400 JavaThread "Reference Handler" daemon [_thread_blocked, id=4300, stack(0x01300000,0x01350000)]
=>0x013fa800 JavaThread "main" [_thread_in_native, id=2568, stack(0x000c0000,0x00110000)]
Other Threads:
0x02222c00 VMThread [stack: 0x00bb0000,0x00c00000] [id=1660]
0x02284000 WatcherThread [stack: 0x04390000,0x043e0000] [id=3496]
VM state:not at safepoint (normal execution)
VM Mutex/Monitor currently owned by a thread: None
Heap
def new generation total 960K, used 902K [0x23a00000, 0x23b00000, 0x23ee0000)
eden space 896K, 93% used [0x23a00000, 0x23ad1a28, 0x23ae0000)
from space 64K, 99% used [0x23af0000, 0x23affff8, 0x23b00000)
to space 64K, 0% used [0x23ae0000, 0x23ae0000, 0x23af0000)
tenured generation total 4096K, used 110K [0x23ee0000, 0x242e0000, 0x27a00000)
the space 4096K, 2% used [0x23ee0000, 0x23efb860, 0x23efba00, 0x242e0000)
compacting perm gen total 12288K, used 385K [0x27a00000, 0x28600000, 0x2ba00000)
the space 12288K, 3% used [0x27a00000, 0x27a607d8, 0x27a60800, 0x28600000)
ro space 8192K, 67% used [0x2ba00000, 0x2bf68230, 0x2bf68400, 0x2c200000)
rw space 12288K, 54% used [0x2c200000, 0x2c87d678, 0x2c87d800, 0x2ce00000)
Dynamic libraries:
0x00400000 - 0x00424000 C:\Program Files\Java\jdk1.6.0_17\bin\java.exe
0x77180000 - 0x772a8000 C:\Windows\system32\ntdll.dll
0x75cb0000 - 0x75d8c000 C:\Windows\system32\kernel32.dll
0x77300000 - 0x773c6000 C:\Windows\system32\ADVAPI32.dll
0x75f40000 - 0x76003000 C:\Windows\system32\RPCRT4.dll
0x7c340000 - 0x7c396000 C:\Program Files\Java\jdk1.6.0_17\jre\bin\msvcr71.dll
0x6d8b0000 - 0x6db3b000 C:\Program Files\Java\jdk1.6.0_17\jre\bin\client\jvm.dll
0x75d90000 - 0x75e2d000 C:\Windows\system32\USER32.dll
0x772b0000 - 0x772fb000 C:\Windows\system32\GDI32.dll
0x73f90000 - 0x73fc2000 C:\Windows\system32\WINMM.dll
0x75c00000 - 0x75caa000 C:\Windows\system32\msvcrt.dll
0x77030000 - 0x77175000 C:\Windows\system32\ole32.dll
0x75aa0000 - 0x75b2d000 C:\Windows\system32\OLEAUT32.dll
0x73f50000 - 0x73f8d000 C:\Windows\system32\OLEACC.dll
0x76250000 - 0x7626e000 C:\Windows\system32\IMM32.DLL
0x75b30000 - 0x75bf8000 C:\Windows\system32\MSCTF.dll
0x75680000 - 0x756ac000 C:\Windows\system32\apphelp.dll
0x75850000 - 0x75859000 C:\Windows\system32\LPK.DLL
0x76d90000 - 0x76e0d000 C:\Windows\system32\USP10.dll
0x6d860000 - 0x6d86c000 C:\Program Files\Java\jdk1.6.0_17\jre\bin\verify.dll
0x6d3e0000 - 0x6d3ff000 C:\Program Files\Java\jdk1.6.0_17\jre\bin\java.dll
0x6d340000 - 0x6d348000 C:\Program Files\Java\jdk1.6.0_17\jre\bin\hpi.dll
0x75840000 - 0x75847000 C:\Windows\system32\PSAPI.DLL
0x6d8a0000 - 0x6d8af000 C:\Program Files\Java\jdk1.6.0_17\jre\bin\zip.dll
0x74c10000 - 0x74c4b000 C:\Windows\system32\rsaenh.dll
0x75700000 - 0x7571e000 C:\Windows\system32\USERENV.dll
0x756e0000 - 0x756f4000 C:\Windows\system32\Secur32.dll
0x6d6c0000 - 0x6d6d3000 C:\Program Files\Java\jdk1.6.0_17\jre\bin\net.dll
0x76220000 - 0x7624d000 C:\Windows\system32\WS2_32.dll
0x773d0000 - 0x773d6000 C:\Windows\system32\NSI.dll
0x74e90000 - 0x74ecb000 C:\Windows\system32\mswsock.dll
0x74f00000 - 0x74f05000 C:\Windows\System32\wship6.dll
0x73d70000 - 0x73d7f000 C:\Windows\system32\NLAapi.dll
0x750e0000 - 0x750f9000 C:\Windows\system32\IPHLPAPI.DLL
0x750a0000 - 0x750d5000 C:\Windows\system32\dhcpcsvc.DLL
0x75320000 - 0x7534c000 C:\Windows\system32\DNSAPI.dll
0x75090000 - 0x75097000 C:\Windows\system32\WINNSI.DLL
0x75060000 - 0x75082000 C:\Windows\system32\dhcpcsvc6.DLL
0x73290000 - 0x7329f000 C:\Windows\system32\napinsp.dll
0x728f0000 - 0x72902000 C:\Windows\system32\pnrpnsp.dll
0x72920000 - 0x72928000 C:\Windows\System32\winrnr.dll
0x76010000 - 0x76059000 C:\Windows\system32\WLDAP32.dll
0x74b30000 - 0x74b35000 C:\Windows\System32\wshtcpip.dll
0x732f0000 - 0x732f6000 C:\Windows\system32\rasadhlp.dll
0x10000000 - 0x10053000 C:\Users\Usuario\AppData\Local\Temp\jna3396400588819566164.tmp
0x04c60000 - 0x04d27000 C:\Windows\system32\DLLG2.dll
0x74fa0000 - 0x74fa8000 C:\Windows\system32\VERSION.DLL
0x745a0000 - 0x7473e000 C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_6.0.6002.18305_none_5cb72f2a088b0ed3\COMCTL32.DLL
0x76f40000 - 0x76f99000 C:\Windows\system32\SHLWAPI.dll
0x76270000 - 0x76d81000 C:\Windows\system32\SHELL32.DLL
VM Arguments:
jvm_args: -Dfile.encoding=ISO-8859-1
java_command: Teste
Launcher Type: SUN_STANDARD
Environment Variables:
JAVA_HOME=C:\Program Files\Java\jdk1.6.0_17
CLASSPATH=.;C:\Program Files\Java\jre6\lib\ext\QTJava.zip;C:\Users\Usuario\Documents\JAVA\libs\axis-1_4/axis.jar;C:\Users\Usuario\Documents\JAVA\libs\axis-1_4/saaj.jar;C:\Users\Usuario\Documents\JAVA\libs\axis-1_4/jaxrpc.jar;C:\Users\Usuario\Documents\JAVA\libs\axis-1_4/commons-logging-1.0.4.jar;C:\Users\Usuario\Documents\JAVA\libs\axis-1_4/commons-discovery-0.2.jar;C:\Users\Usuario\Documents\JAVA\libs\axis-1_4/wsdl4j-1.5.1.jar
PATH=C:\Program Files\Common Files\Microsoft Shared\Windows Live;C:\XEClient\bin;C:\WAMP\PHP\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\TortoiseSVN\bin;C:\Program Files\Java\jdk1.6.0_17\bin;C:\Program Files\QuickTime\QTSystem\;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Windows Live\Shared;C:\Program Files\PostgreSQL\8.4\bin
USERNAME=Usuario
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 6 Model 15 Stepping 11, GenuineIntel
--------------- S Y S T E M ---------------
OS: Windows Vista Build 6002 Service Pack 2
CPU:total 2 (2 cores per cpu, 1 threads per core) family 6 model 15 stepping 11, cmov, cx8, fxsr, mmx, sse, sse2, sse3, ssse3
Memory: 4k page, physical 2051976k(749944k free), swap 4194303k(2180968k free)
vm_info: Java HotSpot(TM) Client VM (14.3-b01) for windows-x86 JRE (1.6.0_17-b04), built on Oct 11 2009 00:52:06 by "java_re" with MS VC++ 7.1
time: Wed Jun 22 16:06:36 2011
elapsed time: 0 seconds