Menu

#3 Jawin and Object Parameters

open
nobody
None
5
2005-01-26
2005-01-26
Anonymous
No

Hello,

I am using a method in an interface that is:

short InsertPages(
[in] IVWDoc* pvwDoc,
[in] BSTR pages,
[in] VARIANT_BOOL bSilent);

When translated to Java using the Type Browser, it
becomes:

public short InsertPages(Object[] pvwDoc,String
pages,boolean bSilent) throws COMException

I tried supplying pvwDoc as an instance of the
generated IVWDoc class as follows:

Object[] pvwDoc = new Object[] {IVWDocInstance};

When the InsertPages method is called, the JVM crashes
with the error:

An unexpected exception has been detected in native
code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION
(0xc0000005) occurred at PC=0x771228E2
Function=VariantChangeTypeEx+0xF00
Library=C:\WINDOWS\system32\OLEAUT32.dll

Current Java thread:
at org.jawin.marshal.GenericStub.dispatchInvoke0
(Native Method)
at org.jawin.marshal.GenericStub.dispatchInvoke
(GenericStub.java:84)
at org.jawin.DispatchPtr.invokeN
(DispatchPtr.java:473)
at org.jawin.DispatchPtr.invokeN
(DispatchPtr.java:433)
at
com.computhink.clientext.vwclient.IVWClient.InsertPages
(IVWClient.java:194)
at
com.computhink.vwc.labs.lab3.CreateDocument.main
(CreateDocument.java:405)

Dynamic libraries:
0x00400000 - 0x00406000 C:\j2sdk1.4.2_04
\jre\bin\java.exe
0x77F50000 - 0x77FF7000 C:\WINDOWS\System32
\ntdll.dll
0x77E60000 - 0x77F46000 C:\WINDOWS\system32
\kernel32.dll
0x77DD0000 - 0x77E5D000 C:\WINDOWS\system32
\ADVAPI32.dll
0x78000000 - 0x78087000 C:\WINDOWS\system32
\RPCRT4.dll
0x77C10000 - 0x77C63000 C:\WINDOWS\system32
\MSVCRT.dll
0x08000000 - 0x08138000 C:\j2sdk1.4.2_04
\jre\bin\client\jvm.dll
0x77D40000 - 0x77DCC000 C:\WINDOWS\system32
\USER32.dll
0x7F000000 - 0x7F041000 C:\WINDOWS\system32
\GDI32.dll
0x76B40000 - 0x76B6C000 C:\WINDOWS\System32
\WINMM.dll
0x629C0000 - 0x629C8000 C:\WINDOWS\System32
\LPK.DLL
0x72FA0000 - 0x72FFA000 C:\WINDOWS\System32
\USP10.dll
0x10000000 - 0x10007000 C:\j2sdk1.4.2_04
\jre\bin\hpi.dll
0x003A0000 - 0x003AE000 C:\j2sdk1.4.2_04
\jre\bin\verify.dll
0x003B0000 - 0x003C9000 C:\j2sdk1.4.2_04
\jre\bin\java.dll
0x003D0000 - 0x003DD000 C:\j2sdk1.4.2_04
\jre\bin\zip.dll
0x02E60000 - 0x02E6F000 C:\j2sdk1.4.2_04
\jre\bin\net.dll
0x71AB0000 - 0x71AC5000 C:\WINDOWS\System32
\WS2_32.dll
0x71AA0000 - 0x71AA8000
C:\WINDOWS\System32\WS2HELP.dll
0x71A50000 - 0x71A8B000 C:\WINDOWS\System32
\mswsock.dll
0x76F20000 - 0x76F45000 C:\WINDOWS\System32
\DNSAPI.dll
0x76FB0000 - 0x76FB7000 C:\WINDOWS\System32
\winrnr.dll
0x76F60000 - 0x76F8C000 C:\WINDOWS\system32
\WLDAP32.dll
0x76FC0000 - 0x76FC5000 C:\WINDOWS\System32
\rasadhlp.dll
0x71A90000 - 0x71A98000 C:\WINDOWS\System32
\wshtcpip.dll
0x03000000 - 0x03005000 C:\j2sdk1.4.2_04
\jre\bin\rmi.dll
0x03210000 - 0x0323F000 F:\jawin\bin\jawin.dll
0x771B0000 - 0x772D4000 C:\WINDOWS\system32
\ole32.dll
0x77120000 - 0x771AB000 C:\WINDOWS\system32
\OLEAUT32.dll
0x5AD70000 - 0x5ADA4000
C:\WINDOWS\System32\uxtheme.dll
0x74720000 - 0x74764000 C:\WINDOWS\System32
\MSCTF.dll
0x7C890000 - 0x7C911000 C:\WINDOWS\System32
\CLBCATQ.DLL
0x77050000 - 0x77115000 C:\WINDOWS\System32
\COMRes.dll
0x77C00000 - 0x77C07000 C:\WINDOWS\system32
\VERSION.dll
0x03470000 - 0x03488000 C:\Program
Files\ViewWise 5.6 SDK\Client Ext\Bin\VWClient.dll
0x4F510000 - 0x4FD21000 C:\WINDOWS\system32
\SHELL32.dll
0x70A70000 - 0x70AD9000 C:\WINDOWS\system32
\SHLWAPI.dll
0x71950000 - 0x71A34000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-
Controls_6595b64144ccf1df_6.0.2600.1579_x-
ww_7bbf8d08\comctl32.dll
0x77340000 - 0x773CB000 C:\WINDOWS\system32
\comctl32.dll
0x76C90000 - 0x76CB2000 C:\WINDOWS\system32
\imagehlp.dll
0x6D510000 - 0x6D58D000 C:\WINDOWS\system32
\DBGHELP.dll
0x76BF0000 - 0x76BFB000 C:\WINDOWS\System32
\PSAPI.DLL

Heap at VM Abort:
Heap
def new generation total 576K, used 346K
[0x10010000, 0x100b0000, 0x104f0000)
eden space 512K, 57% used [0x10010000,
0x1005a340, 0x10090000)
from space 64K, 77% used [0x10090000, 0x1009c648,
0x100a0000)
to space 64K, 0% used [0x100a0000, 0x100a0000,
0x100b0000)
tenured generation total 1408K, used 822K
[0x104f0000, 0x10650000, 0x14010000)
the space 1408K, 58% used [0x104f0000,
0x105bdae0, 0x105bdc00, 0x10650000)
compacting perm gen total 4096K, used 3688K
[0x14010000, 0x14410000, 0x18010000)
the space 4096K, 90% used [0x14010000,
0x143aa3a0, 0x143aa400, 0x14410000)

Local Time = Wed Jan 26 09:14:05 2005
Elapsed Time = 5
#
# The exception above was detected in native code
outside the VM
#
# Java VM: Java HotSpot(TM) Client VM (1.4.2_04-b05
mixed mode)
#
# An error report file has been saved as
hs_err_pid4128.log.
# Please refer to the file for further information.
#
VT_BSTR
VT_BSTR
VT_BSTR
VT_BSTR
VT_BSTR
VT_BYREF|VT_VARIANT

Could you please provide me with an insight to how to
use the InsertPages method without getting the crash?

If you need any extra information, feel free to ask.

Regards,

Discussion


Log in to post a comment.

MongoDB Logo MongoDB