Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
39 Views

Inspector crashes when starting analysis with VS2012 debugger

I am working with Inspector XE2015 integrated with Visual Studio 2012.

Inspector has helped me to find uninitialized variable. I want to use debugger in the moment when this error occurs. However when I start Inspector in one of modes "Enable debugger when problem detected" or "Select analysis start location with debugger" all crashes: first the debugged program, then the inspector, and at last the Visual Studio.

What conditions did not I follow to have a success with this matter?

0 Kudos
42 Replies
Highlighted
Black Belt
39 Views

Can you successfully break in with  VS debugger? I mean simply put and enable a breakpoint on LOC which uses uninitialized variable(s) can you do it successfully from within Visual Studio only?

0 Kudos
Highlighted
Beginner
39 Views

I can debug this application without Inspector in full extent, setting breakpoint every where.

0 Kudos
Highlighted
Black Belt
39 Views

Do you have any error/exception description when everything crashes?

0 Kudos
Highlighted
Beginner
39 Views

I was wrong telling that crash appears when "Enable debugger when problem detected" too. In this mode it works, but it is useless in my case, because a tons of errors about "invalid partial memory access" are reported during the start, when Tcl/TK interpretor is initialized. These errors are not interesting for me but each breaks execution.

So, I want to work with the third option - "Select analysis start location with debugger". But with this option it crashes. The following sequence shows how it appears.

1. The first crash window is presented on the attached Capture1.png.

2. When I close it the Visual studio is frozen. But the console window of my app is available. When I close it the error appears as Capture2.png shows.

3. After I close it the next error appears as shown on Capture3.png.

4. Then, after I close it, Capture4.png appears.

Sometimes the sequence of errors changes, and instead of Capture2.png and Capture3.png I see the error Capture5.png with suggestion to send the report to Intel. One time I sent such report.

Best regards

0 Kudos
Highlighted
Black Belt
39 Views

It seems that this is very hard problem not even to solve, but to understand. I have found exception code description from Capture2.png , here is the link: http://support.microsoft.com/kb/185294

Can you run DRAW.EXE program under Windows debugger (windbg)? It is vital to get your app out of VS environment and run it under windows debugger. I suppose that some kind of error/exception is thrown from within DRAW.EXE program and this error caused exception 0xE06D7363 which could in turn crash VS debugger.

 

0 Kudos
Highlighted
Black Belt
39 Views

I had forgotten to add. Before running under windbg your program enable break on any exception in debugger GUI and post the results.

0 Kudos
Highlighted
Black Belt
39 Views

Any updates on your problem?

0 Kudos
Highlighted
Beginner
39 Views

I am new to windbg. I have installed it and run DRAWEXE under it. The following is the output window content. No exceptions except for "Break instruction exception with code 003" have raised. Please, give me any hints what should I do with windbg further.


Microsoft (R) Windows Debugger Version 6.12.0002.633 X86
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: DRAWEXE.exe
The call to LoadLibrary(ext) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(wow64exts) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
Symbol search path is: SRV*C:\Symbols*http://msdl.microsoft.com/download/symbols;D:\git\occt1\win32\vc11\bind
Executable search path is:
ModLoad: 01390000 0139c000   DRAWEXE.exe
ModLoad: 773c0000 77540000   ntdll.dll
ModLoad: 76a20000 76b30000   C:\Windows\syswow64\kernel32.dll
ModLoad: 76f50000 76f97000   C:\Windows\syswow64\KERNELBASE.dll
ModLoad: 74b80000 74bee000   C:\Windows\SysWOW64\SYSFER.DLL
ModLoad: 68f20000 6901c000   D:\git\occt1\win32\vc11\bind\TKDraw.dll
ModLoad: 62ab0000 62dce000   D:\git\occt1\win32\vc11\bind\TKernel.dll
ModLoad: 76930000 769d0000   C:\Windows\syswow64\ADVAPI32.dll
ModLoad: 76b30000 76bdc000   C:\Windows\syswow64\msvcrt.dll
ModLoad: 75150000 75169000   C:\Windows\SysWOW64\sechost.dll
ModLoad: 767a0000 76890000   C:\Windows\syswow64\RPCRT4.dll
ModLoad: 74d50000 74db0000   C:\Windows\syswow64\SspiCli.dll
ModLoad: 74d40000 74d4c000   C:\Windows\syswow64\CRYPTBASE.dll
ModLoad: 76db0000 76eb0000   C:\Windows\syswow64\USER32.dll
ModLoad: 75180000 75210000   C:\Windows\syswow64\GDI32.dll
ModLoad: 76be0000 76bea000   C:\Windows\syswow64\LPK.dll
ModLoad: 76eb0000 76f4d000   C:\Windows\syswow64\USP10.dll
ModLoad: 769e0000 76a15000   C:\Windows\syswow64\WS2_32.dll
ModLoad: 769d0000 769d6000   C:\Windows\syswow64\NSI.dll
ModLoad: 74b10000 74b61000   C:\Windows\SysWOW64\WINSPOOL.DRV
ModLoad: 6c450000 6c51b000   C:\Windows\SysWOW64\MSVCP110D.dll
ModLoad: 59460000 59601000   C:\Windows\SysWOW64\MSVCR110D.dll
ModLoad: 6f8b0000 6f8df000   G:\occt-3rdparty\occt670products\tbb42_20140416oss\bin\ia32\vc11\tbbmalloc_debug.dll
ModLoad: 69450000 694fa000   D:\git\occt1\win32\vc11\bind\TKG2d.dll
ModLoad: 50890000 50bf4000   D:\git\occt1\win32\vc11\bind\TKMath.dll
ModLoad: 6a390000 6a3e8000   G:\occt-3rdparty\occt670products\tbb42_20140416oss\bin\ia32\vc11\tbb_debug.dll
ModLoad: 502e0000 50886000   D:\git\occt1\win32\vc11\bind\TKGeomBase.dll
ModLoad: 66b10000 66c9a000   D:\git\occt1\win32\vc11\bind\TKG3d.dll
ModLoad: 57540000 576bd000   D:\git\occt1\win32\vc11\bind\TKBRep.dll
ModLoad: 779a0000 77ffe000   D:\git\occt1\win32\vc11\bind\TKGeomAlgo.dll
ModLoad: 77640000 77997000   D:\git\occt1\win32\vc11\bind\TKTopAlgo.dll
ModLoad: 68cf0000 68d85000   D:\git\occt1\win32\vc11\bind\TKMesh.dll
ModLoad: 66a80000 66b01000   D:\git\occt1\win32\vc11\bind\TKService.dll
ModLoad: 0f7e0000 0fb0c000   D:\git\occt1\win32\vc11\bind\TKShHealing.dll
ModLoad: 10000000 1039e000   G:\occt-3rdparty\occt670products\freeimage-3.16.0-vc11-32\bin\FreeImage.dll
ModLoad: 681c0000 68240000   G:\occt-3rdparty\occt670products\freetype-2.5.3-vc11-32\bin\freetype.dll
ModLoad: 633c0000 63556000   D:\git\occt1\win32\vc11\bind\TKHLR.dll
ModLoad: 005b0000 006c3000   G:\occt-3rdparty\occt670products\tcltk-86-32\bin\tcl86.dll
ModLoad: 705a0000 705b1000   C:\Windows\SysWOW64\NETAPI32.dll
ModLoad: 70620000 70629000   C:\Windows\SysWOW64\netutils.dll
ModLoad: 700b0000 700c9000   C:\Windows\SysWOW64\srvcli.dll
ModLoad: 700a0000 700af000   C:\Windows\SysWOW64\wkscli.dll
ModLoad: 6d510000 6d532000   C:\Windows\SysWOW64\LOGONCLI.DLL
ModLoad: 710e0000 710ef000   C:\Windows\SysWOW64\SAMCLI.DLL
ModLoad: 62e80000 62ea2000   G:\occt-3rdparty\occt670products\tcltk-86-32\bin\zlib1.dll
ModLoad: 006d0000 0082c000   G:\occt-3rdparty\occt670products\tcltk-86-32\bin\tk86.dll
ModLoad: 75240000 752bb000   C:\Windows\syswow64\comdlg32.dll
ModLoad: 754d0000 75527000   C:\Windows\syswow64\SHLWAPI.dll
ModLoad: 6dfe0000 6e064000   C:\Windows\WinSxS\x86_microsoft.windows.common-controls_6595b64144ccf1df_5.82.7601.18201_none_ec80f00e8593ece5\COMCTL32.dll
ModLoad: 75b00000 7674a000   C:\Windows\syswow64\SHELL32.dll
ModLoad: 752d0000 75330000   C:\Windows\syswow64\IMM32.dll
ModLoad: 75340000 7540c000   C:\Windows\syswow64\MSCTF.dll
ModLoad: 75530000 7568c000   C:\Windows\syswow64\ole32.dll
ModLoad: 76bf0000 76c7f000   C:\Windows\syswow64\OLEAUT32.dll
(1994.104): Break instruction exception - code 80000003 (first chance)
eax=00000000 ebx=00000000 ecx=38f60000 edx=0020ded8 esi=fffffffe edi=00000000
eip=7746103b esp=003ff69c ebp=003ff6c8 iopl=0         nv up ei pl zr na pe nc
cs=0023  ss=002b  ds=002b  es=002b  fs=0053  gs=002b             efl=00000246
ntdll!LdrpDoDebuggerBreak+0x2c:
7746103b cc              int     3
0:000> g
ModLoad: 6f3b0000 6f430000   C:\Windows\SysWOW64\uxtheme.dll
ModLoad: 002f0000 002f6000   G:\occt-3rdparty\occt670products\tcltk-86-32\lib\tcl8.6\reg1.3\tclreg13.dll
ModLoad: 02cb0000 02e0c000   C:\Windows\SysWOW64\ole32.dll
ModLoad: 0f030000 0f34f000   D:\git\occt1\win32\vc11\bind\TKQADraw.dll
ModLoad: 66ce0000 66d28000   D:\git\occt1\win32\vc11\bind\TKNIS.dll
ModLoad: 03820000 03c92000   D:\git\occt1\win32\vc11\bind\TKV3d.dll
ModLoad: 65eb0000 65f78000   C:\Windows\SysWOW64\OPENGL32.dll
ModLoad: 6de80000 6dea2000   C:\Windows\SysWOW64\GLU32.dll
ModLoad: 6def0000 6dfd7000   C:\Windows\SysWOW64\DDRAW.dll
ModLoad: 701d0000 701d6000   C:\Windows\SysWOW64\DCIMAN32.dll
ModLoad: 756d0000 7586d000   C:\Windows\syswow64\SETUPAPI.dll
ModLoad: 76890000 768b7000   C:\Windows\syswow64\CFGMGR32.dll
ModLoad: 76fa0000 76fb2000   C:\Windows\syswow64\DEVOBJ.dll
ModLoad: 6f390000 6f3a3000   C:\Windows\SysWOW64\dwmapi.dll
ModLoad: 65e40000 65eb0000   D:\git\occt1\win32\vc11\bind\PTKernel.dll
ModLoad: 56d30000 56e79000   D:\git\occt1\win32\vc11\bind\TKViewerTest.dll
ModLoad: 03ca0000 03fee000   D:\git\occt1\win32\vc11\bind\TKFillet.dll
ModLoad: 03ff0000 0449c000   D:\git\occt1\win32\vc11\bind\TKBool.dll
ModLoad: 56cb0000 56d23000   D:\git\occt1\win32\vc11\bind\TKPrim.dll
ModLoad: 500d0000 502de000   D:\git\occt1\win32\vc11\bind\TKBO.dll
ModLoad: 0f3f0000 0f55b000   D:\git\occt1\win32\vc11\bind\TKOffset.dll
ModLoad: 6a1c0000 6a1fa000   D:\git\occt1\win32\vc11\bind\TKVoxel.dll
ModLoad: 02cb0000 02e06000   D:\git\occt1\win32\vc11\bind\TKOpenGl.dll
ModLoad: 01030000 0104c000   G:\occt-3rdparty\occt670products\freeimage-3.16.0-vc11-32\bin\FreeImagePlus.dll
ModLoad: 6e240000 6e255000   G:\occt-3rdparty\occt670products\gl2ps-1.3.8-vc11-32\bin\gl2ps.dll
ModLoad: 66960000 66a36000   C:\Windows\SysWOW64\MSVCR110.dll
ModLoad: 56c10000 56ca5000   D:\git\occt1\win32\vc11\bind\TKCDF.dll
ModLoad: 0fb30000 0fc84000   D:\git\occt1\win32\vc11\bind\TKDCAF.dll
ModLoad: 56870000 569b9000   D:\git\occt1\win32\vc11\bind\TKLCAF.dll
ModLoad: 77540000 77634000   D:\git\occt1\win32\vc11\bind\TKCAF.dll
ModLoad: 044a0000 045cd000   D:\git\occt1\win32\vc11\bind\TKFeat.dll
ModLoad: 045d0000 04b69000   D:\git\occt1\win32\vc11\bind\TKIGES.dll
ModLoad: 04b70000 04f2b000   D:\git\occt1\win32\vc11\bind\TKXSBase.dll
ModLoad: 50040000 500c1000   D:\git\occt1\win32\vc11\bind\TKXCAF.dll
ModLoad: 03040000 030d9000   D:\git\occt1\win32\vc11\bind\TKXDESTEP.dll
ModLoad: 04f30000 05053000   D:\git\occt1\win32\vc11\bind\TKSTEPAttr.dll
ModLoad: 05060000 054a3000   D:\git\occt1\win32\vc11\bind\TKSTEPBase.dll
ModLoad: 054b0000 05897000   D:\git\occt1\win32\vc11\bind\TKSTEP.dll
ModLoad: 0fd70000 0feb9000   D:\git\occt1\win32\vc11\bind\TKSTEP209.dll
ModLoad: 71620000 71627000   C:\Windows\SysWOW64\WSOCK32.dll
ModLoad: 63800000 63864000   D:\git\occt1\win32\vc11\bind\TKXSDRAW.dll
ModLoad: 0f650000 0f6f0000   D:\git\occt1\win32\vc11\bind\TKMeshVS.dll
ModLoad: 66a40000 66a73000   D:\git\occt1\win32\vc11\bind\TKSTL.dll
ModLoad: 0f580000 0f649000   D:\git\occt1\win32\vc11\bind\TKVRML.dll
ModLoad: 058a0000 05a50000   D:\git\occt1\win32\vc11\bind\TKShapeSchema.dll
ModLoad: 05a50000 05bf5000   D:\git\occt1\win32\vc11\bind\TKPShape.dll
ModLoad: 05c00000 05ea9000   D:\git\occt1\win32\vc11\bind\TKTopTest.dll

 

0 Kudos
Highlighted
Black Belt
39 Views

>>>Break instruction exception - code 80000003 (first chance)>>>

This exception is raised probably when debugger's remote thread is injected into DRAW.EXE address space.

run following command .lastevent  and this one !analyze -v

0 Kudos
Highlighted
Beginner
39 Views

Yes, I think this break instruction is issued by default by the debugger. There were no other exceptions raised/caught during the simple debug session. The simple session includes initialization of Tcl/Tk interpretor, executing the initial Tcl script that loads all necessary plug-in DLLs, and exiting.

I have performed for that the following steps:

1) Create the batch file that sets all needed environment variables for running DRAWEXE. The last line of the batch is executing windbg with DRAWEXE as the parameter:

start "" "C:\Program Files (x86)\Debugging Tools for Windows (x86)\windbg.exe" DRAWEXE.exe

2) Run the batch.

=> The execution is broken by break instruction

3) Issue the command "g" in debugger.

=> the program is running till all initial Tcl script commands are completed. The console of the program gives Tcl command prompt:

Draw[1]>

4) Enter Ctrl-Break in debugger window.

=> Break instruction exception is caught.

5) Enter the commands .lastevent  and !analyze -v in debugger prompt.

0:009> .lastevent
Last event: 1b20.f40: Break instruction exception - code 80000003 (first chance)
  debugger time: Wed Feb 25 15:56:01.738 2015 (UTC + 3:00)

0:009>  !analyze -v
The call to LoadLibrary(ext) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(wow64exts) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(exts) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(uext) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
The call to LoadLibrary(ntsdexts) failed, Win32 error 0n2
    "The system cannot find the file specified."
Please check your debugger configuration and/or network access.
No export analyze found

As you can see no error was encountered. As opposed, when I run Inspector analysis with debugger Visual Studio, the program crashes before it gives the Tcl command prompt.

0 Kudos
Highlighted
Black Belt
39 Views

Hi I will respond today later.

0 Kudos
Highlighted
Black Belt
39 Views

Looks very strange.I was thinking about the putting a breakpoint on WinMain and stepping into the code, but it seems like a overkill. Another option can be running Visual Studio under windbg when you have breaking on all exceptions enabled. Maybe this will shed some light on that very strange issue.

0 Kudos
Highlighted
Beginner
39 Views

I have made some localization of the error. This occur during load of some DLL before main function is invoked.

I have created a small console app with the only almost empty main function that calls some function from my libraries. Depending on what function I call the error appears or not. I am going to deep into analysis to localize the error down to a sentence of C++ language (I suspect initialization of some static variable is wrong when run under Inspector+VS debugger).

Hmm, it is a cool idea to call visual studio under windbg. But I am afraid I won't be able to understand what is going wrong if the real error occurs in some part of Inspector or VS with having only assembly code.

But if I will be able to localize a problem, I shall prepare a simple program that you can inspect on your side.

0 Kudos
Highlighted
Black Belt
39 Views

Thanks for posting an update.

Can you describe what is the error? When dealing with DLL errors some of them can be related to mapping/unmapping DLL functions. It could be related also as you hinted to variable initialization. I am not sure if running everything under windbg will be really helpful, but you can try to do it. Maybe windbg will be able to catch the error/exception.

You can also upload your test case and I will run it on my two machines where I have VS 2013 and windbg both installed.

0 Kudos
Highlighted
Beginner
39 Views

Eventually I have found the low-level cause. It is demonstrated by the attached snapshots.

In short, when visual compiler settings are set to /arch:SSE2 on x86 platform, a double floating point parameter is passed incorrectly into a function (0 is passed instead of the actual number). The error is reproduced with Inspector settings given on the attached snapshot.

0 Kudos
Highlighted
Beginner
39 Views

Addition: it caused app crash, because in my case this error occurred during initialization of a static object that used this wrong 0 value as the upper bound of the dynamic array. The object throws exception in this case and nobody catches it, because main is not yet invoked.

0 Kudos
Highlighted
Black Belt
39 Views

It seems that this is a compiler error/bug. Does it persist with Intel Compiler also?

0 Kudos
Highlighted
Beginner
39 Views

I did not check it yet with Intel compiler. But I wonder how it can be compiler bug? The object code is generated the same in both runs.

Here below I put the disassembly of the code during debugging. The first fragment is when I just run debugger without Inspector. The values of memory cells (constant 0BD5858 and from register esp) are evaluated when instruction pointer is on the command "00BD13FE call _sqrt (0BD114Fh) ". We can see that the pair of commands movsd correctly put the value 10.5 from the constant on the stack.

  double c = sqrt(10.5);
00BD13EE  sub         esp,8  
00BD13F1  movsd       xmm0,mmword ptr ds:[0BD5858h]  
00BD13F9  movsd       mmword ptr [esp],xmm0  
00BD13FE  call        _sqrt (0BD114Fh)  
00BD1403  add         esp,8  
00BD1406  fstp        qword ptr  

        *(double*)0x0BD5858    10.500000000000000    double
        *(double*)esp    10.500000000000000    double

The second fragment is when I run Inspector with debugger enabled.Now the evaluation shows that the commands movsd put on the stack incorrect value 0.

  double c = sqrt(10.5);
013513EE  sub         esp,8  
013513F1  movsd       xmm0,mmword ptr ds:[1355858h]  
013513F9  movsd       mmword ptr [esp],xmm0  
013513FE  call        _sqrt (0135114Fh)  
01351403  add         esp,8  
01351406  fstp        qword ptr  

        *(double*)0x1355858    10.500000000000000    double
        *(double*)esp    0.00000000000000000    double

Where can here be a space for compiler error?

0 Kudos
Highlighted
Beginner
39 Views

I have checked the same scenario with Intel C++ 15.0. The error is reproduced as well. The below is disassembly code and evaluations as in the above post.

  double c = sqrt(10.5);
0029102D  movsd       xmm0,mmword ptr ds:[296858h]  
00291035  movsd       mmword ptr [esp],xmm0  
0029103A  call        _sqrt (02920B0h)  
0029103F  fstp        qword ptr [ebp-10h]  
00291042  add         esp,8  
00291045  movsd       xmm0,mmword ptr [ebp-10h]  
0029104A  movsd       mmword ptr ,xmm0  

        *(double*)0x296858    10.500000000000000    double
        *(double*)esp    0.00000000000000000    double

 

0 Kudos