Ultimate Intervalometer - intermittent reboot faiure (powershot D10) - page 7 - Completed and Working Scripts - CHDK Forum

Ultimate Intervalometer - intermittent reboot faiure (powershot D10)

  • 63 Replies
  • 15250 Views
*

Offline reyalp

  • ******
  • 12732
Re: Ultimate Intervalometer - intermittent reboot faiure (powershot D10)
« Reply #60 on: 24 / February / 2014, 01:23:55 »
Advertisements
It happens when one task calls Close; but gets interrupted in the Close call, and another task then calls Open.

The call to Close, calls 'close' then later calls an FsNotify function to remove the closed file from the list.

When a task switch happens between these calls, the new task calls Open.
Open then calls 'open' and gets back the file handle from the previous call to 'close'.
Open then tries to call the FsNotify function to add the file handle to the list; but it is already there so it asserts.
OK, that makes sense (except the part where Canon didn't protect it with a semaphore or something...) Though it's surprising how reproducible it is with the autostart once script.

Quote
In all likelihood switching to always using 'open' in CHDK (even for writing files) would probably work and eliminate more instances of the problem - we don't use whatever the FsNotify code is doing.
It seems like this would be reasonable to try in the trunk for a while.
Don't forget what the H stands for.

Re: Ultimate Intervalometer - intermittent reboot faiure (powershot D10)
« Reply #61 on: 24 / February / 2014, 03:58:14 »
I recently finished my 50 camera rig with the possibility to download crash dumps. If I can help testing something please tell me.

Re: Ultimate Intervalometer - intermittent reboot faiure (powershot D10)
« Reply #62 on: 24 / February / 2014, 07:37:00 »
This was what was discovered for the startup crash fix, and the fix was to call 'open' for files being read at startup instead of Open. In all likelihood switching to always using 'open' in CHDK (even for writing files) would probably work and eliminate more instances of the problem - we don't use whatever the FsNotify code is doing.
Does this mean that

Code: [Select]
    #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 can be removed from platform_camera.h files?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3177
    • Photos
Re: Ultimate Intervalometer - intermittent reboot faiure (powershot D10)
« Reply #63 on: 24 / February / 2014, 13:39:31 »
This was what was discovered for the startup crash fix, and the fix was to call 'open' for files being read at startup instead of Open. In all likelihood switching to always using 'open' in CHDK (even for writing files) would probably work and eliminate more instances of the problem - we don't use whatever the FsNotify code is doing.
Does this mean that

Code: [Select]
    #define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1 can be removed from platform_camera.h files?

If we replace the call to '_Open' with '_open' unconditionally in wrappers.c, then it could be removed.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)


 

Related Topics