get_tick_count overflow after 24 days - page 3 - Script Writing - CHDK Forum

get_tick_count overflow after 24 days

  • 60 Replies
  • 20178 Views
*

Offline Mlapse

  • *****
  • 584
  • S95 S110
Re: get_tick_count overflow after 24 days
« Reply #20 on: 20 / April / 2019, 13:53:02 »
Advertisements
7000 should already do the trick. if it is not about the number of pictures, could it have to do with the size of the logfile?
« Last Edit: 20 / April / 2019, 13:56:32 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14125
Re: get_tick_count overflow after 24 days
« Reply #21 on: 20 / April / 2019, 15:44:01 »
7000 should already do the trick. if it is not about the number of pictures, could it have to do with the size of the logfile?
IMO no. It's extremely unlikely Canon firmware care about a log file outside of DCIM.

Some guesses would be it has something to with how the shutdown / reboot is done, or what the script tries to do after startup before indexing is complete, or some interaction between CHDK and the indexing process.

In my case it was using rawopint, the camera would have been powered down by  post_levent_to_ui("PressPowerButton") and then powered on with a physical press.

CHDK reboot doesn't really do a full normal shutdown.

Does your script switch to playback before doing the reboot?
If so, is there a wait after switching playback before rebooting?
When the camera starts again, is there a wait before trying to switch to rec and start shooting again?

I agree that it would be nice if the camera could just run without rebooting, but I'm quite doubtful that the Canon tests there firmware for > 24 day run time, so it so it's seems hard to have confidence it will work correctly. OTOH, CHDK reboot has its own issues, so pick you poison ;)
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 584
  • S95 S110
Re: get_tick_count overflow after 24 days
« Reply #22 on: 20 / April / 2019, 15:57:50 »
It is in Ultimate Intervalometer that I set the reboot.
It moves to play mode before reboot, waterwingz would know better what exacly happens.
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14125
Re: get_tick_count overflow after 24 days
« Reply #23 on: 20 / April / 2019, 19:33:29 »
Experimenting a bit using rawopint on elph130:

With a total of ~5000 images on the card, the activity LED blinked for ~40 seconds on startup. Shutting down and starting again without shooting any additional pics, it blinked for ~10s.

The camera appears to do something similar on the switch from rec to play, hence my earlier mention of waiting between switching to playback and rebooting.

Earlier, with ~2k images on the camera, I tried switching to rec (manually, not from script)  while the light was blinking, and didn't see any problem.

edit:
With 8300 images, it took almost a minute on the first boot, and  ~10s power cycling again.
Switching to rec, shooting one shot, switching to play, there was another ~10s of blinking. Power cycling after that also blinked for about 10s.
« Last Edit: 20 / April / 2019, 21:34:47 by reyalp »
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 584
  • S95 S110
Re: get_tick_count overflow after 24 days
« Reply #24 on: 21 / April / 2019, 01:34:24 »
if you cannot reproduce that problem, there is none....
i will test some in the next days to see if i can narrow it down some more.
frustration is a key ingredient in progress

*

Offline c_joerg

  • *****
  • 1251
Re: get_tick_count overflow after 24 days
« Reply #25 on: 21 / April / 2019, 08:14:01 »
With a total of ~5000 images on the card, the activity LED blinked for ~40 seconds on startup.

My M3 and G1x need 30s at 2000 RAW images. Probably it seems a long time, if you wait for it.
In the G1x, everything is blocked during this time. With the M3 you hardly notice any restrictions during this time.

Has anyone ever tested what happens if you set the date to 2038 (Y2K38) ?  ;)
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 14125
Re: get_tick_count overflow after 24 days
« Reply #26 on: 21 / April / 2019, 15:54:49 »
if you cannot reproduce that problem, there is none....
To be clear, I don't disbelieve your report. My tests were mainly trying to understand the "normal" behavior of the firmware, without involving CHDK reboot or scripts doing stuff at startup. As c_joerg notes, model specific differences are also to be expected.

This indexing is all somehow connected to the the DCIM/CANONMSC/Mnnnn*.CTG files and metactg task. I'm not really clear how this system works, and don't recall anyone reversing it much. I looked into some related issues in https://chdk.setepontos.com/index.php?topic=11481.msg115202#msg115202.

My suspicion is that the long blinking after the switching to play or first boot after shooting builds the CTG files, and after the CTG files are built, subsequent boots will spend much less time time on it. So maybe, if the reboot sequence was switch to play, wait for > 1 minute, reboot the delay on boot up would be avoided. Unfortunately, we don't currently have an way to know when indexing is complete.

FWIW, the CTG file names appear to correspond to folder names, and are ~40 KB for a full folder (on elph130, at least)
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 584
  • S95 S110
Re: get_tick_count overflow after 24 days
« Reply #27 on: 21 / April / 2019, 16:38:22 »
to me it is not really relevant...

one of the reasons is that i have trouble setting zoom+focus@infinity reliable in UI (on my s95's and a480/a490's), the camera keeps zooming and focussing before/during each shot if i set them both.
leading to small differences in barrel distortion and actual zoom length
if I only use focus@infinity it seems not to refocus before each shot, but that might be inaudable.

the result is that i use the manual zoom to set it before i start shooting.
since the manual zoom setting in canon's firmware is only maintained if you power down and up in shooting mode, not when you switch to play and power down/up.
so a reboot via play does not work for my projects.
« Last Edit: 21 / April / 2019, 16:47:47 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14125
Re: get_tick_count overflow after 24 days
« Reply #28 on: 21 / April / 2019, 17:19:55 »
to me it is not really relevant...
...
the result is that i use the manual zoom to set it before i start shooting.
since the manual zoom setting in canon's firmware is only maintained if you power down and up in shooting mode, not when you switch to play and power down/up.
so a reboot via play does not work for my projects.
Sure, as so often is the case, we have multiple sub-optimal options
1) Reboot, with all the effects / downsides mentioned
2) Run the firmware past tick counter going negative, with issues in CHDK script and likely the firmware, difficult to test without actually running for months.

So my aim is to give users the information decide what is best for their particular situation, and work around issues where we can.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1251
Re: get_tick_count overflow after 24 days
« Reply #29 on: 22 / April / 2019, 02:30:41 »
So my aim is to give users the information decide what is best for their particular situation, and work around issues where we can.

If I think about really long periods, then an M3 / M10 with a manual lens would probably be the simplest solution. Because of a reboot the zoom and focus would not move. I find the method described here very interesting:
https://chdk.setepontos.com/index.php?topic=12542.msg137151%20-%20msg137151
The question is what happens after 24 days…
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

 

Related Topics


SimplePortal © 2008-2014, SimplePortal