Category Archives: Uncategorized

Shareware donation post

I try and offer support to shareware authors whenever I find something useful.
I’ve donated to enough authors that it’s getting hard to keep track.

So this will be my official ‘I’ve already sent these people money’ post.

Donationcoder.com – numerous small donations.
Imageburn
the Tortoise SVN client project $5
Cobain backup
The author of the Arclite theme that this site uses $10

Getting started with Debugging Part2: Checking out a Crash Dump File.

In Part 1, I showed how to install and configure the debugging tools for windows, and setup the symbol files to download from Microsoft.

In this part, I’ll show how to use the debugging tools to analyze crash dumps from windows when it crashes and gives the ‘blue screen of death’

Precusor: Setup Windows to generate a crash dump file

Windows doesn’t necessarily need to create a crash dump file, but it’s a good idea to do so.

In the system properties control panel, On the advanced tab, click ‘Startup and Recovery->Settings’ (This is right above where you had to set the environment variable from part1)

Be sure there’s a memory dump type selected. Note that “Kernel memory Dump” = “full memory dump” and you’ll need a swap file on your C drive thats at least as big as your RAM.

Memory dump locations:

  • Kernel/Full: c:\windows\MEMORY.DMP (Only one copy kept unless moved/renamed)
  • Small/Minidump: c:\windows\minidumps

One more interesting tidbit – you can set windows up to allow you to crash it at will – That’s a topic for another article.

———–

Checking out your first crash dump file:
Start WinDbg
(the first time you do this it takes a while as it downloads the symbols)
File->Open Crash Dump…
Find your crash dump file.
watch the output…

If you’re lucky, You’ll see a line such as:
Probably caused by: filename.ext

Many times, this first step of opening the crash dump tells you what you need to know.

Sometimes it doesn’t and you want to look a little deeper.

The next thing to try is often
!analyze -v

think of the debugger as a CMD window – you won’t find !analyze -v in the menus, but you can type it in at the > prompt.
(You can also click it if you see it in the display)

 If this doesn’t work the options get a little tricker…

In my next post, I’ll show a few hand picked commands that let you see what was running.

Getting started with Debugging Part1: Setting up the Debugger and Symbols

Overview:

   This article will show you what you need to read into a windows crash dump file…

   What you’ll need:

  • Debugging tools for windows
  • Symbol files

  Download Debugging tools for windows –
  Rather than including a link, I recommend searching for ‘debugging tools for windows’
  You should find a bunch of links on a Microsoft site to download the latest version.

    What to download?

  • if your OS is 32bit, download the x86 version
  • if your OS is 64 bit, download Both the x86 and x64 versions. (the reason for this is that you’ll use the 32 bit debugger to debug 32bit crash dumps from other machines, and also 32bit apps running on your 64 bit machine. – also note, there are 2 64 bit verisons on Microsoft’s website – 99% of us want x64, not Itanium)

    I assume you can downl0ad the 1 or 2 debuggers you’ll need, Go ahead and run the setup for each and install them to thier default locations.
We’re not quite ready to do anything with the debuggers yet, first we need to discuss Symbol Files…

Symbol files:
      You’ll want symbol files when you look at a crash dump or debug an app.

 

     Symbol files are tied to each piece of software – Ideally you’ll have them for everything on your system.

     Unforunately, that’s rarely possible. The good news is you can get them for Windows, and that’s often enough.

     In the old days, you’d download the symbols you think you’d need from Microsoft and install them on your machine.

     That’s no longer necessary. The current Debugging tools for windows supports auto downloading symbol files from microsoft as needed.
Unfortunately, the debugging tools don’t work that way out of the box, so that’ll be the first thing we get setup…

  Setting up windows, so your debugger knows what to do about symbol files
  It’s a shame this isn’t default behavior, but at least it’s not that hard…  I’ll show you how to configure an environment variable in windows, which the debugger will use automatically each time it runs. You don’t have to do this, you can still run the debugger without doing this, or you can run the debugger and then tell it manually about the symbolfiles, but you’re better off doing the environment variable thing now – get it out of the way so you don’t have to worry about it later…

  Setup the Environment Variable _NT_SYMBOL_PATH 
  Set it to SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols

  To do this, in windows, right click on ‘my computer’ or ‘computer’ and click ‘properties’.  Earlier versions of windows show a nice tab dialog, later versions of windows (Vista, 2008, 7…) show a fancy screen also known as the ‘system’ control panel – if this iswhat you see, then click on ‘Advanced System Settings’. Now you should see what your XP friends saw 2 sentences ago- the “System properties” dialog – click on the ‘advanced’ tab, then on the ‘environment variables’ button.

 Add a new system variable and name it _NT_SYMBOL_PATH (note the text begins with the underscore) 
  Set it to SRV*c:\websymbols*http://msdl.microsoft.com/download/symbols

 Notice in the line above there’s some references to the directory c:\mysymbols – We need to create that directory now. (If you want it somewhere else, that’s fine, just be sure to change it in _NT_SYMBOL_PATH.

The other bit of interest is that link to microsoft’s symbol website..

Basically what we’ve told the debugger is:

  1. Look for symbol files in c:\mysymbols
  2. If you can’t find them, look for them at the website http://msdl.microsoft.com/download/symbols

If you didn’t create the c:\mysymbols directory yet, do so now…

If you have 2 debuggers installed (x86 and x64) you only need to do the above once.

Congratulations! You’re all setup.

Closing Comments:

The easiest thing to forget here is likely the environment variable _NT_SYMBOL_PATH and what to point it to.  Fortunately, this is actually pretty easy information to find in the help file.
After installing the debugging tools for windows, Open the help file, click the ‘index’ tab, then enter the word ‘env’ (you can type out environment variables if you want, but it finds them after env)

Environment variables brings up 2 sections, General and Kernel-Mode – you want General. The page that appears shows all the _NT_YADA_YADA_YADA variables. NT_SYMBOL_PATH is the 4th one down.
You have to click one more time to find out what to set it to, in the description there’s a link to ‘Symbol Path’ – click that and get a page talking about he symbol path – down towards the bottom in red, is the symbol path you need.

In my next part, I’ll show how to open a crash dump file and a few easy commands you can use before you go searching google for that long hex code you wrote down by hand when your system blue screened.

iPhone Stuff

turn your iPhone into an SPL meter with ‘Studio Six Digital’s’ applications.

Software to use your iPhone as a wifi hotspot: http://www.junefabrics.com/iphone/index.php

http://sciphoneapps.com

An alternate to browsing software in itunes: http://www.appshopper.com

http://www.iphoneappstore.us

http://www.jaadurdp.com

An app to get email alerts on your iPhone: http://www.intelliborn.com (look for myProfiles)

Free Images

Websites are pretty booring without images of some sort. Professionals pay big money for world-class photos and illustrations. For the rest of us, searching google images is often the first place we look – however there is little guarantee that the images we find are ok to use.

Here are some links to various sites I’ve found that promise free photos, and by free, I mean free to download + Free to use*

* = within the intended use – for example, many pictures are free if you intend to put them on your website, so long as you credit the author, while almost no images are free if you intend to pack up a bunch of images and sell an image collection…

Sites that offer some free images:
Some of these grabbed from the awesome book: “How to Cheat in PhotoShop CS4”
Stockxchng (http://www.sxc.hu)
MorgueFile (http://www.morguefile.com)
Mayang textures (http://www.mayang.com/textures)

US Government public domain images:
Space images  (http://www.nasa.gov)
Skies and Nature: (http://www.photolib.noaa.gov)
Military (http://www.defenselink.mil/photos/)

Awesome Book: How to Cheat in PhotoShop CS4

I picked up this amazing book called “How to Cheat in PhotoShop CS4”.

Over 400 high quality full color pages, plus a great DVD filled with videos on many of the techniques, as well as starting files if you wish to follow along.

Best thing is, unlike your typical $60 programming book, this one is $45 list, I bought mine at a Borders near my house for under $30 with one of those coupons they email out all the time.

Highly recommended!

Trade your old Video Games

Those old video games have plenty of value – to someone.

Here are some options for getting rid of them:

Ebay
Amazon
Craigslist
Gamestop

Another option is to use a game swap site – you list your available games, and someone tells you to send it to them, you then send it away for no money, but get ‘credits’ you can use at the swap site to use to ask someone to send you thier games. A friend of mine told me about Goozex.com

Personally, I prefer my the US Dollar as a currency over swap credits, but I’m sure each method has it’s benefits.

Ebay is your best bet for newer games -you can often get $45 for a used $60 game, so long as its pretty new.

Gamestop will rape you in all cases, but sometimes it’s such an easy option you just don’t care. Gamestop is great if you want to trade in 20 somewhat old games and get 1 somewhat new game.

When a used game is only worth a few dollars, goozex might make sense – it’s not worth selling a game for $ on ebay – there are too many fees. Gamestop will give you a quarter for it – which doesn’t cover your gas to get to the store. Goozex could be the ticket for swapping one old game for another.

SSW rules to better…

An interesting list of ‘rules’ from a consulting company out of Austrailia.

While you might not agree with every rule, there are a lot of good ones, and I admire them for writing it all down – very smart for a consulting organization to have all this documented, then ask that each consultant follow the guidelines.

http://www.ssw.com.au/ssw/Standards/Default.aspx?