Forgive me, I always post which camera do I have and this time I forgot.SX130ISFirmware 1.01cI use CHDK trunk #1527Yes, it's defined:#define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1I don't remember, wheter not modular CHDK caused such crash, maybe I never noticed that. But now it's everytime I go to the menu too fast (CHDK teaches me patience now!).EDITPS - I saw this thread: http://chdk.setepontos.com/index.php?topic=265.0 - should I post such things there rather? I don't like to make a mess in forum.
Ok, here it is. I had to recompile the source to avoid cleaning core. But it was from the same, unchanged source as previous log.
Quote from: outslider on 05 / January / 2012, 19:48:05Ok, here it is. I had to recompile the source to avoid cleaning core. But it was from the same, unchanged source as previous log.Thanks, an initial look would seem it is crashing in 'opendir'; but with the same 'fsionotify' type problem as we had with 'open'.I'll examine the 'opendir' function in the firmware later tonight to see if there is a workaround like we used for 'open'.
Quote from: philmoz on 05 / January / 2012, 20:44:32Quote from: outslider on 05 / January / 2012, 19:48:05Ok, here it is. I had to recompile the source to avoid cleaning core. But it was from the same, unchanged source as previous log.Thanks, an initial look would seem it is crashing in 'opendir'; but with the same 'fsionotify' type problem as we had with 'open'.I'll examine the 'opendir' function in the firmware later tonight to see if there is a workaround like we used for 'open'.I've noticed intermittent "ASSERT!! FsIoNotify.c Line 451" startup crashes on D10 with the module build, even with strartup crash fix enabled.opendir uses Open under the hood.
Which effectively rules out having the 'Modules' menu built dynamically at startup by processing all the .flt files in the CHDK/Modules directory. Unless a reliable fix can be found for this.
Might be better to populate it on open, keeping startup time down would be good anyway. A little delay in the menu coming up should tolerable, especially if it's just the first time.
Another approach would be to add the variable that tracks how many slots are available to the sig finder, and make a function that sleeps until there are sufficient slots available. If you can do what you need to do without yielding, the canon firmware shouldn't come along and hit the same assert.
int fd = open(name, O_RDONLY, 0777); if ( fd <= 0 ) return 0; close(fd);
Based on your information I make some experiments.I found how to fix problem on my S95. But have no idea why it works. Test enviroment #1 - just right as it was now. It always crash if try to popup menu first time while led blinking right after shoot with built-in RAW.Test enviroment #2 - move gui_module_menu_load() back to gui_init() to crash on startup but avoid influence of how my finger speed.Max valuable depth of MODULE dir is I:\CHDK\MODULES\GAMES\NEW\DEEP\TEST\ depth (depth could have matter because currently module_menu recursively open each of this dir without closing previous. Probably this should be rewrited, this probably increasy slightly memory fragmentation but decrease risk to exhaust resources).Results: Enviroment #1 - crash always before, crash never afterEnviroment #2 - crash with 80% chance with my current SD content, crash never after fix.How did I fix.Code below is added in the begining of safe_opendir(). This function is only valid way to use opendir inside module. So this will work for all other modules too.Code: [Select] int fd = open(name, O_RDONLY, 0777); if ( fd <= 0 ) return 0; close(fd);UPD: forget to say. Module menu successfully resolve modules in path above. So looks like this fix not just return fail but wait until resources become available.
Your 'fix' is only masking the problem by changing the timing.
As discussed in this thread http://chdk.setepontos.com/index.php?topic=6179.0, the problem happens when CHDK and the Canon firmware are both opening and closing files at the same time.
So your fix might work at the moment on your camera; but there is no guarantee it will work on any others, or that it will always work on yours. For example, the number of images on the card affects the startup timing and thus the chance of the problem occurring.
The other issue that needs clarification is the 32 character path length limit on some cameras.This limit means that you cannot open a file or directory where the path name + file name is more than 32 characters. So for example A/CHDK/MODULES/mastmind.flt will work (27 chars); but A/CHDK/MODULES/GAMES/mastmind.flt will fail (33 chars).
Started by DataGhost
« 1 2 ... 14 15 »
Started by philmoz
« 1 2 3 »
General Discussion and Assistance
Started by koshy
General Discussion and Assistance
Started by kurtdc30
Started by TimPeTwo