Debugging issue


A

Alex

Hello,

I'm working on a new version of our product's company. I have a problem
where the new version, once installed, will simply not start. Apparently,
none of the .NET code is being executed either, because the first thing the
software does is open a log to document the startup process and that log is
never created. The application is Visual Basic .NET and it uses several COM
objects we designed. The same installer, when used on one of the dev
machines, produces a functionnal software.

I don't know much about .NET debugging, espicially when it occurs before my
code is even involved. I'm guessing is some missing dependency (although a
check with depends reveals nothing obvious).

If anyone could point me to tools or techniques to get more info on what's
going on it would be appreciated. Bugs like this, for us anyway, are usualy
caused by a missing or corrupted .NET framework install but I have
uninstalled and reinstalled and it doens't seem to help anything at all.

Here's what I get when I put the software in NTSD:

Microsoft (R) Windows User-Mode Debugger Version 5.1.2600.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: MySoftware.exe
Loaded dbghelp extension DLL
The call to LoadLibrary(ext) failed with error 2.
Please check your debugger configuration and/or network access
Loaded exts extension DLL
The call to LoadLibrary(uext) failed with error 2.
Please check your debugger configuration and/or network access
Loaded ntsdexts extension DLL
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH setting
Executable search path is:
ModLoad: 00400000 006bc000 image00400000
ModLoad: 7c900000 7c9af000 ntdll.dll
ModLoad: 79000000 79045000 C:\WINDOWS\system32\mscoree.dll
ModLoad: 7c800000 7c8f6000 C:\WINDOWS\system32\KERNEL32.dll
Break instruction exception - code 80000003 (first chance)
eax=00261eb4 ebx=7ffda000 ecx=00000000 edx=00000001 esi=00261f48
edi=00261eb4
eip=7c90120e esp=0013fb20 ebp=0013fc94 iopl=0 nv up ei pl nz na pe
nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000
efl=00000202
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
ntdl
l.dll -
ntdll!DbgBreakPoint:
7c90120e cc int 3
0:000>

Any help would be appreciated.

Thanks,

Alex.
 
Ad

Advertisements

J

Jeroen Mostert

Alex said:
I'm working on a new version of our product's company. I have a problem
where the new version, once installed, will simply not start. Apparently,
none of the .NET code is being executed either, because the first thing the
software does is open a log to document the startup process and that log is
never created. The application is Visual Basic .NET and it uses several COM
objects we designed. The same installer, when used on one of the dev
machines, produces a functionnal software.

I don't know much about .NET debugging, espicially when it occurs before my
code is even involved. I'm guessing is some missing dependency (although a
check with depends reveals nothing obvious).

If anyone could point me to tools or techniques to get more info on what's
going on it would be appreciated. Bugs like this, for us anyway, are usualy
caused by a missing or corrupted .NET framework install but I have
uninstalled and reinstalled and it doens't seem to help anything at all.

Here's what I get when I put the software in NTSD:

Microsoft (R) Windows User-Mode Debugger Version 5.1.2600.0
Copyright (c) Microsoft Corporation. All rights reserved.

CommandLine: MySoftware.exe
Loaded dbghelp extension DLL
The call to LoadLibrary(ext) failed with error 2.
Please check your debugger configuration and/or network access
Loaded exts extension DLL
The call to LoadLibrary(uext) failed with error 2.
Please check your debugger configuration and/or network access
Loaded ntsdexts extension DLL
Symbol search path is: *** Invalid *** : Verify _NT_SYMBOL_PATH setting
Executable search path is:
ModLoad: 00400000 006bc000 image00400000
ModLoad: 7c900000 7c9af000 ntdll.dll
ModLoad: 79000000 79045000 C:\WINDOWS\system32\mscoree.dll
ModLoad: 7c800000 7c8f6000 C:\WINDOWS\system32\KERNEL32.dll
Break instruction exception - code 80000003 (first chance)
eax=00261eb4 ebx=7ffda000 ecx=00000000 edx=00000001 esi=00261f48
edi=00261eb4
eip=7c90120e esp=0013fb20 ebp=0013fc94 iopl=0 nv up ei pl nz na pe
nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000
efl=00000202
*** ERROR: Symbol file could not be found. Defaulted to export symbols for
ntdl
l.dll -
ntdll!DbgBreakPoint:
7c90120e cc int 3
0:000>
You forgot to set a symbol path (without that, you're not going to be making
sense of any error traceback) but more importantly, you forgot to enter "g"
to start running in the first place. What you've shown here is just the
initial breakpoint of the application, which always happens....

Instead of breaking out the debugger, try something simpler first. Install
procmon (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) and
see if any obvious API calls fail. If that doesn't help, instead of using
NTSD, consider installing the Debugging Tools for Windows
(http://www.microsoft.com/whdc/devtools/debugging/default.mspx) which
contain more recent versions of the debuggers and, not unimportant,
documentation.
 
A

Alex

You forgot to set a symbol path (without that, you're not going to be
making
Instead of breaking out the debugger, try something simpler first. Install
procmon (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx)
and


Thanks for your input Jereon,

I worked all day on this issue and still can't get a clue... I set the
symbol path and well, other than removing the warnings it didn't do
anything. As I said, it really looks like it's all happening before the
first line of code I actually wrote myself is executed... Looks like it's an
issue with a dependency, or .NET, or whatever.

I ran my process using procmon and I didn't get any new clues... I can see
where it's crashing, but none of the previous operations, success or not,
seem to give any indication of what's going on.

Here's the WINDBG output, after inputing 'g'. I'm hoping at least one of you
guys can see what I'm not seeing:

ModLoad: 77e70000 77f02000 C:\WINDOWS\system32\RPCRT4.dll
ModLoad: 77fe0000 77ff1000 C:\WINDOWS\system32\Secur32.dll
ModLoad: 77f60000 77fd6000 C:\WINDOWS\system32\SHLWAPI.dll
ModLoad: 77f10000 77f59000 C:\WINDOWS\system32\GDI32.dll
ModLoad: 7e410000 7e4a1000 C:\WINDOWS\system32\USER32.dll
ModLoad: 77c10000 77c68000 C:\WINDOWS\system32\msvcrt.dll
ModLoad: 79e70000 7a3d1000
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll
ModLoad: 78130000 781cb000
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\MSVCR80.dll
ModLoad: 7c9c0000 7d1d7000 C:\WINDOWS\system32\shell32.dll
ModLoad: 773d0000 774d3000
C:\WINDOWS\WinSxS\x86_Microsoft.Windows.Common-Controls_6595b64144ccf1df_6.0.2600.5512_x-ww_35d4ce83\comctl32.dll
ModLoad: 5d090000 5d12a000 C:\WINDOWS\system32\comctl32.dll
ModLoad: 60340000 60348000
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\culture.dll
ModLoad: 790c0000 79ba6000
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\ef16f1942abdb0438559c3ff80ffff6a\mscorlib.ni.dll
ModLoad: 774e0000 7761d000 C:\WINDOWS\system32\ole32.dll
ModLoad: 5ad70000 5ada8000 C:\WINDOWS\system32\uxtheme.dll
ModLoad: 10100000 1010f000 C:\Program Files\Logitech\SetPoint\lgscroll.dll
ModLoad: 7c420000 7c4a7000
C:\WINDOWS\WinSxS\x86_Microsoft.VC80.CRT_1fc8b3b9a1e18e3b_8.0.50727.762_x-ww_6b128700\MSVCP80.dll
ModLoad: 77690000 776b1000 C:\WINDOWS\system32\NTMARTA.DLL
ModLoad: 71bf0000 71c03000 C:\WINDOWS\system32\SAMLIB.dll
ModLoad: 76f60000 76f8c000 C:\WINDOWS\system32\WLDAP32.dll
ModLoad: 7a440000 7abfe000
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\a341c20515b3e04e8b8fd3a7339cda77\System.ni.dll
ModLoad: 5e410000 5e5bc000
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualBas#\f6ded29b776b5f4fadaba34405040e96\Microsoft.VisualBasic.ni.dll
ModLoad: 79060000 790b3000
C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll
ModLoad: 7ade0000 7af74000
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\04cb626752be2341a01f69f37ad29309\System.Drawing.ni.dll
ModLoad: 7afd0000 7bc56000
C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\1845d8d2de696f4398203df5aea71126\System.Windows.Forms.ni.dll
ModLoad: 67770000 677bc000 System.Runtime.Remoting.dll
ModLoad: 67770000 677bc000
C:\WINDOWS\assembly\GAC_MSIL\System.Runtime.Remoting\2.0.0.0__b77a5c561934e089\System.Runtime.Remoting.dll
ModLoad: 11000000 11066000 MagicLibrary.dll
ModLoad: 011f0000 014b5000 C:\WINDOWS\system32\xpsp2res.dll
ModLoad: 11000000 11066000 C:\Program Files\LMSOFT\Web Creator Pro
5\MagicLibrary.dll
ModLoad: 68000000 68036000 C:\WINDOWS\system32\rsaenh.dll
ModLoad: 76fd0000 7704f000 C:\WINDOWS\system32\CLBCATQ.DLL
ModLoad: 77050000 77115000 C:\WINDOWS\system32\COMRes.dll
ModLoad: 77120000 771ab000 C:\WINDOWS\system32\OLEAUT32.dll
ModLoad: 77c00000 77c08000 C:\WINDOWS\system32\VERSION.dll
(d50.838): C++ EH exception - code e06d7363 (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (!!! second chance !!!)
eax=0012f200 ebx=00178a18 ecx=00000000 edx=00000025 esi=0012f28c
edi=e0434f4d
eip=7c812aeb esp=0012f1fc ebp=0012f250 iopl=0 nv up ei pl nz na po
nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000
efl=00000202
KERNEL32!RaiseException+0x53:
7c812aeb 5e pop esi

Thanks again,

Alex.
 
J

Jeroen Mostert

Alex said:
I worked all day on this issue and still can't get a clue... I set the
symbol path and well, other than removing the warnings it didn't do
anything.

What it will allow you to do is see the stack traces of any exceptions with
symbols. Coming right up.
As I said, it really looks like it's all happening before the
first line of code I actually wrote myself is executed... Looks like it's an
issue with a dependency, or .NET, or whatever.
Yes, it is (specifically, "or whatever" is most likely).
Here's the WINDBG output, after inputing 'g'. I'm hoping at least one of you
guys can see what I'm not seeing:
[snip standard stuff]
ModLoad: 11000000 11066000 MagicLibrary.dll
ModLoad: 11000000 11066000 C:\Program Files\LMSOFT\Web Creator Pro
5\MagicLibrary.dll

Programs injecting libraries in every process, always good for a laugh.
Reboot in safe mode and see if that changes anything, you don't want stuff
like this possibly gumming up the works. The process should still work in
safe mode, but if it doesn't, you can use Autoruns
(http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) to
selectively disable all non-standard startup entries. Or you can just
uninstall Web Creator Pro.

Web Creator Pro may not actually be the culprit. Take a hard look at
firewalls, virus scanners, low-level drivers and other stuff that likes to
install hooks and crash innocent programs.
(d50.838): C++ EH exception - code e06d7363 (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (first chance)
(d50.838): CLR exception - code e0434f4d (!!! second chance !!!)

You're this close to seeing where the exception is coming from. Enter

..loadby sos mscorwks [enter]
!pe -nested [enter]

And you'll get the details of the managed exception. I actually doubt it'll
be useful, though -- it looks like some very primitive assumption of the CLR
is being violated, so the exception might be something really low-level,
like "divison by zero". The location should still be of help.
 
A

Alex

[snip standard stuff]
Programs injecting libraries in every process, always good for a laugh.
Reboot in safe mode and see if that changes anything, you don't want stuff
like this possibly gumming up the works. The process should still work in
safe mode, but if it doesn't, you can use Autoruns
(http://technet.microsoft.com/en-us/sysinternals/bb963902.aspx) to
selectively disable all non-standard startup entries. Or you can just
uninstall Web Creator Pro.

Web Creator Pro may not actually be the culprit. Take a hard look at
firewalls, virus scanners, low-level drivers and other stuff that likes to
install hooks and crash innocent programs.


I will confirm later but I think I found the culprit. This new version was
compiled using Visual Studio 2008, as opposed to our last version which was
done using VS2003. The 2008 project defaulted to using .NET 3.5 and I didn't
have that one on the test computer. I'm having issues installing it for some
reason, so I can't confirm just yet, but I'm pretty sure that was the issue
all along.

BTW, MagicLibrary is actually a library we load on purpose, not one of those
borderline virus DLL :)

Thanks again for your input!!

Alex
 
Ad

Advertisements

Ad

Advertisements


Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top