AeroCycle applet
I’ve released a small applet to cycle aero on/off.. reasons why and applet, here.
Porting .NET app to Vista.. DEP strikes!
An interesting issue happened these days when I tried to port some apps to Vista.
Basically all .NET apps compiled with Visual Studio 2005/2008 are marked “NX compatible” by default. If your .NET app uses an incompatible DLL or COM object, the app will crash. What I found funny was that the message was a standard access violation error instead of a more specific DEP error.
Debugging it was not easy: I was unable to step through the code in VS2005 and using WinDbg wasn’t much of help too, except that the line where it crashed was something like a mov [esp+24h], constant with ESP well within limits — an instruction which should not generate an access violation exception given the current ESP value. At that point I was starting to think that my “attempt to read or write protected memory“ was, in fact, something else.
Luckily my mind went to DEP and in less than 1 minute of Google search I was able to find this link with a good solution.
I tried, without much faith, and it worked. And the C# app was finally working on Vista.
TargetInvocationException in asynchronous web service call
I’ve seen so many solutions around to solve a TargetInvocationException raised by an asynchronous web service call in .NET and they are all but satisfactory. Some go so far to create a worker thread which is overkill and, above all, a clear sign of cargo culting.
The solution is very very simple. The exception is raised if a call fails due to a network problem, and you have accessed the Result properties of the completion event arguments. Simply check if the Error property is null before accessing the Result property (it’s this access which raises the exception).
New gmail iGoogle gadget bugged!
I use iGoogle as a starting home page and gmail as the email app and hosting even for this domain because it has the option to always report a different (after authentication) address as sender. So I’m used to using a gmail gadget on the iGoogle homepage.
If you use the new (and crappy) version of the gmail gadget, it doesn’t respect the reply-to option. It’s a big bug and this evening I sent an important email with the wrong domain.
Update: It’s not the only option not respected. It shows previews of contents even if you disabled it (I take for granted another lamenting post). And sometimes even after you un-maximize the crap, it gets maximized again at the page reload.
It seems to be the period of crappy redesigns. Let’s add iGoogle+gmail to the new last.fm, the new Facebook and Office 2007.
Update-2: It’s bugfest! the gadget is written in Javascript and stuff and doesn’t respect the browser back button. Nor the middle-click to open in a new tab. Just, WOW!
Update-3: They fixed it!