The solution isn't a complete fix - if I stop the video recording by pressing 'Set', the start another one (without stopping the script) I get the same crash.
So I need to add the half press stuff inside the is_pressed("set") condition? Or maybe reassert the half press after each time we stop recording?
Making me a little nervous about cameras with video buttons here - I'll go see if "my" sx50 has returned home for its day of birding.
Update : sx50 is happy with the changes - although it gets "unhappy" if you try to press("video") when the mode dial is not set to video mode. This works when CHDK is not loaded - I guess for now the warning about not being in video mode applies.
On the G12, releasing AE lock and re-doing the shoot_half between videos stops the crash.
My hacked up version attached.
Next problem - on the G1X the camera crashes when the script ends after the AE unlock
Edit: SX40 mostly works (start, stop, adjust exposure); but crashes if ISO set above 1250.
Edit2: After hacking in support for 'press("video")' for the IXUS310, the script works; but has the same problem as the G1X - crashes on exit after releasing the AE lock.
Phil.
After more testing I found the SX40 also crashed on exit after releasing AE lock.
However I've made some progress on fixing this.
Adding
call_event_proc("TerminateAdjustmentSystem")
to the restore() function before calling set_aelock(0) stops the G1X and SX40 from crashing (IXUS310 still crashes a lot).
This still works on the G12 (which did not have the exit crash) - interested to see if it has any effect on other cameras.
Updated script (v3.4) attached, this also gets the initial Tv, Av & Sv values at startup and restores them on exit.
Phil.