Author Topic: ISO strangeness  (Read 1178 times)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
ISO strangeness
« on: January 17, 2021, 12:11:21 PM »
I've convinced myself that setting ISO values via Lua 'may' be broken.

I can use camera.iso.apex or camera.iso.value etc to read, eg x = camera.iso.apex; but if I use something like camera.iso.apex = 10 I get 'failed stack traceback' error.

Has anyone else come across this?

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: ISO strangeness
« Reply #1 on: January 17, 2021, 12:22:07 PM »

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #2 on: January 17, 2021, 12:28:30 PM »
@a1ex

Using latest Lua fix on 5D3 123.

Shutter and aperture all OK.

Reading ISO is OK.

Just tried running the API test script and got error "Not enough memory" ???????

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #3 on: January 17, 2021, 12:32:23 PM »
Looks like one of my scripts is creating the problem :-(

If I only run API test all looks OK :-(

But which script I wonder?

Time to test!!!!

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #4 on: January 17, 2021, 12:37:36 PM »
@a1ex

API test fails here:

Testing picture taking functions...
Snap simulation test...
Single picture...
A:/DCIM/103EOS5D/2P6A0508.CR2 not found.
A:/DCIM/103EOS5D/2P6A0508.JPG not found.

ML/SCRIPTS/API_TEST.LUA:1062: assertion failed!
stack traceback:
   [C]: in function 'assert'
   ML/SCRIPTS/API_TEST.LUA:1062: in function 'test_camera_take_pics'
   ML/SCRIPTS/API_TEST.LUA:1574: in function <ML/SCRIPTS/API_TEST.LUA:1564>
   [C]: in function 'xpcall'
   ML/SCRIPTS/API_TEST.LUA:1564: in function 'api_tests'
   ML/SCRIPTS/API_TEST.LUA:1603: in main chunk

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #5 on: January 17, 2021, 12:59:05 PM »
Well I'm mystified, but that's easy :-)

Here is the point of failure, that generates the traceback error:

Code: [Select]
local iso_b = camera.iso.apex
local temp = camera.shutter.ms
local stop = MUSIC_menu.submenu["Number of images?"].value
if MUSIC_menu.submenu["Bookends?"].value == "yes" then stop = stop + 2 end
for i = 1,stop do
if (i == 1 or i == stop) and MUSIC_menu.submenu["Bookends?"].value == "yes" then -- tweak shutter and ISO for first and last images in bracket set
camera.shutter.ms = 1
camera.iso.apex = 10 --FAILS HERE!!!!!!!!
else
camera.iso.apex = iso_b
camera.shutter.ms = temp
end
my_shoot()
msleep(MUSIC_menu.submenu["I2I Delay"].value * 1000)
if MUSIC_menu.submenu["Focus shift mode"].value ~= "None"  then
check_lens_ready() -- just in case
lens.focus(dir,step,true) -- move lens
check_lens_ready() -- just in case
lens.focus(-dir,step,true) -- move back
end
end
camera.shutter.ms = temp
camera.iso.apex = iso_b
display.notify_box("Script Finished Running", 3000)
else -- something is wrong
display.notify_box("Switch on LV", 3000)
end


garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #6 on: January 17, 2021, 01:51:15 PM »
In the end I 'just' did a complete reinstall of the latest Lua_fix and all now seems OK.

As I say, strange.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #7 on: January 18, 2021, 10:53:59 PM »
@a1ex

I'm still nowhere with this ISO strangeness.

I have the latest Lua running on my 5D3 in M mode.

I have deleted all scripts bar this test script:

Code: [Select]
--ISO Test
t = camera.iso.value
menu.close()
sleep(1)
camera.iso.value = 800
display.notify_box("iso="..t, 3000)
sleep(3)
camera.iso.value = t

The script fails with this message:

image0" border="0

Can you see the error of my ways?

Cheers

Garry


garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #8 on: January 18, 2021, 10:55:10 PM »
Bugger: why doesn't the image show!!!!!!

Here is the link: https://ibb.co/G7FXWbF

Fixed  :)

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #9 on: January 19, 2021, 08:43:13 AM »
@a1ex

I had a thought and just tested it out and now can trigger the error.

If only ExpSim is enabled all is OK.

If I also enable Expo Override, then the error occurs, ie I can't control ISO via Lua.

I don't under why this is occurring, but at least I can circumvent it by not playing around with ISO if I also need Expo Override!

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 12564
Re: ISO strangeness
« Reply #10 on: January 19, 2021, 10:31:42 AM »
Confirmed - that's a valid bug report.

garry23

  • Contributor
  • Hero Member
  • *****
  • Posts: 2215
Re: ISO strangeness
« Reply #11 on: January 19, 2021, 10:34:56 AM »
@a1ex

Thanks for confirming. For a while I thought I was going mad, then, last night, as I was in bed thinking about it, I wondered if the exposim or expo override was the issue.

May I assume the bug is registered now?

Cheers

Garry