Monday, April 19, 2010

Canon vs. MSN

I have a pretty neat little USB-powered scanner CanoScan LiDE 200. Worked like a charm - assembled PDFs, did it's OCR things. Until recently. All the sudden it started throwing "Application stopped working" popup with the following trace:

Faulting application name: mpnex20.exe, version:, time stamp: 0x488d25b8
Faulting module name: MSONSEXT.DLL_unloaded, version:, time stamp: 0x43306199
Exception code: 0xc0000005
Fault offset: 0x49143a3b
Faulting process id: 0x1b6c
Faulting application start time: 0x01ca6fa1279f1150
Faulting application path: C:\Program Files (x86)\Canon\MP Navigator EX 2.0\mpnex20.exe
Faulting module path: MSONSEXT.DLL
Report Id: 66e6c43e-db94-11de-944e-00248c08c4d9

Reinstall didn't help. All kind of forums advised to fix a corrupted profile - which in my case would open giant can of poisonous worms, so it wasn't acceptable. Eventually I've dug up an obscure recipe. When I first laid my eye on it I didn't believe it, but three hours of head banging improves ones faith in miracles. I tried it and it worked. Like a charm. The guy is a Voodoo Jedi - there is no way mere human can get to that without using a Force. Here is the solution:
- Go to the folder C:\Users\[user name]\App Data\Roaming\Microsoft\Windows\Network Shortcuts\
- There will be shortcut "My Web Sites on MSN" - kill it
- Burn Microsoft sticker under a bridge at a full moon.

Go figure...

Tuesday, February 16, 2010

Interface + extension methods > abstract class

This is a very interesting approach to combine the flexibility and clarity of interface with convenience of laziness when inheriting from half-pre-build abstract class:
Extension methods as default interface method implementations

I usually in doubts every time and now I have more reasons to do the right thing and choose the interface. Very neat trick – some inheritance and some composition.

Wednesday, January 20, 2010

Delete SVN subdirectories (and some others)

Every now and then one would need to add files to Subversion “en mass”. Obviously there are a lot of file types you wouldn't want in your repository. Usual undesirables are BIN and OBJ folders - the are inconvenient to have, and quite often – orphan .SVN remnants which will effectively screw up your new subscription. I struggled with these task long enough and today smart person who reads something besides Science Fiction prepared a script for me:

for /f “tokens=* delims=” %%i in (’dir /s /b /a:d *svn’) do (
rd /s /q “%%i”)

This is to be packed as a KillSVN.cmd file and executed from the root of the folder which contains your solution (not C:\ root, unless you plan to get rid of all your Suvbersion subscriptions!)

it is pretty easy to conclude that deleting BIN and OBJ folders will follow the same patter (this script I wrote myself!):

for /f “tokens=* delims=” %%i in (’dir /s /b /a:d bin’) do (
rd /s /q “%%i”)
for /f “tokens=* delims=” %%i in (’dir /s /b /a:d obj’) do (
rd /s /q “%%i”)

© 2008-2013 Michael Goldobin. All rights reserved