If broken it is, fix it you should

Using the powers of the debugger to solve the problems of the world - and a bag of chips    by Tess Ferrandez, ASP.NET Escalation Engineer (Microsoft)

November, 2005

  • If broken it is, fix it you should

    Are you aware that you have thrown over 40,000 exceptions in the last 3 hours?

    This may seem like a preposterous statement, but unfortunately it’s all too common. In my work I go through a lot of dumps, somewhere in the neighborhood of 5-20 in a day:) Since the information is readily available to me, I usually do a quick check for the number of exceptions that the application has thrown and what types of exceptions they are so I can make the customers aware. More often than not, the applications are throwing a lot more exceptions than the developers expected, or they were...
  • If broken it is, fix it you should

    Why I love the debugger...

    10 years ago, still in college, I started working for a company developing real-time systems for trains in Motorola HC11 assembly. Although very interesting and challenging it was a relief to later move on to some more high-level languages, but in the end, no matter how high-level the programming language you work in, everything comes down to machine instructions and ones and zeros. There is just a bunch of stuff between you and the nitty-gritty that normally you might think you don't need to care...
  • If broken it is, fix it you should

    !dumpheap –stat explained… (debugging .net leaks)

    The most powerful command when debugging a managed memory leak is by far !dumpheap. It will show you all the objects on the managed heaps and using the different switches of !dumpheap you can display the output in virtually any way you want. !dumpheap is a function of the sos.dll extension that comes with the framework installation (in the framework directory) and if you have the SDK installed you can find some basic help for it’s usage in C:\Program Files\Microsoft Visual Studio .NET 2003...
  • If broken it is, fix it you should

    Who is this OutOfMemory guy and why does he make my process crash when I have plenty of memory left?

    To answer this question, there are a few concepts we need to discuss. Working on a 32-bit system, you can address 4 GB of memory, out of this 2 GB is typically reserved to the Operating System and 2 GB are allowed for each user mode process, such as w3wp.exe (asp.net) for example. This memory is called virtual memory and the 2 GB’s are 2GB independently of how much RAM you have added to the system. The amount of RAM simply decides how much paging and swapping you will do, i.e. how fast memory access...
  • If broken it is, fix it you should

    I have a memory leak!!! What do i do? (defining the "where")

    Not that it matters a tremendous lot but just because it is a big pet-peeve of mine I want to differentiate between a real memory-leak and high memory usage. A memory leak is when you used some memory and lost the pointer to the allocation so you can no longer de-allocate that memory. If you still have a pointer to it, you have high-memory usage, which might be just as bad in terms of what happens to the process but still different J Just to make things simple I’ll use the term memory leak for both...
  • If broken it is, fix it you should

    What on earth caused my process to crash?

    So you got a 1000 w3wp.exe stopped unexpectedly in the eventviewer or your process just exited in some weird undefined way and you don't know why. When a process crashes or exits a special event will be fired called EPR (Exit PRocess) so with a debugger like windbg.exe we can attach to the process, wait for epr to be thrown and take a memory dump. When you install the debugging tools for windows you get a vbs script called adplus ( http://support.microsoft.com/default.aspx?scid=kb;en-us;286350...
Page 1 of 1 (6 items)