Bart

Software Engineer - Red Gate Software

.NET Oddities #3

Published Thursday, November 24, 2005 3:00 PM

OK, so I'll admit this is a bit cheeky: this entry should almost certainly be .NET Oddities #2a because it's so closely related to #2, but there. You may have noticed, and in fact I already knew this, that OutOfMemoryException (like StackOverflowException) has a null value for its StackTrace property. Again, this can be a total pain in the butt, however fortunately for me it was Dan that did the hard work and tracked it down this morning (for which I'm exceedingly grateful). Of course, things are never quite that simple, and it turned out that the bug behind all of this was actually elsewhere in the code, so I didn't totally escape having to do some work.

I should also qualify all of this by saying that it isn't just .NET that behaves in this way. The most recent version of Java that I used in anger (1.4.2) also behaves like this: no stack trace from OutOfMemoryError. Now admittedly I want to have my cake and eat it, but how useful would it be if the JVM and CLR provided this information, even if it was only a partial stack trace from the point where the exception/error occurred back up through a few stack frames? I think that would be very cool indeed, although somehow the VMs in question would need to reserve enough memory to pull off this little trick, and it could well be a complete pain to implement, and, well you get the picture... but in an ideal world, how cool would it be?

Anyway, "You may say that I'm a dreamer..." ;-)

That's all for now. The new version of DTS Package Compare (formerly DTS Compare) is coming along a treat so I'm going to get back to it. Watch this space.

by Bart Read
Filed Under:

Comments

No Comments
You need to sign in to comment on this blog

About Bart Read

I've had a few jobs since graduating, but for the last four years I've been settled at Red Gate Software in Cambridge, UK. Over that time I've worked on a wide range of products, both as a developer and as a project manager, including 18 months on SQL Prompt; right now I'm finishing up with ANTS Profiler 4, which we think is going to be amazing - hopefully you will too.

















<November 2005>
SuMoTuWeThFrSa
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910
Ziggurats, Batman and the Town Crier
 We asked Brian for a description of the Help System for the software he's working on and ends up... Read more...

The Future of NET Reflector
 Simple Talk asked freelance writer Bob Cramblitt to sit down with the two people behind the agreement... Read more...

Software Tool Design: Remote User Testing
 If you are developing a software product, you'll know that the sooner you can get feedback from the... Read more...

SQL Toolbelt 2008: Predominantly an Engineering Task
 The conversion of the Red-Gate tools to be compatible with SQL Server 2008 might not seem, on first... Read more...

Andrew Tanenbaum: Geek of the Week
 Andrew Tanenbaum has had an immense influence on the way that operating systems are designed. He... Read more...