another rare bug - page 3 - General Help and Assistance on using CHDK stable releases - CHDK Forum

another rare bug

  • 48 Replies
  • 15851 Views
*

Offline timgor

  • ***
  • 150
Re: another rare bug
« Reply #20 on: 29 / March / 2015, 21:47:47 »
Advertisements
Quote
I don't understand. As far as I understood, you previously said that if you hold down the power button, the lens does not extract and script get_mode falsely reports the camera is in record mode. I can't see how both this and your most recent post can be true at the same time...
Sorry, I confused something the first time with holding and clicking button. It goes to record mode after holding the button with lens out (not retracted).

I also figured out what was wrong with camera performance after a long using. It's not temperature, it's big output files.

For debugging I use the multiple inserts in my script
Code: [Select]
fout = io.open("A/out.txt", "a")
fout:write(...) 
fout:close()

and it works good at the beginning. But after a few hours the out.txt file gets 1Mb and it takes 1 second to perform this function. So in my debug code I need to delete the file periodically.
I will continue to post upgrades on my bug. Finally I will post a full script and full output file.

Re: another rare bug
« Reply #21 on: 29 / March / 2015, 21:50:16 »
So in my debug code I need to delete the file periodically.
Or use multiple files by changing the name as your script runs?
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline timgor

  • ***
  • 150
Re: another rare bug
« Reply #22 on: 30 / March / 2015, 23:29:34 »
I'm checking external versions of my bug and there was another interesting case.
I use external power supply with not very good contacts.
Ones I was keeping camera in my hands and it said something like "low battery" or "replace the battery" I don't remember what exactly.

In my output file I have seen the following data:
Code: [Select]
4116 110 true  flag32   22:48:38
4111 110 true  flag4   22:48:38
4111 110 true  flag5   22:48:38
4111 110 true  flag51   22:48:38

shoot shoot....

4069 96 false  flag6   22:48:58
4065 96 false  flag7   22:48:59
4069 96 false  flag8   22:48:59
4074 97 false  flag9   22:48:59
4055 97 false  flag10   22:48:59
4055 97 false  flag11   22:48:59
4051 107 false  flag1   22:48:59
4092 107 false  flag2   22:48:59
4051 1 false  aflock1   22:48:59
4055 1 false  aflock2   22:48:59
4083 1 false  aflock3   22:49:00
4074 1 false  aflock4   22:49:00
4079 2 false  aflock1   22:49:00
4079 2 false  aflock2   22:49:00
4139 2 false  aflock3   22:49:01
4097 2 false  aflock4   22:49:01
4097 3 false  aflock1   22:49:01

The first row represents battery voltage, the third row represents get_mode() parameter.

what happened if contact would fail for a moment? Can it bring it to a record mode without shutdown?
I'm surprised because it continues to show good voltage (more than 4v) and get_mode() = false at the same time.
Is there any function in the CHDK that would output the message "low battery"?
« Last Edit: 30 / March / 2015, 23:37:05 by timgor »

*

Offline reyalp

  • ******
  • 13840
Re: another rare bug
« Reply #23 on: 31 / March / 2015, 00:55:18 »
what happened if contact would fail for a moment? Can it bring it to a record mode without shutdown?
I'm surprised because it continues to show good voltage (more than 4v) and get_mode() = false at the same time.
If the connection is bad, it could be low when the canon firmware checks but Ok when the script does. The camera will try to shut down "cleanly" when if the battery gets below a certain level. I don't think it switches to play first, but I haven't observed very carefully. If the power supply is bad, all kinds of unpredictable behavior could happen.

Quote
Is there any function in the CHDK that would output the message "low battery"?
No.
Don't forget what the H stands for.


Re: another rare bug
« Reply #24 on: 31 / March / 2015, 09:07:00 »
If the connection is bad, it could be low when the canon firmware checks but Ok when the script does.
More specifically, it will appear low during periods of maximum current drain i.e. when the zoom or focus motors are running, when the flash is charging and when writing to the SD card.  It seems unlikely that the CHDK script will actually active and able to measure battery voltage during these events but the Canon firwmare likely can.

Quote
The camera will try to shut down "cleanly" when if the battery gets below a certain level. I don't think it switches to play first, but I haven't observed very carefully.
I've noticed many instances of my cameras shutting down on low voltage and I've never seen it switch to playback mode prior to halting.

Quote
If the power supply is bad, all kinds of unpredictable behavior could happen.
I'd word this more strongly and say all kinds of unpredictable behavior will happen.
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline timgor

  • ***
  • 150
Re: another rare bug
« Reply #25 on: 31 / March / 2015, 10:04:42 »
Ok thanks. I will make a strong connection to exclude this case from my study

*

Offline srsa_4c

  • ******
  • 4450
Re: another rare bug
« Reply #26 on: 31 / March / 2015, 13:13:36 »
Excuse me if it was already mentioned: when the camera reports that it has switched to playback mode, is it really in playback mode with the lens retracted?
If this is unknown, one could do these:
- adding the 'playrec_mode' firmware variable to the log (address can be found in stubs_entry.S, its value can be read with the peek() Lua function)
- there's an event procedure named IsLensOutside (registered by Mecha.Create), which returns whether the lens is in or out (alternatively, this can also be read from a fw variable, its address is 0x3798 for ixus132 100b)

*

Offline timgor

  • ***
  • 150
Re: another rare bug
« Reply #27 on: 31 / March / 2015, 13:19:28 »
Excuse me if it was already mentioned: when the camera reports that it has switched to playback mode, is it really in playback mode with the lens retracted?
Yes, it is exactly retracted and I use eye-fi card that that is powered on and continues to transfer data and get_mode() == false. That's why I conclude that camera is in the play mode (not in shutdown).


*

Offline srsa_4c

  • ******
  • 4450
Re: another rare bug
« Reply #28 on: 31 / March / 2015, 13:33:45 »
Yes, it is exactly retracted and I use eye-fi card that that is powered on and continues to transfer data and get_mode() == false. That's why I conclude that camera is in the play mode (not in shutdown).
I see, so much for my theory...

*

Offline timgor

  • ***
  • 150
Re: another rare bug
« Reply #29 on: 17 / March / 2016, 13:19:40 »
I have got another information about the issue that I had a year ago.
There is a strong correlation between camera shutdown and temperature.
I use my camera as a dashboard camera in my car.
The camera works good for a long period when it's in the garage or car is air conditioned.
When I live my car at the parking lot during a hot day it shutdown automatically.
Does anybody know is it programmed to do so?
Is there any way to bypass it and make it work?
As I understand camera has 3 different temperatures.
I can make a study about it by printing temperatures out just before shutdown.



 

Related Topics