reboot() problem - page 4 - General Discussion and Assistance - CHDK Forum

reboot() problem

  • 43 Replies
  • 17980 Views
Re: reboot() problem
« Reply #30 on: 27 / November / 2014, 23:23:46 »
Advertisements
Had a look at the module handling code and I think I know where it might be failing (module pointer set to 0 during module load, if task switch occurs it can call module function through null pointer). I don't have a camera handy at the moment so if you can test the attached patch that would be a big help.
I don't think it made any difference.  Maybe a little ?  Sorry.

With my new gps flt module code, I can edit main.c (spytask) to cause the gps module to be load every 100 mSec (and then automatically unloaded).   I can see it loading and unloading by hammering on the Func/Set key while the Module Inspector is running.

Things work for a while (sometime I enable/disable RAW to spice things up) but eventually the camera will hang when I try to run the Module Inspector.

Might be something borked with the new gps code but what I'm doing is pretty simple :

Code: [Select]
        if ( --gps_delay_timer == 0 )
        {
            gps_delay_timer = 5 ; // 50 ;
            //if ( gps_state != (int)conf.gps_on_off )
            {
                gps_state = (int)conf.gps_on_off ;
                libgps->init_gps_startup(!gps_state) ;
            }
        }
« Last Edit: 27 / November / 2014, 23:25:47 by waterwingz »
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: reboot() problem
« Reply #31 on: 28 / November / 2014, 00:16:46 »
Had a look at the module handling code and I think I know where it might be failing (module pointer set to 0 during module load, if task switch occurs it can call module function through null pointer). I don't have a camera handy at the moment so if you can test the attached patch that would be a big help.
I don't think it made any difference.  Maybe a little ?  Sorry.

With my new gps flt module code, I can edit main.c (spytask) to cause the gps module to be load every 100 mSec (and then automatically unloaded).   I can see it loading and unloading by hammering on the Func/Set key while the Module Inspector is running.

Things work for a while (sometime I enable/disable RAW to spice things up) but eventually the camera will hang when I try to run the Module Inspector.

Might be something borked with the new gps code but what I'm doing is pretty simple :

Code: [Select]
        if ( --gps_delay_timer == 0 )
        {
            gps_delay_timer = 5 ; // 50 ;
            //if ( gps_state != (int)conf.gps_on_off )
            {
                gps_state = (int)conf.gps_on_off ;
                libgps->init_gps_startup(!gps_state) ;
            }
        }

Ok, probably a different issue than the one timgor is seeing :(

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)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: reboot() problem
« Reply #32 on: 28 / November / 2014, 00:17:49 »
There is a sample script that produces the crash.
The CHDK as well as the script are auto started.

Can you try the patch I posted here please.
http://chdk.setepontos.com/index.php?topic=12098.msg118671#msg118671

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)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline timgor

  • ***
  • 150
Re: reboot() problem
« Reply #33 on: 28 / November / 2014, 17:31:07 »
Quote
Can you try the patch I posted here please.
http://chdk.setepontos.com/index.php?topic=12098.msg118671#msg118671
Can you please tell me how to apply this mod_fix.diff file?
Code: [Select]
patch module_load.c < mod_fix.diff
will change the module_load.c file and then I should recompile with the new module_load.c file?
« Last Edit: 28 / November / 2014, 17:37:27 by timgor »

*

Offline srsa_4c

  • ******
  • 4451
Re: reboot() problem
« Reply #34 on: 28 / November / 2014, 17:47:54 »
Code: [Select]
patch module_load.c < mod_fix.diff
will change the module_load.c file and then I should recompile with the new module_load.c file?
Yes. You'll probably need to use the -p option of patch too.

Re: reboot() problem
« Reply #35 on: 28 / November / 2014, 18:21:01 »
Code: [Select]
patch module_load.c < mod_fix.diff
will change the module_load.c file and then I should recompile with the new module_load.c file?
Yes. You'll probably need to use the -p option of patch too.
If you are in the base CHDK directory (the one with bin, core, modules, include, CHDK, tools ..etc) then just type
Code: [Select]
patch -p0 < mod_fix.diff
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline timgor

  • ***
  • 150
Re: reboot() problem
« Reply #36 on: 29 / November / 2014, 12:37:12 »
Quote
Can you try the patch I posted here please.
http://chdk.setepontos.com/index.php?topic=12098.msg118671#msg118671
The script has been working for 15 hours and still working now.
The previous version usually crashed after 100 times (2-3 hours of work). I estimate that the new patched version fixed the problem with probability of 95% :) at this moment. I will continue to test the new modified CHDK using different modifications and parameters.

*

Offline timgor

  • ***
  • 150
Re: reboot() problem
« Reply #37 on: 01 / December / 2014, 11:20:31 »
There is no crash anymore. I see that you already committed the change in 3759 version. Thanks.

*

Offline timgor

  • ***
  • 150
Re: reboot() problem
« Reply #38 on: 04 / December / 2014, 14:04:39 »
Ha-ha-ha,
It's time to pay attention to reboot() function again.
My camera stuck after about 1000 reboots. Today morning I found my camera in a shutdown position, lens was in.
Romlog file didn't give any information about it (it still dumps romlog from my old November crashes).
Do you have idea how to track the crash?
Would you propose some tests for me to do?
From my side I can only insert flags in the C file and run it.

Re: reboot() problem
« Reply #39 on: 04 / December / 2014, 20:38:10 »
My camera stuck after about 1000 reboots. Today morning I found my camera in a shutdown position, lens was in.
Romlog file didn't give any information about it (it still dumps romlog from my old November crashes).
If the camera can do 1000 reboots successfully,  then tracking any crash is going to be really hard.  Especially when the camera did not seem to "crash" either (no romlog, lens closed). Could it have been anything else (power fail, user error, something?)
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics


SimplePortal © 2008-2014, SimplePortal