I've eliminated all of the points of failure except one. In the rare event that the SD card fills up, chdkptp.exe crashes. More specifically, the visual studio debugger asks if I want to use it to debug it. The only remedy is to remove the card and delete the SD card media using my computer. Any idea what correlates the SD card filling up with chdkptp.exe crashing?
No. chdkptp doesn't know anything at all about the remaining space on the card, or depend on writing files to the camera, so if that correlation actually exists, it's most likely due to something going wrong on the camera which eventually cascades back to chdkptp.
You can get the free space (in KB) from the camera, using
=return get_free_disk_space()
so you could theoretically detect before the card fills up and take some action.
I did fix one crash bug that would sometimes occur if the camera went away a while back:
http://trac.assembla.com/chdkptp/changeset/147/trunkwarning: The chdkptp lua API and supporting lua libs have changed a LOT since the builds discussed earlier in this thread. If you are using ! commands from old builds, they might not work any more.
If you build with debug and run chdkptp in gdb, that could help find the source of the crash.