reboot() problem

  • 43 Replies
  • 3860 Views
*

Offline timgor

  • ***
  • 150
reboot() problem
« on: 24 / November / 2014, 13:53:42 »
Advertisements
The reboot() function works fine but sometimes it crashes (works like shut_down). I attached romlog.
Does somebody have idea how to fix it?
Camera: A1400

Re: reboot() problem
« Reply #1 on: 24 / November / 2014, 15:19:39 »
Our old friend FsIoNotify.c again (from your ROMLOG.LOG file). 

Used to happen a lot on SD cards with lots of image files - the more the number of image files, the more common the crash on startup.

Lot's of discussion about this in the forum - search on it.

http://chdk.setepontos.com/index.php?topic=6179.msg111761#msg111761
http://chdk.setepontos.com/index.php?topic=11184.msg110128#msg110128
http://chdk.setepontos.com/index.php?topic=847.msg79423#msg79423

etc etc etc

There is a work around that seems to work for some cameras (add to platform_camera.h) :

Code: [Select]
#define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1  // enable workaround for camera crash at startup when opening the conf / font filesand it's not there for the A1400.

I know there has been a lot of work recently on file open type stuff - maybe that will help?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline philmoz

  • *****
  • 3060
    • Photos
Re: reboot() problem
« Reply #2 on: 24 / November / 2014, 16:06:25 »
Our old friend FsIoNotify.c again (from your ROMLOG.LOG file). 

Used to happen a lot on SD cards with lots of image files - the more the number of image files, the more common the crash on startup.

Lot's of discussion about this in the forum - search on it.

http://chdk.setepontos.com/index.php?topic=6179.msg111761#msg111761
http://chdk.setepontos.com/index.php?topic=11184.msg110128#msg110128
http://chdk.setepontos.com/index.php?topic=847.msg79423#msg79423

etc etc etc

There is a work around that seems to work for some cameras (add to platform_camera.h) :

Code: [Select]
#define CAM_STARTUP_CRASH_FILE_OPEN_FIX 1  // enable workaround for camera crash at startup when opening the conf / font filesand it's not there for the A1400.

I know there has been a lot of work recently on file open type stuff - maybe that will help?

CAM_STARTUP_CRASH_FILE_OPEN_FIX is automatically set for all DryOS cameras in camera.h - so that is not likely to help.

Using 1.3 might be better, the file IO semaphore changes should fix it.

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)

*

Offline timgor

  • ***
  • 150
Re: reboot() problem
« Reply #3 on: 24 / November / 2014, 16:19:31 »
Thanks for your replies. Will try it. Just one more question.
Does it correspond to the reboot() function only or to the normal "manual button" start too?


Re: reboot() problem
« Reply #4 on: 24 / November / 2014, 16:22:53 »
Does it correspond to the reboot() function only or to the normal "manual button" start too?
When I had issues (a couple of years ago with my SD940)  it happened randomly in both cases.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline srsa_4c

  • ******
  • 3538
Re: reboot() problem
« Reply #5 on: 24 / November / 2014, 16:23:28 »
CAM_STARTUP_CRASH_FILE_OPEN_FIX is automatically set for all DryOS cameras in camera.h - so that is not likely to help.
This used to enable the _Open() -> _open() replacement in platform/generic/wrappers.c, but it's commented out in current trunk.

Quote
Using 1.3 might be better, the file IO semaphore changes should fix it.
The a1400 is only supported in 1.3.

If this is a recent build, then this assert should not happen: the call to _Open() is protected with fileio_semaphore. The assert comes from a subroutine called by the firmware's Open function.

I'd recommend creating a custom build and keeping main.bin.dump, that would later allow us to find out which open call caused the problem.

@timgor
The romlog shows that the assert happened _after_ the camera restarted (within 2 seconds).
Which build are you currently using?

*

Offline timgor

  • ***
  • 150
Re: reboot() problem
« Reply #6 on: 24 / November / 2014, 16:36:11 »
Quote
The romlog shows that the assert happened _after_ the camera restarted (within 2 seconds).
Which build are you currently using?
i use 1.3 but build before 3409 change.

*

Offline srsa_4c

  • ******
  • 3538
Re: reboot() problem
« Reply #7 on: 24 / November / 2014, 18:05:40 »
i use 1.3 but build before 3409 change.
I'd recommend upgrading to a recent release.


*

Offline timgor

  • ***
  • 150
Re: reboot() problem
« Reply #8 on: 25 / November / 2014, 09:52:25 »
There is an issue about the recent version 7353 that I build yesterday.  I cannot start the script automatically upon the camera start. The camera shows logo and I then need to press alt and shutter to run the script while I have a auto start script setting. Do you want me to investigate since what version it  happened or you know why did it happen?

Re: reboot() problem
« Reply #9 on: 25 / November / 2014, 10:16:22 »
There is an issue about the recent version 7353 that I build yesterday.  I cannot start the script automatically upon the camera start. The camera shows logo and I then need to press alt and shutter to run the script while I have a auto start script setting. Do you want me to investigate since what version it  happened or you know why did it happen?
I'm using 1.3.0 rev 3753 and script autostart works properly.

I think there are a couple of simple things to check?

 Are you completely rebuilding all modules and everything else?  Do you install everything on your SD card or just diskboot.bin ? 

Did you try the "Reset Options to Default..." in the CHDK Setting menu?
Ported :   A1200    SD940   G10    Powershot N    G16

 

Related Topics