Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

glassJAw

Useless debug clutter

This topic is 5209 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I get all this crap in my debug window:
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\NTDLL.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\d3d8.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\d3d8thk.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\msvcrt.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\KERNEL32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USER32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\GDI32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\ADVAPI32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\rpcrt4.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\version.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\lz32.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\dinput8.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\...\fmod.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\msacm32.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\winmm.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\OLE32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\mmdrv.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\ctwdm32.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\TabHook.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\wdmaud.drv', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\comctl32.dll', Cannot find or open a required DBG file.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\wdmaud.drv'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\wdmaud.drv', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', No symbols loaded.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\wdmaud.drv'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\wdmaud.drv', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', No symbols loaded.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\dsound.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', No symbols loaded.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', No symbols loaded.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\msacm32.drv', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', No symbols loaded.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', No symbols loaded.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL'
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\ksuser.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\d3d8d.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\mscat32.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\WINTRUST.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\CRYPT32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\msasn1.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\IMAGEHLP.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\rsaenh.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\USERENV.DLL', No symbols loaded.
'Reaper.exe': Unloaded 'C:\WINDOWS\SYSTEM32\mscat32.dll'
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\dinput8d.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\hid.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SETUPAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\NTMARTA.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\WINSPOOL.DRV', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\mpr.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\WLDAP32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\samlib.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\ntdsapi.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\dnsapi.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\wsock32.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\ws2_32.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\ws2help.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\NETAPI32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\secur32.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\netrap.dll', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SHLWAPI.DLL', No symbols loaded.
'Reaper.exe': Loaded 'C:\Program Files\Trillian\events.dll', No symbols loaded.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\COMDLG32.DLL', Cannot find or open a required DBG file.
'Reaper.exe': Loaded 'C:\WINDOWS\SYSTEM32\SHELL32.DLL', Cannot find or open a required DBG file.
and then this:
The thread 'Win32 Thread' (0x494) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x508) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x554) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x464) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x504) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x52c) has exited with code 0 (0x0).
The thread 'Win32 Thread' (0x2b0) has exited with code 0 (0x0).
  
I'm thinking VS.NET is putting a lot of crap in my program that really isn't necessary (for one, it's loading some Trillian DLL when my program has nothing at all to do with Trillian). How can I clean some of this stuff up, so it's a little easier to read the debug output? And as for having 7 threads in the program, I'm not sure what that's about as I'm not doing any multithreading. I think some of it may be FMOD. Here are the libraries I link to myself, if it's important: d3d8.lib d3dx8.lib dinput.lib dinput8.lib dxguid.lib fmodvc.lib EDIT: Yep, most of the threads are FMOD. If I don't start FMOD, I'm down to two threads (which is still kind of puzzling). [edited by - glassJAw on September 21, 2003 11:41:49 PM]

Share this post


Link to post
Share on other sites
Advertisement
1. As standard, your application is linked with the following export libraries (i.e. libs which load DLLs and provide exports for functions exported by those DLLs):

kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib


2. However if your application doesn''t use *any* of the exports in a specific lib, then the compiler will not cause **YOUR** application to load those DLLs unnecessarily.


3. You can easily verify that MSVC isn''t "putting a lot of crap in my program that really isn''t necessary" by viewing your .exe with Dependecy Walker.


4. Most DLLs don''t exist in isolation, they require functions from other DLLs, so when D3D8.DLL loads for example, it in turn loads D3D8THK.DLL etc


5. The fact that trillian.dll is being loaded is the fault of Trillian adding shell extensions.


6. Let''s go through those DLLs in order to see why your process requires them:

a. NTDLL.DLL - this contains OS base functions as well as things commonly used by most programs (non CRT version of sprintf etc).

b. D3D8.DLL - loads:
-- D3D8THK.DLL (D3D8 Thunk layer - access to 16bit stuff) - loads:
---- MSVCRT.DLL (C Runtime, malloc(), free() etc)
---- KERNEL32.DLL (OS calls, Sleep(), DisableThreadLibraryCalls() etc)
-- USER32.DLL (Windows UI, CreateWindow(), SendMessage() etc) loads:
---- GDI32.DLL (GDI stuff, device contexts, text etc)
-- ADVAPI32.DLL (Registry & security access) loads:
---- RPCRT4.DLL (Remote Procedure Call core)
-- VERSION.DLL (for finding versions of .DLLs, drivers etc), loads:
---- LZ32.DLL (for decompression of compressed resources/volumes)

c. DINPUT8.DLL (loads many of the same, but they''re already loaded)

d. FMOD.DLL (mod player) - loads:
-- MSACM32.DLL (MS Audio Compression Manager - to handle non-raw WAV formats) - which in turn loads:
---- WINMM.DLL (Windows multimedia - to open wav files, drivers etc)
-- OLE32.DLL (to call CoInitialize - probably used in detection of DSound installation)

e. A call FMOD.DLL makes loads:
-- MMDRV.DLL (Multimedia kernel support driver) - i.e. sound driver support
---- CTWDM32.DLL Creative Labs Windows Driver Model driver (i.e. your sound card driver)
---- TABHOOK.DLL - something that''s "hooking" into the system (unsure poss. nVidia related)
---- wdmaud.drv - WDM Audio driver mapper

f. SETUPAPI.DLL used for getting low level hardware info & performing driver services. Loads (directly & indirectly):
- USERENV.DLL (info about users, environment vars, policies)
- comctl32.dll'' (common controls [list boxes etc])


7. The Loaded...Unloaded...Loaded...Unloaded thing is something enumerating audio devices, codecs, drivers etc, likely FMOD, DSound or sound card driver itself


8. Back to the DLLs being loaded:

a. KSUSER.DLL - Kernel Mode Streaming support
b. D3D8D.DLL - Debug D3D runtime
c. MSCAT32.DLL - Part of the security/crypto stuff
d. -- WINTRUST.DLL - certificates/trusted sources checking
e. ---- CRYPT32.DLL - more security/encryption
f. ---- MSASN1.DLL - ASN.1 encoding
g. ---- IMAGEHLP.DLL - For reading symbols out of .exe''s, stack walking etc
h. ---- rsaenh.dll - Microsoft Enhanced Cryptographic Provider


9.
a. DINPUT8D.DLL - Debug DirectInput
b. HID.DLL - Human Input Devices - low level input stuff
c. NTMARTA.DLL - More access control/user stuff
d. -- WINSPOOL.DRV - Printer drivers (remember you can get parallel port i/p devices)
e. ---- MPR.DLL (networking resources)
f. ---- WLDAP32.DLL (LDAP)
g. ---- SAMLIB.DLL (Security)
h. ---- NTDSAPI.DLL (Domain controller stuff)
i. ------ DNSAPI.DLL (DNS usage)
j. ------ wsock32.dll (Windows Sockets)
k. ------ ws2_32.dll (Windows Sockets)
l. ------ ws2help.dll (Windows Sockets)
m. ------ netrap.dll ("Net Remote Admin Protocol DLL")

You may wander why DInput is seemingly using networking stuff - it isn''t it''s loading things which have MULTIPLE purposes. That code isn''t actually called - just loaded.


10.
a. SHLWAPI.DLL - Shell Light-weight Utility Library (SH functions, path helpers etc). The Shell is also closely tied to Explorer/IE, right click context menus are shell things etc

b. Trillian\events.dll - Trillian has added itself as a shell extension of some form. Any DLL based spyware will also show up here.

c. COMDLG32.DLL - common dialogs - open file boxes, print dialogs etc.

d. SHELL32.DLL - the shell core.


11. As you can see above, MSVC has NOT polluted your exe with unnecessary exports. You''re just using components that rely on other components, which in turn rely on other components. Such is life with a complex security aware OS.


12. Some of those DLLs create helper threads. The important thing to bear in mind with threads is they don''t matter as long as they''re sleeping. The system creates helper threads for all sorts of reasons.

An example might be a high priority *sleeping* thread that''s waiting on an event such as your program exiting so that it can tidy up it''s resources - it isn''t using any of your precious CPU time - so you don''t need to worry about it.

The debugger itself likely needs a few threads - and isn''t a totally reliable view of what your process will do when run standalone (due to the way debuggers have to work under Windows to make it look like two processes are running in parallel).

--
Simon O''Connor
3D Game Programmer &
Microsoft DirectX MVP

Share this post


Link to post
Share on other sites
Ok, I''m working on some sound code and was wondering where I was getting these mystery threads from. Did a little a search and ended here...That had to be, far and away, the single most informative thing I have ever read on .dll activity. Much thanks.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!