get_tick_count overflow after 24 days - page 2 - Script Writing - CHDK Forum supplierdeeply

get_tick_count overflow after 24 days

  • 60 Replies
  • 16878 Views
*

Offline c_joerg

  • *****
  • 1248
Re: get_tick_count overflow after 24 days
« Reply #10 on: 18 / April / 2019, 16:23:16 »
Advertisements
Are you sure that all parts of the script can cope with negative tick count?
To 99.99% yes.
I still have a second logfile that logs every call...


Update:
edit:
If it's not the script, then the firmware's UI timer routines are failing. This would probably have other signs on the camera UI (could affect drawings that blink or move).
I did not notice other things...
« Last Edit: 18 / April / 2019, 16:26:08 by c_joerg »
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 srsa_4c

  • ******
  • 4451
Re: get_tick_count overflow after 24 days
« Reply #11 on: 18 / April / 2019, 16:40:30 »
I did not notice other things...
Do you happen to know whether the lens waited 60 seconds before it retracted, or it retracted immediately after the rec->play transition? In the negative tick case, of course.

*

Offline reyalp

  • ******
  • 14080
Re: get_tick_count overflow after 24 days
« Reply #12 on: 18 / April / 2019, 16:51:05 »
FWIW, to verify the script handles the tick count going negative, you could just re-define get_tick_count in lua. Something like
Code: [Select]
orig_get_tick_count=get_tick_count
function get_tick_count()
 return -orig_get_tick_count()
end
That obviously won't affect CHDK C code or firmware functions.

Still, my suggestion would be to just reboot before 24 days.
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1248
Re: get_tick_count overflow after 24 days
« Reply #13 on: 18 / April / 2019, 17:51:51 »
Do you happen to know whether the lens waited 60 seconds before it retracted, or it retracted immediately after the rec->play transition? In the negative tick case, of course.
I'm not 100% sure anymore but I think it started immediately.
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 Mlapse

  • *****
  • 583
  • S95 S110
Re: get_tick_count overflow after 24 days
« Reply #14 on: 19 / April / 2019, 12:15:00 »
Quote
Still, my suggestion would be to just reboot before 24 days.

if rebooting could be avoided after 24 days that would improve possibilitys.

first thing with a reboot is that it goes via the play function, hence cancelling manual settings to the cam when it's rebooted.

the second thing you can run into is that if there are already a lot of pictures on the sd card rebooting via play will take a long time (in play all pictures are indexed again: indexing speed is something like 2000-3000 pics per minute)
and when that takes too long the reboot will fail.
« Last Edit: 19 / April / 2019, 12:30:15 by Mlapse »
frustration is a key ingredient in progress

*

Offline c_joerg

  • *****
  • 1248
Re: get_tick_count overflow after 24 days
« Reply #15 on: 20 / April / 2019, 07:30:11 »
Still, my suggestion would be to just reboot before 24 days.

If possible, I would always avoid a reboot. Especially when shooting at close range, it is always difficult to set the focus correctly. I do not think that works reliably with set_focus.

the second thing you can run into is that if there are already a lot of pictures on the sd card rebooting via play will take a long time (in play all pictures are indexed again: indexing speed is something like 2000-3000 pics per minute)
I do not have this problem because I change to record mode after each shoot. If we talk about times of > 24 days, then that should always be possible.
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 srsa_4c

  • ******
  • 4451
Re: get_tick_count overflow after 24 days
« Reply #16 on: 20 / April / 2019, 07:42:59 »
Do you happen to know whether the lens waited 60 seconds before it retracted, or it retracted immediately after the rec->play transition? In the negative tick case, of course.
I'm not 100% sure anymore but I think it started immediately.
If that really is what happened, that would mean
the firmware's UI timer routines are failing
... and other problems may arise.
the second thing you can run into is that if there are already a lot of pictures on the sd card rebooting via play will take a long time (in play all pictures are indexed again: indexing speed is something like 2000-3000 pics per minute)
and when that takes too long the reboot will fail.
Fail how?
When there are many pictures on card, you can still switch to rec mode without waiting for indexing to complete. One thing that could really fail with thousands of pictures is USB connection.

edit:
My ixus115 completes indexing of 996 pictures in 2-3 seconds, on a not particularly fast card.
« Last Edit: 20 / April / 2019, 07:48:28 by srsa_4c »

*

Offline c_joerg

  • *****
  • 1248
Re: get_tick_count overflow after 24 days
« Reply #17 on: 20 / April / 2019, 08:04:34 »
My ixus115 completes indexing of 996 pictures in 2-3 seconds, on a not particularly fast card.

I have not measured it yet but it takes with my G1x at 2000 shots more than a minute. However, I only shoot in RAW. Maybe that makes the difference.

and other problems may arise.

The problem would have to be with a camera (DSLR), which is triggered by an external timer for weeks as well or?
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 Mlapse

  • *****
  • 583
  • S95 S110
Re: get_tick_count overflow after 24 days
« Reply #18 on: 20 / April / 2019, 08:06:25 »
Quote
Fail how?
When there are many pictures on card, you can still switch to rec mode without waiting for indexing to complete. One thing that could really fail with thousands of pictures is USB connection.

I am referring to my S95, because I have most experience with that one. But I have encountered this problem with my other cams too.
My SD cards are all class 10 or better. it does not matter if the shots are raw or jpg, it is about the number of shots on your card.
Let's say i'll make 1500 shots a day and reboot every day.
First day's will work just fine, but after some (i do not have an exact number/number of pictures) 5000 pictures it does not complete the reboot and looks completely dead.
pressing the on/off results in the cam booting normally.(maybe with pressing it twice)

it think is easy to verify for yourself if you have enough pictures of old projects (or copy/rename folders ;), in UI set test and set for reboot next day with one picture on the card and set for test/reboot after you put 10.000 on it from your archive (in at least 5 folders) in both cases your cam will take a few shots and reboot....any difference?


Quote
My ixus115 completes indexing of 996 pictures in 2-3 seconds, on a not particularly fast card.

I was talking about a bit more, my results involved 10000-24000 pictures (packed per max 2000 in a folder)
« Last Edit: 20 / April / 2019, 09:51:48 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14080
Re: get_tick_count overflow after 24 days
« Reply #19 on: 20 / April / 2019, 13:36:03 »
The problem would have to be with a camera (DSLR), which is triggered by an external timer for weeks as well or?
I certainly wouldn't be surprised if DSLRs suffered from broadly similar clock wrap problems, but Canon DSLRs are a different codebase. They would only suffer the same problem if it was in the OS.

I don't know for sure, but I'd suspect the indexing problem is triggered by something more specific than just having lots of files. I've haven't encountered it, but I don't think I've done more than ~7000 images on a card.
Don't forget what the H stands for.

 

Related Topics