I came across Application Debugging in a Production Environment today, and gave it a quick read. Nicely done. Many times, I am asked "Will you debug this for me?", or hear its cousin "I don't know how to debug". This tutorial should get anyone up to speed fairly quickly. It covers 3rd party tools (e.g. SysInternals) and things like WinDbg - tools that I use on a daily basis to find out what's going wrong. With any luck, I'll hear less of the afforementioned phrases, and more questions like "How can we improve the design of this application". I know, I know. Dare to dream...
I was looking to setup a blog engine here for testing, so I tried CommunityServer and dasBlog. Both were pretty easy to setup, but what was confusing was that both of these blog servers ended up taking down my IIS process when hitting certain pages. The error messages in the Event Viewer were either:
aspnet_wp.exe (PID: 936) stopped unexpectedly.
or
Faulting application inetinfo.exe, version 5.1.2600.2180, faulting module aspnet_isapi.dll,
version 1.1.4322.2032, fault address 0x0001e214.
I figured if both of these engines were taking down IIS, it wasn't just a simple bug in the blog software, but something more sinister. Googling came up empty for me, and then I stumbled upon the EventID website. Putting in the information there eventually took me to one possible solution. Namely:
Change the application setting for the website, which you will find under IIS Console.
There is a button Configuration. There you will find a checkbox "Cache ISAPI Application".
For asp.net this option must be enabled, otherwise you get this error.
Following this advice, the error did indeed go away. I haven't done anything to IIS to turn that off, so that makes this whole situation even more ridiculous. It's dumb enough to ship IIS with a default setting that makes ASP.NET applciations take down IIS completely, but IMO, it's even dumber to allow IIS to abend like this when Microsoft knows that this option must be enabled to make ASP.NET applications work properly. A simple exception trap to put better information in the EventViewer, or display a message box when the situation is detected, or even use the EventViewer server communication facility to tell you why you're getting the error would all be better than the current situation.
I'm going to PDC this year, and I'm really looking forward to it. Our secretary registered me to go, and I've been receiving email blasts about the fact that I'm registered. Yesterday, I received an email telling me the scheduling tool is available. I went to login, and was greeted with an error telling me that my Passport account is not registered for PDC. I emailed support and they confirmed this to be the case. So, even though my passport account has the email address registered for PDC, they won't accept it. I now have our secreatary's passport login information so that I can use the scheduling tool. I can't believe someone decided this would be a good idea. Furthermore, when I brought it to their attention, I would have expected them to say "Geez, we messed up on that one. We should fix that." instead of "Well, there's nothing we can do." I guess all of the jokes people have been making about the uselessness of Passport over the years are more true than we know.
As an aside, I'm *supposed* to be going to PDC, but we'll see how that goes since I'm heading in for surgery to repair my completely torn ACL on Friday, 8/19. Let's just say that playing in a 3 on 3 basketball tourney is not always the smartest idea. I've played competitive sports my entire life, including at the collegiate level, and this is the biggest injury I've ever had. I guess it's time to accept that I shouldn't be doing these kinds of things anymore.
I came across this link to Microsoft Scalable Fabric from The Daily Grind. I installed it, and I love it. It's a utility to help you manage a bunch of open windows. As you drag windows towards the edge, they get smaller and smaller. You can even create groups to categorize windows based on functionality, client, etc. After the first day of using it, I really like it.
I'm not going to bother linking to Robert Scoble's web site. I don't want to drive one more person to that site than I have to. His quote below is the reason I have plonked him from my blog list:
no, you're here for Robert Scoble's views. And, those views are mostly about tech, but I do have political views and will occasionally let you know them.
And therein lies the problem. If you want to build an audience based on tech entries, and then start blogging about politics (aka poliblogging) or other sensitive issues (e.g. religion, lifestyle, etc.), then you are behaving in a very irresponsible manner. I have plonked a couple of other blogs for poliblogging in the past, and interestingly enough, I have plonked both those with whom I've agreed and disagreed. When I fire up FeedDemon to take a look at the latest tech news, I don't want to be greeted with politics. IMO, Scoble is no better than the common low-life spammers that inundate my inbox with topics I could care less about. I think the fame has gone to Scoble's head and he thinks he can do whatever he wants. Well, he can. Just don't expect us to follow along. Perhaps a nice campaign is in order to post feedback to people who abuse their blog.
Don't get me wrong, an occasional post about important events in your life is fine. After all, we are not robots. However, to take up one political crusade after another is out of bounds.
On July 13, Borland will host the 24 Hours of Delphi. While it might not be as good as the TV show "24", it does look like it will be a lot of fun.
I'll be online chatting with them in hour 7, (7am PDT, 9am CDT, check your favorite time conversion site for your local time). I'll be talking about a conversion of a huge Win32 application that we did from Delphi 6 to Delphi 2005. I'm sure there will be a mention or 2 of PopupMode in there. I've also been known to to talk about MIDAS/DataSnap, so I'm sure that will be in the mix somewhere, too! I look forward to seeing you guys online. Get your questions in early.
I use Component Templates a lot. I find it to be the easiest way to start writing a test case when trying to isolate a bug. For example, one template that I have used since the invention of templates is to have a DataSource, ClientDataset, DatasetProvider, SQLQuery, SQLConnection, and DBGrid all hooked up and ready to go. When I see something I need to check out, I just drop the TDBXTemplate onto my form and I'm off and running. Unfortunately, a bug in Delphi 2005 prevents multiple components from being selected simultaneously, which means you can't create Component Templates like this.
What I've done for now is to go to the design view of the form, select the text of all the components, and add it to the Code Snippets window (select text, press Alt, and drag the text block to the Tool Palette). This means that when I want to create this "template", I have to go to the text view of the form and use the Code Snippet. I'm not thrilled about having to do this, but at least it's a workaround for now.
I saw the end of a TV newscast that mentioned mobile video, so I set to Googlin'. What I found is beyond awesome. I will definitely be picking something up in this area. When I do, I'll be sure to blog about my experiences with whatever I choose.
So much homework to do, so little time to do it. Does anyone have any recommendations or experience with these things?
With apologies to Edsger Dijkstra, I bring you a much smaller treatise on the benefits of using Range Checking. As many of you are aware from previous entries on the topic, I have been dealing with issues relating to the PopupMode off and on for a while now. I went back to the drawing board on the problem I talked about where using API subclassing to intercept paint messages for all components on a screen was broken due to PopupMode. I rewrote my component to use VCL subclassing (i.e. assign a procedure to the WindowsProc property), and things are much better (after much trial and tribulation). Part of the trials and tribulations I was having were due to accessing a dynamic array beyond the bounds of the array. It was resulting in 'Invalid Pointer Operation" error messages when shutting down the application. Debugging didn't reveal much interesting, and not much to chase further either. However, I realized I didn't have Range Checking or Overflow Checking turned on in my project. Turning these options on and running again showed me immediately where the code was broken, and allowed me to fix the problem quickly. Without this check, I was overwriting some memory and this resulted in the Invalid Pointer error later on.
So, long story, short: Range Checking can help you quite a bit during development. I don't necessarily advocate leaving it on for production code, though.
|