Sign in
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)
Tess Ferrandez
I work as a developer evangelist at Microsoft, and my job is to help developers make the most of their skills on the MS stack.
In this blog I share tips on anything from debugging and troubleshooting to development on platforms like Windows, Web, Windows Phone and Kinect. And also some random tidbits about computing and my life at MS.
If you are new here, start with:
My debugging labs (Buggy Bits)
My Silverlight labs (building a game)
XNA for Windows Phone Walkthrough (building a game)
Thanks for visiting my blog
@TessFerrandez
Options
About
Email Blog Author
RSS for posts
Atom
RSS for comments
OK
Search this blog
Tags
ASP.NET
Crash scenarios
Debugging
Debugging Labs
General debugging tidbits
JavaScript
Kinect SDK
Memory issues
Pages
Performance issues and hangs
presentation
Silverlight
SOSEX
Windows 8
Windows Phone
Windows8
XNA
Archive
Archives
May 2013
(1)
April 2013
(1)
May 2012
(1)
March 2012
(8)
August 2011
(3)
May 2011
(1)
December 2010
(1)
November 2010
(1)
September 2010
(3)
August 2010
(2)
June 2010
(1)
May 2010
(1)
April 2010
(3)
March 2010
(4)
February 2010
(2)
January 2010
(2)
December 2009
(2)
November 2009
(2)
October 2009
(4)
September 2009
(4)
August 2009
(2)
July 2009
(1)
June 2009
(3)
May 2009
(3)
April 2009
(5)
March 2009
(9)
February 2009
(2)
January 2009
(6)
November 2008
(8)
October 2008
(7)
September 2008
(7)
August 2008
(5)
July 2008
(1)
June 2008
(7)
May 2008
(12)
April 2008
(14)
March 2008
(12)
February 2008
(17)
January 2008
(5)
December 2007
(2)
November 2007
(1)
October 2007
(8)
September 2007
(3)
August 2007
(7)
June 2007
(5)
May 2007
(1)
April 2007
(5)
March 2007
(4)
January 2007
(1)
December 2006
(1)
November 2006
(2)
October 2006
(4)
September 2006
(3)
August 2006
(3)
June 2006
(1)
May 2006
(1)
April 2006
(5)
March 2006
(2)
February 2006
(8)
January 2006
(7)
December 2005
(3)
November 2005
(6)
MSDN Blogs
>
If broken it is, fix it you should
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
If broken it is, fix it you should
A case of lost session variables when using out of process session state
Posted
over 4 years ago
by
Tess1
0
Comments
Recently I had a case where the customer had an issue with session variables. The claim was that if they use in-proc session state their session variables would work just fine, but if they changed the session mode to stateserver in web.config their sessions were lost. <sessionState mode="StateServer" cookieless="UseCookies" stateConnectionString="tcpip=127.0.0.1:42424"/> When looking at bit closer at the repro, it wasn’t really all session variables that...
If broken it is, fix it you should
Visual Studio 2010 .net debugging resource
Posted
over 4 years ago
by
Tess1
3
Comments
If my post on dump debugging in VS 2010 piqued your interest, here is a list of a number of other new debugging features coming up in 2010 http://blogs.msdn.com/ms_joc/archive/2009/05/27/dev10-beta1-free-at-last.aspx I for one will be following the blog to get the scoop… On a related note, John Robbins also wrote a nice post about historical debugging in VS2010, I haven’t tried it yet but I can already see a number of ASP.NET scenarios where it can be applied. http://www.wintellect...
If broken it is, fix it you should
First look at debugging .NET 4.0 dumps in Visual Studio 2010
Posted
over 4 years ago
by
Tess1
14
Comments
I know that for a lot of you this is a bit far into the future, but I thought it would be nice to run through a few of my lab scenarios to show off some of the new features in Visual Studio 2010. I am sure that I will miss a bunch of cool features here as this post is just based on my first experience with this, but I will likely post more about these features as we get closer to RTM. As we are only in Beta, anything and everything may change before RTM and the below is just based on...
If broken it is, fix it you should
Background Garbage Collection in CLR 4.0
Posted
over 4 years ago
by
Tess1
9
Comments
Yesterday I found this really nice Channel 9 interview with Maoni Stephens (Dev Owner of the CLR GC) and Andrew Pardoe (Program manager for the CLR GC) where they talked about the new Background GC in CLR 4.0. She also talks about it here and there is not much value in me repeating what she already says there but basically the main points of the video and the post are: Concurrent GC is being replaced by Background GC in CLR 4.0 Concurrent GC is the mode of the GC that you use in desktop...
If broken it is, fix it you should
Debug Diag script for troubleshooting .NET 2.0 Memory leaks
Posted
over 4 years ago
by
Tess1
27
Comments
I have put together a quick and dirty debug diag script for troubleshooting .net memory leaks. (attached to this post) The reason I put it together was mainly to show how you can create your own debug diag scripts but feel free to use it to troubleshoot memory leaks, knowing that it does string parsing on the output so it is a bit prone to errors if sos changes output formats. NOTE: This script will only work on .NET 2.0 x86 memory dumps Mourad recently published a whitepaper on debug diag...
If broken it is, fix it you should
Neat .NET 2.0 StackViewer to troubleshoot hangs/performance issues
Posted
over 4 years ago
by
Tess1
13
Comments
Bret wrote a post about Managed Stack Explorer , a really nice tool that was developed in 2006 but since then seems to have been forgotten. It’s excellent if you want to troubleshoot hangs/performance issues in a process but don’t want to go through the hassle of getting and analyzing a dump. What it will do is basically attach, snap the .net call stack and detach so you can see what all the .net threads are doing without using a debugger. What is even cooler is that you can copy/run...
If broken it is, fix it you should
Unable to load DLL ‘dllname.dll’: A dynamic link library (DLL) initialization routine failed. 0x8007045A
Posted
over 4 years ago
by
Tess1
12
Comments
I recently got an email with the following question: “Can you give me some very helpful hints with this one ? I am struggling with the following error in an asp.net application. Exception Message: Internal Error : Unable to load DLL 'RdbNet.dll': A dynamic link library (DLL) initialization routine failed. (Exception from HRESULT: 0x8007045A) The RdbNet.dll is an .NET dll from Oracle so I can't debug into it. If I use a windows forms application I never have the error. I have already used procmon...
If broken it is, fix it you should
Show me the memory: Tool for visualizing virtual memory usage and GC heap usage.
Posted
over 4 years ago
by
Tess1
25
Comments
A colleague of mine, John Allen, created an awesome tool way back that displays memory usage in a process very nicely. I use screenshots from it from time to time in presentations or posts but unfortunately that tool is not publicly available. Since lots of people have asked me about it I figured I would just do a quick and dirty mock-up (based on the same ideas) and post the VS solution here. This sample tool will give you a visual overview of the virtual memory space (from a memory dump)...
If broken it is, fix it you should
.NET Exceptions: Quick WinDbg/SOS tip on how to dump all the .NET exceptions on the heap
Posted
over 4 years ago
by
Tess1
11
Comments
Since a .net exception is a .NET object like any other, it gets stored on the GC heap when you (or some code you call) calls new XXException(). This means that if you have a memory dump of a process you can dump out all the recent exceptions that have occurred, or rather all exceptions that have not yet been garbage collected, which will give you a good feel for what exceptions occurred recently. Doing this is pretty easy if you have sos loaded (.loadby sos mscorwks) in windbg 0:015>...
If broken it is, fix it you should
Validation of viewstate MAC failed after installing .NET 3.5 SP1
Posted
over 4 years ago
by
Tess1
44
Comments
After installing .NET 3.5 SP1 you may get Validation of viewstate MAC failed exceptions when doing post backs on ASP.NET pages Validation of viewstate MAC failed. If this application is hosted by a Web Farm or cluster, ensure that <machineKey> configuration specifies the same validationKey and validation algorithm. AutoGenerate cannot be used in a cluster. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information...
If broken it is, fix it you should
Developers are from Mars, Ops people are from Venus… or It looked good on paper
Posted
over 4 years ago
by
Tess1
19
Comments
A few weeks back me and Micke (one of our Architect Evangelists) had a session at TechDays where we talked about “things that looked good on paper” i.e. things that sound pretty ok in the design/development phase but sometimes turn out to be a disaster in production. We are both pretty passionate about making the lives of the ops. people easier by thinking about the maintenance of the sites/apps at design time, rather than having it be an afterthought. I stole the title of this post from one...
If broken it is, fix it you should
Debugging a .NET crash with rules in Debug Diag
Posted
over 4 years ago
by
Tess1
25
Comments
During mine and Micke’s presentation at TechDays this week I showed a demo of setting up rules with Debug Diag to identify the cause of a crash in an ASP.NET application. Even though debugging might be tricky, setting up rules in Debug Diag is beautifully simple and I personally believe that it would be a good idea for anyone running a web site to have debug diag installed along with a few instructions for the ops personnel on how to set up the rules. Better yet, you can set up the rules in advance...
If broken it is, fix it you should
Silverlight/WPF FlipImage Animation
Posted
over 4 years ago
by
Tess1
19
Comments
I was working on some Silverlight samples and needed an image that could flip over as in the example below. All the samples I could find on the net were pretty complex and contained a lot of code to do the animation and I wanted something really simple. To create the illusion of an image that flips over (or any kind of UI element that flips over) you just need 4 things 1. A front image / UI element 2. A back image / UI element 3. A flip animation 4. A reverse animation The flip...
If broken it is, fix it you should
.NET Rocks: Debugging chat
Posted
over 4 years ago
by
Tess1
11
Comments
Yesterday I had a nice chat with Richard and Carl at .NET Rocks . We talked about .net, debugging, memory issues and a bunch of other stuff, and in the end I got a pop quiz that I failed:) See if you can figure out what caused the outage on their servers… The show will be uploaded here some time today. Laters, Tess
If broken it is, fix it you should
Silverlight Game – Part 3 - Using Linq to XML to read and generate the levels
Posted
over 4 years ago
by
Tess1
4
Comments
This is part three in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In Part 2 we created some Cars to place on the board, in this post we will read the level information and place the Cars accordingly. I have attached a number of xml files to this post...
If broken it is, fix it you should
Silverlight Game – Part 4 - Adding drag and drop functionality to move the cars around
Posted
over 4 years ago
by
Tess1
4
Comments
This is part four in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In part 3 we finished the level generation, now we are getting ready to move the cars around a little. 1. Add EventHandlers for MouseLeftButtonDown, MouseMove and MouseLeftButtonUp on the...
If broken it is, fix it you should
Silverlight Game – Part 5 – Storing Highscores in Isolated Storage
Posted
over 4 years ago
by
Tess1
10
Comments
This is part five in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In parts one through four we created a traffic jam game called Seattle Streets. The object of the game was to move cars around and get the red car to reach the exit in as few moves as possible...
If broken it is, fix it you should
Silverlight Game – Part 1 – Creating the main layout
Posted
over 4 years ago
by
Tess1
5
Comments
This is part one in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net 1. Create a new Silverlight Application using VS 2008 and call it SeattleStreets When you click ok you will be asked to create an asp.net application or automatically generate a test page...
If broken it is, fix it you should
Silverlight Game – Part 2 – Creating a Car UserControl
Posted
over 4 years ago
by
Tess1
3
Comments
This is part two in a series of 5 posts showing how I built a simple game in Silverlight, you can follow along (reading the posts in order) to build your own Traffic Jam game. I would recommend that you also go through ScottGu’s silverlight tutorials as well as the other tutorials on www.silverlight.net In Part 1 we created the layout for the page/playing board, in this post we will create a Car UserControl to place on the board. The car we are creating will look something like this....
If broken it is, fix it you should
Silverlight 2.0 Walkthrough – Creating a “Traffic Jam” game
Posted
over 4 years ago
by
Tess1
12
Comments
This series of posts are not really in-line with my normal debugging posts, but I just created a simple Traffic Jam game in Silverlight and thought I’d make it into a “lab series” that you can go through if you are getting started with Silverlight. The game is called Seattle Streets and it based on the popular board game Rush Hour® where you help a little red car move to the Exit square by moving the other cars out of its way in as few moves as possible. The project for the finished game is attached...
If broken it is, fix it you should
.NET Memory Leak reader email: Are you really “leaking” .net memory
Posted
over 4 years ago
by
Tess1
6
Comments
I get several emails every week through the blog asking for help on various issues. Unfortunately due to time constraints I can’t really look at them all on an individual bases but I thought this particular request might be interesting to share. The problem description was “One of our w3wp.exe’s just keep on growing (slowly), and never releasing memory back to the pot. The main offender appears to be System.String and System.Object[]” and the email then had some !dumpheap –stat...
If broken it is, fix it you should
.NET Memory Leak: To dispose or not to dispose, that’s the 1 GB question
Posted
over 4 years ago
by
Tess1
33
Comments
I was looking at a memory dump recently for an issue where the process would grow to over 1 GB and return OutOfMemory Exceptions. Debugging the issue: A full user dump of the w3wp.exe process was taken with debug diag 1.1 when memory was really high. If you are reading this and have no clue what debug diag is, how to get dumps with it, or use leak tracking, here is the download and the usage instructions . The dump itself was 1.34 GB which is basically the memory we have committed (used) so it was...
If broken it is, fix it you should
10 years 10 lbs of M&Ms
Posted
over 4 years ago
by
Tess1
40
Comments
This week I turned 10 in Microsoft years which according to MS tradition means that you need to bring in 10 lbs of M&Ms to the office to treat your co-workers with as they stop by and reminisce about the past 10 years :) We don’t really have M&Ms in the stores in Sweden so I had to substitute for my favorite Swedish candy instead. 10 years is quite some time, but it feels even longer in our business when you think about how much happens with technology in 10 years. When I first started...
If broken it is, fix it you should
Troubleshooting .Net SQL Connectivity issues: What data should you gather?
Posted
over 4 years ago
by
Tess1
3
Comments
Spike in our data access support team has a really good blog talking about data access related issues in .net. Recently he wrote a really good post about what you should gather to troubleshoot a connectivity issue effectively such as Connection strings SQL Server logs The exact error message (with stack trace and other details) Netmon traces Memory dumps File version info along with what you should look for in each… I would recommend both that post and the blog as a whole to anyone dealing with data...
If broken it is, fix it you should
.NET Hang: Analyzing Debug Diag output
Posted
over 4 years ago
by
Tess1
5
Comments
Earlier this week I got an email from a reader who had a hang in an application and sent in some Debug Diag logs. In order for me to dig in deeper I would need to open a support case as I would have to ask follow up questions and look at the dumps etc. However, I wanted to show some interesting details from his report to show you how to move forward if you get an issue like that. Analyzing the debug diag output At the top of the report generated by debug diag for the dump, you will see an analysis...
Page 3 of 11 (252 items)
1
2
3
4
5
»