How to run java.exe in Visual Studio
Pete Brunet
pete at a11ysoft.com
Thu Jun 17 14:43:19 UTC 2010
Thanks Andrei, That was one of the various configurations I tried.
java.exe runs for a while and then crashes. I see the splash screen for
a while but never the main app. Below is some info at the time of the
crash. Is there a way to generate a console log when running outside of
VS. It might be useful to compare against this failing log.
C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\java.exe -jar
"C:\Program Files\Java\jdk1.6.0_20\demo\jfc\SwingSet2\SwingSet2.jar"
*Console output*
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\java.exe',
Symbols loaded.
'java.exe': Loaded 'C:\WINDOWS\system32\ntdll.dll', Cannot find or open
the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\kernel32.dll', Cannot find or
open the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\advapi32.dll', Cannot find or
open the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\rpcrt4.dll', Cannot find or open
the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\secur32.dll', Cannot find or
open the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\user32.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\gdi32.dll', Cannot find or open
the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\comctl32.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\shimeng.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\imm32.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\gwmhook.dll', Binary was not
built with debug information.
'java.exe': Loaded 'C:\WINDOWS\system32\psapi.dll', Symbols loaded
(source information stripped).
'java.exe': Unloaded 'C:\WINDOWS\system32\shimeng.dll'
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\msvcr100.dll',
Symbols loaded.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\client\jvm.dll',
Symbols loaded.
'java.exe': Loaded 'C:\WINDOWS\system32\winmm.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\splashscreen.dll',
Symbols loaded.
'java.exe': Loaded 'C:\WINDOWS\system32\uxtheme.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\msvcrt.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\MSCTF.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\Program Files\Norton
360\Engine\4.2.0.12\asoehook.dll', Cannot find or open the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\ole32.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\oleaut32.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded
'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4974_x-ww_d889290f\msvcr90.dll',
Cannot find or open the PDB file
'java.exe': Loaded
'C:\WINDOWS\WinSxS\x86_Microsoft.VC90.CRT_1fc8b3b9a1e18e3b_9.0.30729.4974_x-ww_d889290f\msvcp90.dll',
Cannot find or open the PDB file
'java.exe': Loaded 'C:\Program
Files\ScanSoft\OmniPageSE2.0\OpHookSE2.dll', Binary was not built with
debug information.
'java.exe': Loaded 'C:\WINDOWS\system32\version.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\MSCTFIME.IME', Symbols loaded
(source information stripped).
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\verify.dll',
Symbols loaded.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\java.dll',
Symbols loaded.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\hpi.dll', Symbols
loaded.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\zip.dll', Symbols
loaded.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\awt.dll', Symbols
loaded.
'java.exe': Loaded 'C:\WINDOWS\system32\shell32.dll', Cannot find or
open the PDB file
'java.exe': Loaded 'C:\WINDOWS\system32\shlwapi.dll', Cannot find or
open the PDB file
'java.exe': Loaded
'C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll',
Symbols loaded (source information stripped).
The thread 'Win32 Thread' (0x1750) has exited with code 0 (0x0).
'java.exe': Loaded 'C:\WINDOWS\system32\d3d9.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\d3d8thk.dll', Symbols loaded
(source information stripped).
'java.exe': Unloaded 'C:\WINDOWS\system32\d3d9.dll'
'java.exe': Unloaded 'C:\WINDOWS\system32\d3d8thk.dll'
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0380.
The thread 'Win32 Thread' (0xa44) has exited with code 0 (0x0).
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0600.
First-chance exception at 0x080123a7 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0380.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0300.
The thread 'Win32 Thread' (0xe4) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1e04) has exited with code 0 (0x0).
The thread '_threadstartex' (0xaa0) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x19d0) has exited with code 0 (0x0).
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
The thread 'Win32 Thread' (0x53c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x1b20) has exited with code 0 (0x0).
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0a80.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0600.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\freetype.dll',
Binary was not built with debug information.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\fontmanager.dll',
Symbols loaded.
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\net.dll', Symbols
loaded.
'java.exe': Loaded 'C:\WINDOWS\system32\ws2_32.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\ws2help.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded
'C:\OpenJDK-b96m\jdk7\build\windows-i586-fastdebug\bin\nio.dll', Symbols
loaded.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0380.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0380.
First-chance exception at 0x080123a7 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0380.
First-chance exception at 0x080123a7 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0380.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0a80.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0380.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0a80.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0a80.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0a80.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0900.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0a80.
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0600.
First-chance exception at 0x080123a7 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0900.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x012fbb87 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x013100db in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
First-chance exception at 0x080123a7 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0900.
First-chance exception at 0x012f7678 in java.exe: 0xC0000005: Access
violation reading location 0x010c0100.
'java.exe': Loaded 'C:\WINDOWS\system32\clbcatq.dll', Symbols loaded
(source information stripped).
'java.exe': Loaded 'C:\WINDOWS\system32\comres.dll', Symbols loaded
(source information stripped).
First-chance exception at 0x08001055 (jvm.dll) in java.exe: 0xC0000005:
Access violation writing location 0x011a0600.
The thread 'Win32 Thread' (0x1a7c) has exited with code 0 (0x0).
HEAP[java.exe]: Invalid Address specified to RtlFreeHeap( 00890000,
03CF8970 )
Windows has triggered a breakpoint in java.exe.
This may be due to a corruption of the heap, which indicates a bug in
java.exe or any of the DLLs it has loaded.
This may also be due to the user pressing F12 while java.exe has focus.
The output window may have more diagnostic information.
*Stack trace - failing thread*
> ntdll.dll!7c90120e()
[Frames below may be incorrect and/or missing, no symbols loaded
for ntdll.dll]
ntdll.dll!7c96e139()
ntdll.dll!7c96e576()
ntdll.dll!7c96f75e()
ntdll.dll!7c94bc4c()
ntdll.dll!7c927573()
MSCTF.dll!SysGetMsgProc() + 0x88 bytes
comctl32.dll!_MasterSubclassProc at 16() + 0x41 bytes
user32.dll!_InternalCallWinProc at 20() + 0x28 bytes
user32.dll!_UserCallWinProcCheckWow at 32() + 0xb7 bytes
user32.dll!_DispatchClientMessage at 20() + 0x4d bytes
user32.dll!___fnDWORD at 4() + 0x24 bytes
ntdll.dll!7c90e473()
user32.dll!_NtUserDispatchMessage at 4() + 0xc bytes
e87e428e()
*Stack trace - main thread*
ntdll.dll!7c90e514()
[Frames below may be incorrect and/or missing, no symbols loaded
for ntdll.dll]
ntdll.dll!7c90df5a()
kernel32.dll!7c8025db()
kernel32.dll!7c802542()
> java.exe!ContinueInNewThread0(int (void *)*
continuation=0x00401350, __int64 stack_size=0, void * args=0x0008fc58)
Line 1086 C
java.exe!ContinueInNewThread(InvocationFunctions * ifn=0x0008ff14,
int argc=0, char * * argv=0x00884784, char * jarfile=0x0088359f, char *
classname=0x00000000, int ret=0) Line 1896 + 0x1c bytes C
java.exe!JLI_Launch(int argc=0, char * * argv=0x00884784, int
jargc=1, const char * * jargv=0x00000000, int appclassc=1, const char *
* appclassv=0x00000000, const char * fullversion=0x0042401c, const char
* dotversion=0x00424018, const char * pname=0x00424000, const char *
lname=0x0042400c, unsigned char javaargs=0, unsigned char
cpwildcard='', unsigned char javaw=0, long ergo=0) Line 301 + 0x1d
bytes C
java.exe!main(int argc=3, char * * argv=0x00883660) Line 114 +
0x8c bytes C
java.exe!__tmainCRTStartup() Line 278 + 0x12 bytes C
kernel32.dll!7c817077()
java.exe!isdigit(int c=) Line 145 + 0xa bytes C++
*List of threads*
Unflagged 7660 0 Worker Thread _threadstartex
os::PlatformEvent::park Highest
Unflagged 4604 0 Main Thread Main Thread
ContinueInNewThread0 Normal
Unflagged 8096 0 Worker Thread Win32 Thread
7c90e514 Normal
Unflagged 6652 0 Worker Thread Win32 Thread
7c90e514 Normal
Unflagged 6532 0 Worker Thread _threadstartex
oopDesc::is_oop Normal
Unflagged 7484 0 Worker Thread _threadstartex
os::PlatformEvent::park Highest
Unflagged 6540 0 Worker Thread _threadstartex
os::PlatformEvent::park Highest
Unflagged 7672 0 Worker Thread _threadstartex
os::PlatformEvent::park Above Normal
Unflagged 7120 0 Worker Thread _threadstartex
check_pending_signals Highest
Unflagged 2692 0 Worker Thread _threadstartex
Win32AttachListener::dequeue Highest
Unflagged 6204 0 Worker Thread _threadstartex
os::PlatformEvent::park Highest
Unflagged 2428 0 Worker Thread _threadstartex
os::PlatformEvent::park Normal
Unflagged 8164 0 Worker Thread _threadstartex
os::sleep Highest
Unflagged > 6028 0 Worker Thread _threadstartex
7c90120e Normal
Unflagged 5188 0 Worker Thread _threadstartex
Parker::park Normal
Unflagged 7812 0 Worker Thread _threadstartex
os::PlatformEvent::park Above Normal
Unflagged 5772 0 Worker Thread _threadstartex
os::PlatformEvent::park Normal
Unflagged 4872 0 Worker Thread _threadstartex
7c90e514 Normal
Unflagged 6628 0 Worker Thread _threadstartex
_tsopen_nolock Normal
Pete
===
Andrei V. Dmitriev wrote:
> Hi Pete,
>
> don't remember for sure and don't have VS offhand to experiment but
> basically I've made a new project and in the debug properties window
> (that might be common for most VS versions, mine is VS2003) entered
> the full-path to java.exe and also supplied it with arguments (next
> textfield). And yes, you need debug or fastdebug jdk bits to get
> native stack trace.
> I've never tried to get the Java stack in VS.
>
> Hope it helps,
> Andrei
>
>
> Pete Brunet wrote:
>> In case it's useful info, so far I tried the second option "To import an
>> executable into a Visual Studio solution" here:
>> http://msdn.microsoft.com/en-us/library/0bxe8ytt.aspx
>> but it crashes.
>>
>> Pete
>> ===
>> Lussier, Denis wrote:
>>
>>> I am very interested in this and NO I haven't figured it out yet. I
>>> presently build a publically available OpenJDK 6 Win32 installer. I'd
>>> love to be able to do a little basic debugging/investigation of a few
>>> issues I see when running Eclipse.
>>>
>>> --Denis Lussier
>>> http://openscg.org
>>>
>>> On 6/16/10, Pete Brunet <pete at a11ysoft.com> wrote:
>>>
>>>> I'd like to use the Visual Studio debugger (VS 2010 Pro in my case) to
>>>> set breakpoints and step through the OpenJDK source. Has anyone
>>>> documented how to set up an OpenJDK Visual Studio project? I'd
>>>> like VS
>>>> to be aware of all the OpenJDK source and the built PDBs. Also,
>>>> through
>>>> the VS GUI I can attach VS to the running java process, but it
>>>> might be
>>>> better to activate java.exe from VS. Please let me know if you've
>>>> already determined how to do any of this.
>>>>
>>>> Thank you, Pete
>>>> --
>>>> *Pete Brunet*
>>>>
>>>> a11ysoft - Accessibility Architecture and Development
>>>> (512) 238-6967 (work), (512) 689-4155 (cell)
>>>> Skype: pete.brunet
>>>> IM: ptbrunet (AOL, Google), ptbrunet at live.com (MSN)
>>>> http://www.a11ysoft.com/about/
>>>> Ionosphere: WS4G
>>>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.org/pipermail/build-dev/attachments/20100617/d82e0da9/attachment.htm>
More information about the build-dev
mailing list