Multiple Bug's (Live View / Zoom / Shoot) - page 11 - General Discussion and Assistance - CHDK Forum

Multiple Bug's (Live View / Zoom / Shoot)

  • 105 Replies
  • 33737 Views
*

Offline reyalp

  • ******
  • 14126
Re: Multiple Bug's (Live View / Zoom / Shoot)
« Reply #100 on: 23 / May / 2020, 01:04:07 »
Advertisements
This changes the behavior of a bunch of cameras without testing, which is a bit sporty  :-[ but I suspect mostly an improvement.
Well, my ixus120_sd940  (my first port) is still kicking around so I could remove one from the list when I get a moment.
Thanks. I'm fairly confident it's ok (or I wouldn't have done it) but any confirmation is welcome.

The main thing to test is that set_zoom() still works.
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: Multiple Bug's (Live View / Zoom / Shoot)
« Reply #101 on: 23 / May / 2020, 02:57:28 »
[This changes the behavior of a bunch of cameras without testing...


The IXUS310 and SX40 both appear to work ok.

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)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

*

Offline srsa_4c

  • ******
  • 4451
Re: Multiple Bug's (Live View / Zoom / Shoot)
« Reply #102 on: 01 / June / 2020, 15:06:00 »
Affected cameras are:
Code: [Select]
a3200
ixus110_sd960
ixus870_sd880
Just FWIW, these cameras work without problems (I ran a set_zoom script on them).

*

Offline reyalp

  • ******
  • 14126
Re: Multiple Bug's (Live View / Zoom / Shoot)
« Reply #103 on: 25 / July / 2020, 22:53:16 »
Some additional possibly related crashes:
https://chdk.setepontos.com/index.php?topic=14068.msg143783#msg143783

While the OP saw some difference between 1.4 and 1.5, in my testing the AFScanDriver.c assert is possible to trigger in either with roughly the same code. It appears to be related to trying to change zoom close to half shoot being released (including after a shot is finished) so the simple workaround is just to put some (uncertain) sleep in between.

On elph180, the assert can be triggered by the following, if continuous AF is enabled
Code: [Select]
=press'shoot_half' repeat sleep(10) until get_shooting() release'shoot_half' sleep(200) set_zoom(get_zoom()+1)
A sleep of 300 doesn't trigger it. Trying to zoom immediately after release, before get_shooting goes false triggers a different assert (ComputerZoom.c Line 2021 in CZ task, regardless of cont AF setting). Another assert can also happen shortly after get_shooting goes false (Imager.c Line 816 in AFTask, only when cont AF enabled?)

The AFScanDriver.c assert happens in elph180 function ff8f4078, based on the result of a call to another function (ff99fdf8) not having the lowest bit set.
There are several possible ways ff99fdf8 can get its return value, but I verified in this case it's caused by TryTakeSemaphore returning non-zero.

I don't see an obvious way to make set_zoom() safe from this. Disallowing zoom while get_shooting is true won't help, although it might avoid the CZ crash.
Don't forget what the H stands for.

*

Offline srsa_4c

  • ******
  • 4451
Re: Multiple Bug's (Live View / Zoom / Shoot)
« Reply #104 on: 26 / July / 2020, 07:12:55 »
I don't see an obvious way to make set_zoom() safe from this.
We'd need to find and replicate something the firmware does when the zoom is operated manually. Could be levents or something much less obvious. The event procedures we're using are usually meant for factory mode use where there are no conflicting tasks.
edit:
Cameras with C mode are able to save and restore the zoom position. Cams that have Canon PTP (or whatever API their Wifi models support) support in rec mode may offer a way to set zoom.
These come to my mind when I think of zoom lens control that doesn't involve pressing buttons.
« Last Edit: 26 / July / 2020, 16:14:16 by srsa_4c »

*

Offline reyalp

  • ******
  • 14126
Re: Multiple Bug's (Live View / Zoom / Shoot)
« Reply #105 on: 26 / July / 2020, 17:13:02 »
We'd need to find and replicate something the firmware does when the zoom is operated manually. Could be levents or something much less obvious. The event procedures we're using are usually meant for factory mode use where there are no conflicting tasks.
edit:
Cameras with C mode are able to save and restore the zoom position. Cams that have Canon PTP (or whatever API their Wifi models support) support in rec mode may offer a way to set zoom.
These come to my mind when I think of zoom lens control that doesn't involve pressing buttons.
Good ideas. FWIW, I don't think these are a big deal if it's correct that they only happen when the zoom is too close to half shoot. If there were an easy way to prevent it, that would nice, but if not, I'm totally fine with documenting and suggesting people add a sleep if it comes up.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal