looks like a zoom crash - General Discussion and Assistance - CHDK Forum supplierdeeply

looks like a zoom crash

  • 15 Replies
  • 3180 Views
*

Offline timgor

  • ***
  • 150
looks like a zoom crash
« on: 22 / December / 2014, 21:44:31 »
Advertisements
There was a problem with the zooming process. Program crashed after the zooming (see romlog1 file) but I could resolve the problem by adding sleep(100) function after zooming like:
Code: [Select]
zoom(0)
sleep(100)

After some time I got another crash (see romlog2 file).  The crash is rare
How to fix it?
Do you need more information, tests e.t.c?
I perform test of elph115 camera.

*

Offline srsa_4c

  • ******
  • 4005
Re: looks like a zoom crash
« Reply #1 on: 23 / December / 2014, 10:28:54 »
There was a problem with the zooming process. Program crashed after the zooming (see romlog1 file) but I could resolve the problem by adding sleep(100) function after zooming like:
Code: [Select]
zoom(0)
sleep(100)

After some time I got another crash (see romlog2 file).  The crash is rare
How to fix it?
Do you need more information, tests e.t.c?
I perform test of elph115 camera.
Try adding
Code: [Select]
#define CAM_NEED_SET_ZOOM_DELAY             300to the port's platform_camera.h.

*

Offline timgor

  • ***
  • 150
Re: looks like a zoom crash
« Reply #2 on: 29 / December / 2014, 12:02:27 »
#define CAM_NEED_SET_ZOOM_DELAY             300

This line makes delay at the end of zooming and fixed the crash ROMLOG1
What about ROMLOG2? This crash is rare but happened two times. I suspect that there should be sleep(...) at the beginning of the zoom() as well as at the end.
What is your opinion?

*

Offline srsa_4c

  • ******
  • 4005
Re: looks like a zoom crash
« Reply #3 on: 29 / December / 2014, 16:33:24 »
What about ROMLOG2? This crash is rare but happened two times.
Do you still get that after making the CAM_NEED_SET_ZOOM_DELAY change?
Quote
I suspect that there should be sleep(...) at the beginning of the zoom() as well as at the end.
The zoom delay is inserted between the zoom command and the attempt to restore the focus. I don't see how delaying zoom could help (are you doing something with the camera right before set_zoom?)...


*

Offline timgor

  • ***
  • 150
Re: looks like a zoom crash
« Reply #4 on: 05 / January / 2015, 09:52:50 »
Yes, it happened with
Code: [Select]
#define CAM_NEED_SET_ZOOM_DELAY             300
compilation, and I also used
Code: [Select]
sleep(1000)
zoom(...)
sleep(1000)
construction in my script so it should not be interference with other functions.
The crash is rare and random (something like every 1000 zoom crashes in average). The romlog is attached. You can see that it is different from the romlog1 that I posted at the beginning of the discussion.
Do you know how to find and fix it? I can help to do anything (recompile with other parameters, produce extra dump files e.t.c.)
« Last Edit: 05 / January / 2015, 10:00:37 by timgor »

*

Offline srsa_4c

  • ******
  • 4005
Re: looks like a zoom crash
« Reply #5 on: 05 / January / 2015, 11:47:26 »
Yes, it happened with
Code: [Select]
#define CAM_NEED_SET_ZOOM_DELAY             300
compilation, and I also used
Code: [Select]
sleep(1000)
zoom(...)
sleep(1000)
construction in my script so it should not be interference with other functions.
The crash is rare and random (something like every 1000 zoom crashes in average). The romlog is attached. You can see that it is different from the romlog1 that I posted at the beginning of the discussion.
Seems to be the same crash as romlog2 from the opening post. I'll try to look into it but I don't think that will help. We need to find a different method for zooming.

Can you check whether continuous AF / servo AF / face detection / etc. is switched off in the Canon menu?
Have you tried using simulated "keypresses" on the zoom "buttons" (and get_zoom) instead of set_zoom? Would be useful to know how stable that is.

Also, it seems to me that you're expecting too high reliability from a hack. There's a thread dedicated to set_zoom problems: http://chdk.setepontos.com/index.php?topic=7071
« Last Edit: 05 / January / 2015, 11:49:17 by srsa_4c »

*

Offline timgor

  • ***
  • 150
Re: looks like a zoom crash
« Reply #6 on: 05 / January / 2015, 15:48:04 »
Quote
I'll try to look into it but I don't think that will help. We need to find a different method for zooming.
Ok, thanks. Why you cannot find bug location with the help of debug files?

core/main.bin.dump
MODULES.LOG
ROMLOG

philmoz did it recently for me.

Quote
Can you check whether continuous AF / servo AF / face detection / etc. is switched off in the Canon menu?
continuous AF if off
servo AF is off
face detection (AF frame is setup for Face AiAf)
Do you think that the last one can be reason for crash?

Quote
Also, it seems to me that you're expecting too high reliability from a hack.
Before elph115 I tested A1400 and it worked perfectly.

Quote
Have you tried using simulated "keypresses" on the zoom "buttons" (and get_zoom) instead of set_zoom? Would be useful to know how stable that is.
Do you mean something like press("zoom") until get_zoom() == goal_zoom?
Is there any example?


« Last Edit: 05 / January / 2015, 15:53:59 by timgor »

*

Offline reyalp

  • ******
  • 12109
Re: looks like a zoom crash
« Reply #7 on: 05 / January / 2015, 16:22:57 »
Ok, thanks. Why you cannot find bug location with the help of debug files?
...
philmoz did it recently for me.
Finding where the error occurs is only a small part of the problem. Some bugs have a readily apparent solution, and some don't.

Quote
face detection (AF frame is setup for Face AiAf)
Do you think that the last one can be reason for crash?
It can't hurt to try without.
Don't forget what the H stands for.


*

Offline srsa_4c

  • ******
  • 4005
Re: looks like a zoom crash
« Reply #8 on: 06 / January / 2015, 11:06:24 »
I'll try to look into it but I don't think that will help.
Here's what I found (actually, it's speculation). Both asserts are the result of a failure in the same fw routine. The routine seems to get a focus lens 'lock handle'. If the focus lens is locked (by another routine), the function immediately returns with failure -> this leads to the assert.
One of the asserts happened in capt_seq_task (this could be initiated by CHDK), the other one happened in a task named CZ (computerzoom). This seems to be the result of concurrent focusing attempts.
I'd try to disable everything which can alter the focus (thus my previous suggestions). I'd also try to increase CAM_NEED_SET_ZOOM_DELAY, perhaps 300 milliseconds are not always enough for completing the zooming process.

*

Offline timgor

  • ***
  • 150
Re: looks like a zoom crash
« Reply #9 on: 09 / January / 2015, 23:06:05 »
I have changed AF frame from "Face AiAf" to "Center" and the same crash happened again.
In my opinion it is still makes auto focusing. Is this right?
should I use
Code: [Select]
set_aflock(1)
zoom(...)
set_aflock(0)
to completely disable autofocusing during the zooming?

 

Related Topics