Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

JNI Invocation conflict with Borland C++ Builder / VCL?

843811Mar 10 2005 — edited May 2 2008
We have a plug-in for the Finale music notation program written mostly in Java. Finale plug-ins must have a C++ interface, so we use JNI Invocation to call the Java portion of the plug-in, which in turn calls back into C++ via JNI.

All works great on Macintosh OS X. On Windows, though, a particular series of operations can lead to a reproducible JVM crash. I've attached a log from the current crash below, though the exact location and exception changes as we add startup code to the plug-in. This is with 1.5.0-01 as well as many different versions of 1.4.2.

What we found out is that this crash only happens if there are other Finale plug-ins running that were built using Borland C++ Builder (5.0 or 6.0) and the Borland Visual Components Library (VCL). If all the Borland-built plug-ins are removed from Finale startup, our plug-in works fine just as it does on OS X, where the same plug-ins are built using CodeWarrior.

We have to live with these Borland-built plug-ins on Windows. Are there any known issues regarding conflicts between Borland C++ Builder / VCL and the JVM, especially in this plug-in / JNI invocation scenario? It's as if the JVM memory were being overwritten with zeros. Any ideas for how we might work around this, perhaps using different JVM command-line options?

Thanks for any advice!

Michael

---------------------------------------------------------------------------------------

#
# An unexpected error has been detected by HotSpot Virtual Machine:
#
# EXCEPTION_FLT_DIVIDE_BY_ZERO (0xc000008e) at pc=0x05a8aa53, pid=3980, tid=2428
#
# Java VM: Java HotSpot(TM) Client VM (1.5.0_01-b08 mixed mode)
# Problematic frame:
# j java.text.DecimalFormat.format(DLjava/lang/StringBuffer;Ljava/text/Format$FieldDelegate;)Ljava/lang/StringBuffer;+8
#

--------------- T H R E A D ---------------

Current thread (0x00eb5ca0): JavaThread "main" [_thread_in_Java, id=2428]

siginfo: ExceptionCode=0xc000008e, ExceptionInformation=0x00000000

Registers:
EAX=0x00000000, EBX=0x0000006f, ECX=0x20000002, EDX=0x00000000
ESP=0x0012ef48, EBP=0x0012ef6c, ESI=0x31a5c58c, EDI=0x0012efa0
EIP=0x05a8aa53, EFLAGS=0x00010246

Top of Stack: (sp=0x0012ef48)
0x0012ef48: 00000000 3ff00000 0012ef50 31a5c548
0x0012ef58: 0012efa0 31ab47b8 00000000 31a5c6c8
0x0012ef68: 0012ef90 0012efc0 05a829fa 00000000
0x0012ef78: 00000000 00000000 00000000 00000000
0x0012ef88: 00000000 00000000 219a21e8 219a9720
0x0012ef98: 00000000 00000000 22ba7850 0012efa4
0x0012efa8: 31a5c4a4 0012efd8 31ab47b8 00000000
0x0012efb8: 31a5c4a8 0012efc8 0012eff8 05a829fa

Instructions: (pc=0x05a8aa53)
0x05a8aa43: 88 7a 6d dc 0c 24 de f1 db 2d b4 88 7a 6d de c9
0x05a8aa53: dd 1c 24 dd 04 24 58 5a 0f b6 5e 01 46 ff 24 9d


Stack: [0x00030000,0x00130000), sp=0x0012ef48, free space=1019k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
j java.text.DecimalFormat.format(DLjava/lang/StringBuffer;Ljava/text/Format$FieldDelegate;)Ljava/lang/StringBuffer;+8
j java.text.DecimalFormat.format(DLjava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;+20
j java.text.NumberFormat.format(D)Ljava/lang/String;+12
j com.recordare.finaletools.Layout.fillSystemMargins(Lorg/w3c/dom/Element;II)V+63
j com.recordare.finaletools.Layout.createDefaultSystemLayout(Lorg/w3c/dom/Document;)Lorg/w3c/dom/Element;+140
j com.recordare.finaletools.Layout.createDefaults(Lorg/w3c/dom/Document;)Lorg/w3c/dom/Element;+54
j com.recordare.finaletools.FinaleToXml.initializeDefaults()V+8
j com.recordare.finaletools.FinaleToXml.write(Ljava/io/File;)Z+210
j com.recordare.finaletools.FinaleToXml.write(Ljava/lang/String;)Z+17
v ~StubRoutines::call_stub
V [jvm.dll+0x8176e]
V [jvm.dll+0xd481d]
V [jvm.dll+0x8163f]
V [jvm.dll+0x85d47]
V [jvm.dll+0x8db94]
C [Dolet2.fxt+0x362ac]
C [Dolet2.fxt+0x367f2]


--------------- P R O C E S S ---------------

Java Threads: ( => current thread )
0x00ec27f0 JavaThread "Low Memory Detector" daemon [_thread_blocked, id=3568]
0x00ec1b80 JavaThread "CompilerThread0" daemon [_thread_blocked, id=3184]
0x00ec0a50 JavaThread "Signal Dispatcher" daemon [_thread_blocked, id=2804]
0x00ebfcd0 JavaThread "Finalizer" daemon [_thread_blocked, id=1908]
0x00ebe9c0 JavaThread "Reference Handler" daemon [_thread_blocked, id=2908]
=>0x00eb5ca0 JavaThread "main" [_thread_in_Java, id=2428]

Other Threads:
0x00ebdc40 VMThread [id=2132]
0x00ec33a0 WatcherThread [id=1428]

VM state:synchronizing (normal execution)

VM Mutex/Monitor currently owned by a thread: ([mutex/lock_event])
[0x00eb4240/0x000003ec] Safepoint_lock - owner thread: 0x00ebdc40
[0x00eb4210/0x000003f4] Threads_lock - owner thread: 0x00ebdc40

Heap
def new generation total 2304K, used 1913K [0x217d0000, 0x21a50000, 0x22b80000)
eden
[error occurred during error reporting, step 190, id 0xc000008e]

Dynamic libraries:
0x00400000 - 0x00a8c000 C:\Program Files\Finale 2003\FINALE.EXE
0x7c900000 - 0x7c9b0000 C:\WINDOWS\system32\ntdll.dll
0x7c800000 - 0x7c8f4000 C:\WINDOWS\system32\kernel32.dll
0x77f60000 - 0x77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
0x77dd0000 - 0x77e6b000 C:\WINDOWS\system32\ADVAPI32.dll
0x77e70000 - 0x77f01000 C:\WINDOWS\system32\RPCRT4.dll
0x77f10000 - 0x77f56000 C:\WINDOWS\system32\GDI32.dll
0x77d40000 - 0x77dd0000 C:\WINDOWS\system32\USER32.dll
0x77c10000 - 0x77c68000 C:\WINDOWS\system32\msvcrt.dll
0x76080000 - 0x760e5000 C:\WINDOWS\system32\MSVCP60.dll
0x76b40000 - 0x76b6d000 C:\WINDOWS\system32\WINMM.dll
0x5d090000 - 0x5d127000 C:\WINDOWS\system32\COMCTL32.dll
0x73000000 - 0x73026000 C:\WINDOWS\system32\WINSPOOL.DRV
0x7c9c0000 - 0x7d1d4000 C:\WINDOWS\system32\SHELL32.dll
0x763b0000 - 0x763f9000 C:\WINDOWS\system32\comdlg32.dll
0x6db60000 - 0x6db71000 C:\WINDOWS\system32\CTL3D32.dll
0x774e0000 - 0x7761d000 C:\WINDOWS\system32\ole32.dll
0x77120000 - 0x771ac000 C:\WINDOWS\system32\OLEAUT32.dll
0x74d30000 - 0x74d50000 C:\WINDOWS\system32\oledlg.dll
0x76390000 - 0x763ad000 C:\WINDOWS\system32\IMM32.DLL
0x629c0000 - 0x629c9000 C:\WINDOWS\system32\LPK.DLL
0x74d90000 - 0x74dfb000 C:\WINDOWS\system32\USP10.dll
0x6bd00000 - 0x6bd3a000 C:\WINDOWS\system32\usbmn4x4.dll
0x773d0000 - 0x774d2000 C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.2180_x-ww_a84f1ff9\comctl32.dll
0x5ad70000 - 0x5ada8000 C:\WINDOWS\system32\uxtheme.dll
0x10000000 - 0x103d1000 C:\Program Files\Finale 2003\FINRES32.DLL
0x67330000 - 0x6735f000 C:\PROGRA~1\COMMON~1\SYMANT~1\ANTISPAM\asOEHook.dll
0x7c340000 - 0x7c396000 C:\WINDOWS\system32\MSVCR71.dll
0x74720000 - 0x7476b000 C:\WINDOWS\system32\MSCTF.dll
0x755c0000 - 0x755ee000 C:\WINDOWS\system32\msctfime.ime
0x01200000 - 0x01211000 C:\WINDOWS\system32\ctagent.dll
0x20000000 - 0x202c5000 C:\WINDOWS\system32\xpsp2res.dll
0x01880000 - 0x01899000 C:\PROGRAM FILES\FINALE 2003\FINMIDI.DLL
0x76c30000 - 0x76c5e000 C:\WINDOWS\system32\WINTRUST.dll
0x77a80000 - 0x77b14000 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
0x01d00000 - 0x01d0f000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\ChordMorphing.fxt
0x01e20000 - 0x01e35000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\ChordRealization.fxt
0x01f50000 - 0x01f5e000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\ChordReordering.fxt
0x02070000 - 0x02083000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\ChordSplitting.fxt
0x021a0000 - 0x021b2000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\CommonToneTransp.fxt
0x022d0000 - 0x022e3000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\FMChordGenerator.fxt
0x02400000 - 0x0240e000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\MelodicMorphing.fxt
0x02520000 - 0x02531000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\RhythmGenerator.fxt
0x02650000 - 0x0265d000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\TieCommonNotes.fxt
0x02770000 - 0x02782000 C:\Program Files\Finale 2003\Plug-ins\Composer's Assistant\Virtfund.fxt
0x028a0000 - 0x028ac000 C:\Program Files\Finale 2003\Plug-ins\Lyrics\ClearLyricPos.fxt
0x029c0000 - 0x029e6000 C:\Program Files\Finale 2003\Plug-ins\Lyrics\lextract.fxt
0x029f0000 - 0x029fa000 C:\Program Files\Finale 2003\Plug-ins\Lyrics\RmWExt32.fxt
0x02b10000 - 0x02b26000 C:\Program Files\Finale 2003\Plug-ins\Lyrics\WORDEX32.fxt
0x02b40000 - 0x02b48000 C:\Program Files\Finale 2003\Plug-ins\Measure Numbers\MEASNU32.fxt
0x02c60000 - 0x02c6d000 C:\Program Files\Finale 2003\Plug-ins\Measure Numbers\MeasNumPos.fxt
0x60000000 - 0x60067000 C:\Program Files\Finale 2003\Plug-ins\MusicXML\Dolet2.fxt
0x6d640000 - 0x6d7c5000 C:\Program Files\Java\jre1.5.0_01\bin\client\jvm.dll
0x02c90000 - 0x02cd8000 C:\Program Files\Finale 2003\Plug-ins\My Favorite Plug-ins\MusicXML.fxt
0x02cf0000 - 0x02cfa000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\CEBeams.fxt
0x02f30000 - 0x02f41000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\ChangeNoteheads.fxt
0x02f60000 - 0x02f8b000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\CHKDUR32.fxt
0x02fa0000 - 0x02fb0000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\DefaultRests.fxt
0x02fc0000 - 0x02fc8000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\flatbm.fxt
0x030e0000 - 0x030f0000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\MidlineStemDirections.fxt
0x03100000 - 0x03118000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\MoveRests.fxt
0x03130000 - 0x03142000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\RHYTHS32.fxt
0x03160000 - 0x0316d000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\SinglePitch.fxt
0x03180000 - 0x031a6000 C:\Program Files\Finale 2003\Plug-ins\Note, Beam, and Rest Editing\Voice2ToLayer.fxt
0x031c0000 - 0x031c8000 C:\Program Files\Finale 2003\Plug-ins\Repeats\Repts32.fxt
0x032e0000 - 0x032ea000 C:\Program Files\Finale 2003\Plug-ins\AUTOBR32.FXT
0x03400000 - 0x0340c000 C:\Program Files\Finale 2003\Plug-ins\AUTODY32.FXT
0x03520000 - 0x035c2000 C:\Program Files\Finale 2003\Plug-ins\BIABAutoHarmonizing.fxt
0x036e0000 - 0x036f7000 C:\Program Files\Finale 2003\Plug-ins\CHKRNG32.FXT
0x03710000 - 0x0371f000 C:\Program Files\Finale 2003\Plug-ins\CHNGFNT.FXT
0x03830000 - 0x03839000 C:\Program Files\Finale 2003\Plug-ins\CNTITM32.FXT
0x03950000 - 0x03965000 C:\Program Files\Finale 2003\Plug-ins\CommandLine.fxt
0x03980000 - 0x03999000 C:\Program Files\Finale 2003\Plug-ins\CTNACC32.FXT
0x039b0000 - 0x039c9000 C:\Program Files\Finale 2003\Plug-ins\CUENOTES.FXT
0x039e0000 - 0x039ec000 C:\Program Files\Finale 2003\Plug-ins\FNDRANGE.FXT
0x03b00000 - 0x03b19000 C:\Program Files\Finale 2003\Plug-ins\GSTFATT.FXT
0x03b30000 - 0x03b3a000 C:\Program Files\Finale 2003\Plug-ins\HSLEDG32.FXT
0x03c50000 - 0x03c58000 C:\Program Files\Finale 2003\Plug-ins\MoveSplitPoint.fxt
0x03d70000 - 0x03da2000 C:\Program Files\Finale 2003\Plug-ins\MusicXMLLight.fxt
0x76fd0000 - 0x7704f000 C:\WINDOWS\system32\CLBCATQ.DLL
0x77050000 - 0x77115000 C:\WINDOWS\system32\COMRes.dll
0x77c00000 - 0x77c08000 C:\WINDOWS\system32\VERSION.dll
0x7d1e0000 - 0x7d492000 C:\WINDOWS\system32\msi.dll
0x769c0000 - 0x76a73000 C:\WINDOWS\system32\USERENV.dll
0x11000000 - 0x1120f000 C:\Program Files\Finale 2003\Component Files\FinaleConverterLight.dll
0x66000000 - 0x66152000 C:\WINDOWS\system32\MSVBVM60.DLL
0x75e90000 - 0x75f40000 C:\WINDOWS\system32\SXS.DLL
0x217a0000 - 0x217c3000 C:\WINDOWS\System32\comdlg32.ocx
0x046f0000 - 0x04703000 C:\Program Files\Common Files\Symantec Shared\Script Blocking\ScrBlock.dll
0x7c3a0000 - 0x7c41b000 C:\WINDOWS\system32\MSVCP71.dll
0x6af30000 - 0x6af6d000 C:\Program Files\Common Files\Symantec Shared\ccL30.dll
0x71ab0000 - 0x71ac7000 C:\WINDOWS\system32\WS2_32.dll
0x71aa0000 - 0x71aa8000 C:\WINDOWS\system32\WS2HELP.dll
0x04750000 - 0x04764000 C:\Program Files\Common Files\Symantec Shared\Script Blocking\scrauth.dll
0x735a0000 - 0x735c5000 C:\WINDOWS\System32\scrrun.dll
0x73dd0000 - 0x73ece000 C:\WINDOWS\system32\MFC42.DLL
0x047a0000 - 0x047b1000 C:\Program Files\Finale 2003\Plug-ins\NUMRPT32.FXT
0x047d0000 - 0x047e1000 C:\Program Files\Finale 2003\Plug-ins\ParallelMotion.fxt
0x04800000 - 0x04842000 C:\Program Files\Finale 2003\Plug-ins\PatBeams.fxt
0x04850000 - 0x04875000 C:\Program Files\Finale 2003\Plug-ins\PDKTools2000.fxt
0x04c80000 - 0x04c94000 C:\Program Files\Finale 2003\Plug-ins\PianoReduction.fxt
0x04cb0000 - 0x04d24000 C:\Program Files\Finale 2003\Plug-ins\RhyGen.fxt
0x04d40000 - 0x04d63000 C:\Program Files\Finale 2003\Plug-ins\SERUTI32.FXT
0x04d80000 - 0x04d8d000 C:\Program Files\Finale 2003\Plug-ins\TabTip.fxt
0x04da0000 - 0x05045000 C:\Program Files\Finale 2003\Plug-ins\TGtools.fxt
0x71b20000 - 0x71b32000 C:\WINDOWS\system32\MPR.DLL
0x05170000 - 0x0517f000 C:\Program Files\Finale 2003\Plug-ins\TMPMRK32.FXT
0x76840000 - 0x76873000 C:\WINDOWS\System32\spool\DRIVERS\W32X86\3\UNIDRVUI.DLL
0x77b40000 - 0x77b62000 C:\WINDOWS\system32\appHelp.dll
0x77a20000 - 0x77a74000 C:\WINDOWS\System32\cscui.dll
0x76600000 - 0x7661d000 C:\WINDOWS\System32\CSCDLL.dll
0x75f80000 - 0x7607c000 C:\WINDOWS\System32\browseui.dll
0x77920000 - 0x77a13000 C:\WINDOWS\system32\SETUPAPI.dll
0x76990000 - 0x769b5000 C:\WINDOWS\system32\ntshrui.dll
0x76b20000 - 0x76b31000 C:\WINDOWS\system32\ATL.DLL
0x5b860000 - 0x5b8b4000 C:\WINDOWS\system32\NETAPI32.dll
0x77760000 - 0x778cc000 C:\WINDOWS\System32\shdocvw.dll
0x754d0000 - 0x75550000 C:\WINDOWS\system32\CRYPTUI.dll
0x771b0000 - 0x77256000 C:\WINDOWS\system32\WININET.dll
0x76f60000 - 0x76f8c000 C:\WINDOWS\system32\WLDAP32.dll
0x76980000 - 0x76988000 C:\WINDOWS\system32\LINKINFO.dll
0x6d280000 - 0x6d288000 C:\Program Files\Java\jre1.5.0_01\bin\hpi.dll

VM Arguments:
jvm_args: -Xms32m -Xmx256m -XX:+ShowMessageBoxOnError -Xcheck:jni
java_command: <unknown>

Environment Variables:
CLASSPATH=c:\zelix\zkm.jar;.
PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Common Files\Sonic Shared;C:\Program Files\Common Files\Roxio Shared\DLLShared;C:program files\java\jdk1.5.0_01\bin\client\;C:\Program Files\Java\jre1.5.0_01\bin\client\;C:\program files\java\jdk1.5.0_01\jre\bin\client;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
USERNAME=Michael
OS=Windows_NT
PROCESSOR_IDENTIFIER=x86 Family 15 Model 2 Stepping 9, GenuineIntel


--------------- S Y S T E M ---------------

OS: Windows XP Build 2600 Service Pack 2

CPU:total 2 family 15, cmov, cx8, fxsr, mmx, sse, sse2, ht

Memory: 4k page, physical 2096124k(1450028k free), swap 4037988k(3578360k free)

vm_info: Java HotSpot(TM) Client VM (1.5.0_01-b08) for windows-x86, built on Dec 6 2004 19:51:00 by "java_re" with MS VC++ 6.0
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 30 2008
Added on Mar 10 2005
2 comments
467 views