Canon 650D / T4i

Started by nanomad, August 03, 2013, 07:27:52 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

saulbass

@dfort - cam was in M photo mode

retried with the following movie only mode:

    printf("Module tests...\n")
    --   test_io()
    --   test_camera_gui()
--   test_menu()
    --   test_camera_take_pics()
    --    sleep(1)
    --   test_multitasking()
    --   test_keys()
    --   test_lv()
    --   test_lens_focus()
    --   test_camera_exposure()
    test_movie()


seemed to get the end but no info in LUATEST.LOG

===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-24 12:45:24
===============================================================================

Module tests...

Testing movie recording...
Please switch to Movie mode.


started in photo mode M and switched to Movie when asked.

saulbass

ooops - forgot 650D.104 - magiclantern-lua_fix.2018Mar31.650D104

saulbass

ok - so am incrementally re-running the api_test.lua - uncommenting the commented out tests - working backwards from test_movie.
I've pasted the script segment at the top of each code segment - so its script segment then lua.log -
all on 650D.104 - with magiclantern-lua_fix.2018Mar31.650D104 18.55kit lens
each time battery out / reset settings /fresh install onto card/
Cam set to Photo M each time and switching to AV / Movie as requested.

in summary seems to work until I get to test_keys(). see log 4.

Oh the only other strangeness is that the edited script never gives a Done! in the output, even with just test_movie - which records one movie clip. TBH I'm not really sure what I'm doing here --- just trying to find out why the api_test.lua - fails to run all the scripts.

log 1 -     test_camera_exposure() &  test_movie() nb (test_movie() is same)

    printf("Module tests...\n")
    --   test_io()
    --   test_camera_gui()
--   test_menu()
    --   test_camera_take_pics()
    --    sleep(1)
    --   test_multitasking()
    --   test_keys()
    --   test_lv()
    --   test_lens_focus()
    test_camera_exposure()
    test_movie()
   
    printf("Done!\n")
   
   
===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-24 12:58:16
===============================================================================

Module tests...
Testing exposure settings...
Camera    : Canon EOS 650D (650D) 1.0.4
Lens      : EF-S18-55mm f/3.5-5.6 IS II
Shoot mode: 3
Shutter   : ‚125 (raw 112, 0.007812s, 8ms, apex 7.)
Aperture  : 5.6 (raw 48, f/5.6, apex 5.)
Av range  : 4.0..25 (raw 40..83, f/4...f/25.7, apex 4...9.375)
ISO       : €Auto (raw 0, 0, apex 0)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Setting ISO to random values...
Setting aperture to random values...
Please switch to Av mode.
Setting EC to random values...
Setting Flash EC to random values...
Exposure tests completed.


Testing movie recording...
Please switch to Movie mode.

log 2 -     test_lens_focus()  test_camera_exposure()  test_movie()
    printf("Module tests...\n")
    --   test_io()
    --   test_camera_gui()
--   test_menu()
    --   test_camera_take_pics()
    --    sleep(1)
    --   test_multitasking()
    --   test_keys()
    --   test_lv()
    test_lens_focus()
    test_camera_exposure()
    test_movie()
   
    printf("Done!\n")
   
   
===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-24 13:19:53
===============================================================================

Module tests...

Testing lens focus functionality...
Autofocus outside LiveView...
Focus distance: 270
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
19...18...17...16...15...14...Autofocus triggered.
Autofocus completed.
Focus distance: 370
Focusing backward...
Focus distance: 655350
Focus motor position: 0
Focusing forward with step size 3, wait=true...
...........
Focus distance: 280
Focus motor position: 0
Focusing backward with step size 3, wait=true...
..............
Focus distance: 655350
Focus motor position: 0
Focus range: 11 steps forward, 14 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 3, wait=false...
..............
Focus distance: 250
Focus motor position: 0
Focusing backward with step size 3, wait=false...
........................................
Focus distance: 655350
Focus motor position: 0
Focus range: 14 steps forward, 40 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=true...
...........................................................................
Focus distance: 270
Focus motor position: 0
Focusing backward with step size 2, wait=true...
...
Focus distance: 655350
Focus motor position: 0
Focus range: 75 steps forward, 120 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=false...
...
Focus distance: 410
Focus motor position: 0
Focusing backward with step size 2, wait=false...
...
Focus distance: 410
Focus motor position: 0
Focus range: 159 steps forward, 399 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=true...
...
Focus distance: 410
Focus motor position: 0
Focusing backward with step size 1, wait=true...
...
Focus distance: 410
Focus motor position: 0
Focus range: 367 steps forward, 389 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=false...
...
Focus distance: 410
Focus motor position: 0
Focusing backward with step size 1, wait=false...
...
Focus distance: 410
Focus motor position: 0
Focus range: 606 steps forward, 575 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.

Focus test completed.

Testing exposure settings...
Camera    : Canon EOS 650D (650D) 1.0.4
Lens      : EF-S18-55mm f/3.5-5.6 IS II
Shoot mode: 3
Shutter   : ‚125 (raw 112, 0.007812s, 8ms, apex 7.)
Aperture  : 5.6 (raw 48, f/5.6, apex 5.)
Av range  : 4.0..25 (raw 40..83, f/4...f/25.7, apex 4...9.375)
ISO       : €Auto (raw 0, 0, apex 0)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Setting ISO to random values...
Setting aperture to random values...
Please switch to Av mode.
Setting EC to random values...
Setting Flash EC to random values...
Exposure tests completed.


Testing movie recording...
Please switch to Movie mode.

log 3 -  test_lv() test_lens_focus() test_camera_exposure() test_movie()
seems to be okay.
    printf("Module tests...\n")
    --   test_io()
    --   test_camera_gui()
--   test_menu()
    --   test_camera_take_pics()
    --    sleep(1)
    --   test_multitasking()
    --   test_keys()
    test_lv()
    test_lens_focus()
    test_camera_exposure()
    test_movie()
   
    printf("Done!\n")
   
===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-24 13:37:57
===============================================================================

Module tests...
Testing module 'lv'...
Starting LiveView...
Overlays: Canon
Overlays: Canon
Overlays: ML
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: disabled
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: Canon
Setting zoom to x1...
Setting zoom to x5...
Setting zoom to x10...
Setting zoom to x5...
Setting zoom to x1...
Setting zoom to x10...
Setting zoom to x1...
Pausing LiveView...
Resuming LiveView...
Stopping LiveView...
LiveView tests completed.


Testing lens focus functionality...
Autofocus outside LiveView...
Focus distance: 580
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
19...18...Autofocus triggered.
Autofocus completed.
Focus distance: 760
Focusing backward...
Focus distance: 655350
Focus motor position: 0
Focusing forward with step size 3, wait=true...
...............
Focus distance: 250
Focus motor position: 0
Focusing backward with step size 3, wait=true...
.............
Focus distance: 655350
Focus motor position: 0
Focus range: 15 steps forward, 13 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 3, wait=false...
.................
Focus distance: 330
Focus motor position: 0
Focusing backward with step size 3, wait=false...
................
Focus distance: 330
Focus motor position: 0
Focus range: 17 steps forward, 16 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=true...
......................................
Focus distance: 330
Focus motor position: 0
Focusing backward with step size 2, wait=true...
.....................................
Focus distance: 330
Focus motor position: 0
Focus range: 38 steps forward, 37 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=false...
..................................................................................
Focus distance: 330
Focus motor position: 0
Focusing backward with step size 2, wait=false...
...
Focus distance: 330
Focus motor position: 0
Focus range: 82 steps forward, 137 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=true...
...
Focus distance: 330
Focus motor position: 0
Focusing backward with step size 1, wait=true...
...
Focus distance: 330
Focus motor position: 0
Focus range: 282 steps forward, 156 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=false...
...
Focus distance: 330
Focus motor position: 0
Focusing backward with step size 1, wait=false...
.............................................
Focus distance: 330
Focus motor position: 0
Focus range: 200 steps forward, 45 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.

Focus test completed.

Testing exposure settings...
Camera    : Canon EOS 650D (650D) 1.0.4
Lens      : EF-S18-55mm f/3.5-5.6 IS II
Shoot mode: 3
Shutter   : ‚125 (raw 112, 0.007812s, 8ms, apex 7.)
Aperture  : 5.6 (raw 48, f/5.6, apex 5.)
Av range  : 4.0..25 (raw 40..83, f/4...f/25.7, apex 4...9.375)
ISO       : €Auto (raw 0, 0, apex 0)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Setting ISO to random values...
Setting aperture to random values...
Please switch to Av mode.
Setting EC to random values...
Setting Flash EC to random values...
Exposure tests completed.


Testing movie recording...
Please switch to Movie mode.

log 4 - this one seems to be the culprit - adding in test_keys().
    test_keys() test_lv() test_lens_focus() test_camera_exposure() test_movie()


    printf("Module tests...\n")
    --   test_io()
    --   test_camera_gui()
--   test_menu()
    --   test_camera_take_pics()
    --    sleep(1)
    --   test_multitasking()
    test_keys()
    test_lv()
    test_lens_focus()
    test_camera_exposure()
    test_movie()
   
    printf("Done!\n")
   
   
===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-24 14:07:20
===============================================================================

Module tests...
Testing half-shutter...



dfort

Nice find. So if you comment out only test_keys() will it complete the tests? Not printing "Done!" at the end of the log might also be pointing out an issue.

saulbass

before I try that - retried with just the movie test.
At end I have a short 2 sec movie in the usual folder - so can confirm that a movie is shot.

this is the final screen after recording - camera still operational.

ML/SCRIPTS/api_test.lua:1364: in main chunk [api_test.lua] script finished.

nb. line 1364 is the last line of the script.


===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-24 16:30:11
===============================================================================

Module tests...

Testing movie recording...
Please switch to Movie mode.


this is my edit

    printf("Module tests...\n")
    --   test_io()
    --   test_camera_gui()
--   test_menu()
    --   test_camera_take_pics()
    --    sleep(1)
    --   test_multitasking()
    --  test_keys()
    --  test_lv()
    --  test_lens_focus()
    --  test_camera_exposure()
    test_movie()
   
    printf("Done!\n")


all on 650D.104 - with magiclantern-lua_fix.2018Mar31.650D104 18.55kit lens
each time battery out / reset settings /fresh install onto card/
Cam set to Photo M each time and switching to AV / Movie as requested.

saulbass

so, if I only uncomment test_camera_exposure() (so nothing else is run) and repeat the test, I get a Done! at the end - which is not what happens when I use the test_movie() test.

saulbass

@dfort - this time I commented out only the test_keys() - everything else run

and manage to get to the end with the movie_test() - still no Done! though....

I should mention that there are a lot of messages that flash by during test including cant find xxxx.jpg - its in the log.


all on 650D.104 - with magiclantern-lua_fix.2018Mar31.650D104 18.55kit lens
each time battery out / reset settings /fresh install onto card/
Cam set to Photo M each time and switching to AV / Movie as requested.


===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-24 16:55:49
===============================================================================

Module tests...
Testing file I/O...
Copy test: autoexec.bin -> tmp.bin
Copy test OK
Append test: tmp.txt
Append test OK
Rename test: apple.txt -> banana.txt
Rename test OK
Rename test: apple.txt -> ML/banana.txt
Rename test OK
File I/O tests completed.

Testing Canon GUI functions...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Start LiveView...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Resume LiveView...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter PLAY mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter PLAY mode...
Exit PLAY mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter PLAY mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Enter PLAY mode...
Enter MENU mode...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Enter PLAY mode...
Exit PLAY mode...
Pause LiveView...
Enter MENU mode...
Exit MENU mode...
Pause LiveView...
Enter MENU mode...
Canon GUI tests completed.

Testing ML menu API...
Menu tests completed.

Testing picture taking functions...
Snap simulation test...
Single picture...
B:/DCIM/100CANON/IMG_4929.CR2 not found.
B:/DCIM/100CANON/IMG_4929.JPG: 14993942
Two burst pictures...
Ideally, the camera should be in some continuous shooting mode (not checked).
B:/DCIM/100CANON/ABC_4930.CR2 not found.
B:/DCIM/100CANON/ABC_4930.JPG: 3580709
B:/DCIM/100CANON/ABC_4931.CR2 not found.
B:/DCIM/100CANON/ABC_4931.JPG: 5214455
Bracketed pictures...
B:/DCIM/100CANON/IMG_4932.CR2 not found.
B:/DCIM/100CANON/IMG_4932.JPG: 2912206
B:/DCIM/100CANON/IMG_4933.CR2 not found.
B:/DCIM/100CANON/IMG_4933.JPG: 5849954
B:/DCIM/100CANON/IMG_4934.CR2 not found.
B:/DCIM/100CANON/IMG_4934.JPG: 4264484
Bulb picture...
Elapsed time: 12034
B:/DCIM/100CANON/IMG_4935.CR2 not found.
B:/DCIM/100CANON/IMG_4935.JPG: 365721
Picture taking tests completed.

Testing multitasking...
Only one task allowed to interrupt...
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Main task yielding.
Task C started.
Task C finished.
Main task back.
Multitasking tests completed.

Testing module 'lv'...
LiveView is running; stopping...
Starting LiveView...
Overlays: Canon
Overlays: Canon
Overlays: ML
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: disabled
Overlays: ML
Overlays: disabled
Overlays: Canon
Overlays: Canon
Overlays: Canon
Overlays: Canon
Setting zoom to x1...
Setting zoom to x5...
Setting zoom to x10...
Setting zoom to x5...
Setting zoom to x1...
Setting zoom to x10...
Setting zoom to x1...
Pausing LiveView...
Resuming LiveView...
Stopping LiveView...
LiveView tests completed.


Testing lens focus functionality...
Autofocus outside LiveView...
Focus distance: 270
Autofocus in LiveView...
Please trigger autofocus (half-shutter / AF-ON / * ).
19...Autofocus triggered.
Autofocus completed.
Focus distance: 250
Focusing backward...
Focus distance: 280
Focus motor position: 0
Focusing forward with step size 3, wait=true...
...
Focus distance: 250
Focus motor position: 0
Focusing backward with step size 3, wait=true...
...........
Focus distance: 655350
Focus motor position: 0
Focus range: 3 steps forward, 11 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 3, wait=false...
................
Focus distance: 480
Focus motor position: 0
Focusing backward with step size 3, wait=false...
..................
Focus distance: 480
Focus motor position: 0
Focus range: 16 steps forward, 18 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=true...
.......................................................................
Focus distance: 480
Focus motor position: 0
Focusing backward with step size 2, wait=true...
......................................................................
Focus distance: 480
Focus motor position: 0
Focus range: 71 steps forward, 70 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 2, wait=false...
...............................................................................
Focus distance: 480
Focus motor position: 0
Focusing backward with step size 2, wait=false...
....................................................................................
Focus distance: 480
Focus motor position: 0
Focus range: 79 steps forward, 84 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=true...
...
Focus distance: 480
Focus motor position: 0
Focusing backward with step size 1, wait=true...
...
Focus distance: 480
Focus motor position: 0
Focus range: 270 steps forward, 284 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.
Focusing forward with step size 1, wait=false...
...
Focus distance: 480
Focus motor position: 0
Focusing backward with step size 1, wait=false...
...
Focus distance: 480
Focus motor position: 0
Focus range: 269 steps forward, 283 steps backward.
Motor steps: 0 forward, 0 backward, 0 lost.

Focus test completed.

Testing exposure settings...
Camera    : Canon EOS 650D (650D) 1.0.4
Lens      : EF-S18-55mm f/3.5-5.6 IS II
Shoot mode: 3
Shutter   : ‚5 (raw 75, 0.192776s, 193ms, apex 2.375)
Aperture  : 5.6 (raw 48, f/5.6, apex 5.)
Av range  : 4.0..25 (raw 40..83, f/4...f/25.7, apex 4...9.375)
ISO       : €1600 (raw 104, 1600, apex 9.)
EC        : 0.0 (raw 0, 0 EV)
Flash EC  : 0.0 (raw 0, 0 EV)
Setting shutter to random values...
Setting ISO to random values...
Setting aperture to random values...
Please switch to Av mode.
Setting EC to random values...
Setting Flash EC to random values...
Exposure tests completed.


Testing movie recording...
Please switch to Movie mode.

dfort

Now we're getting somewhere -- so the issue is with the half-shutter press?

function test_keys()
    printf("Testing half-shutter...\n")
    for i = 1,10 do
        -- open Canon menu
        camera.gui.menu = true
        sleep(1)
        assert(camera.gui.menu == true)
        assert(camera.gui.idle == false)
        key.press(KEY.HALFSHUTTER)
        sleep(0.2)
        assert(key.last == KEY.HALFSHUTTER)
        sleep(1)
        -- half-shutter should close Canon menu
        assert(camera.gui.menu == false)
        assert(camera.gui.idle == true)
        key.press(KEY.UNPRESS_HALFSHUTTER)
        sleep(0.2)
        assert(key.last == KEY.UNPRESS_HALFSHUTTER)
    end
    printf("Half-shutter test OK.\n")
   
    -- todo: test other key codes? press/unpress events?
    printf("\n")
end


Checked out the button codes in consts.h and gui.h but nothing jumps out at me. They seem to be the same as the 700D which is working fine.

Sometimes printing "Done!" and sometimes not might be pointing to another problem but I'm not sure.

saulbass

@dfort -

Quoteso the issue is with the half-shutter press?

hmm I'm no expert but I doubt this.

the terms - key.press(KEY.HALFSHUTTER) & key.press(KEY.UNPRESS_HALFSHUTTER)
also appear in lines 241 245 so I dont think that these are problems in themselves.

Also just running test_keys() runs fine - I even get a Done! at the end...

    printf("Module tests...\n")
    -- test_io()
    -- test_camera_gui()
-- test_menu()
    -- test_camera_take_pics()
    -- sleep(1)
    -- test_multitasking()
    test_keys()
    -- test_lv()
    -- test_lens_focus()
    -- test_camera_exposure()
    -- test_movie()
   
    printf("Done!\n")

saulbass

tried this combination:

test_key() then test_movie()
seems fine - gets to the end of the movie test loop - prints out     
printf("Movie recording tests completed.\n")
so must get to line 1330
but no Done! (line 1357).

    printf("Module tests...\n")
    -- test_io()
    -- test_camera_gui()
-- test_menu()
    -- test_camera_take_pics()
    -- sleep(1)
    -- test_multitasking()
    test_keys()
    -- test_lv()
    -- test_lens_focus()
    -- test_camera_exposure()
    test_movie()

saulbass

okay final test for today - just testing   

test_keys()
then
test_lv()

seems fine.

dfort

Thanks for the testing. Note that it is more helpful to post what is in the logs rather than the lua code.  ;D

dfort

I'm a bit confused. Looking over the recent posts it looks like the 650D.104 is completing all of the lua tests as long as we only run one or a few at a time but it can't get through all of the tests in a single run. I assume that this is the same with 650D.105 though this still needs to be confirmed.

Some of the reasons I've been doing these firmware updates are spelled out in my tutorial: Porting a Canon firmware update but another reason has emerged--making sure cameras are able to run through all the tests. We aren't done here yet.

Walter Schulz

Not convinced any movie test got completed. No message in log after entering movie section.

dfort

This is all I get on the 700D:

Testing movie recording...
Please switch to Movie mode.
Movie recording tests completed.

Done!


Seems that sometimes the "Done!" doesn't get into the log but I'd like to know if it is being printed on the console.

Walter Schulz

I got nothing logged beyond
Testing movie recording...
Please switch to Movie mode.

dfort

Ok--the test is fairly well commented and attempts to trap various errors:

function test_movie()
    printf("\n")
    printf("Testing movie recording...\n")

    -- we must be in photo mode (from previous tests)
    assert(camera.mode ~= MODE.MOVIE)

    -- this should raise error
    local s,e = pcall(movie.start)
    assert(s == false)
    assert(e:find("movie mode"))

    request_mode(MODE.MOVIE, "Movie")
    lv.start()
    assert(lv.running)

    -- this should also raise error, as we are not exactly in LiveView
    lv.pause()
    local s,e = pcall(movie.start)
    assert(s == false)
    assert(e:find("LiveView"))
    menu.close()
    lv.resume()

    -- this should raise error, because the LiveView button has a special
    -- function in ML menu (so we can't just press it to start recording)
    menu.open()
    local s,e = pcall(movie.start)
    assert(s == false)
    assert(e:find("menu"))
    menu.close()

    -- now it should work
    -- hide the console for a nicer look
    console.hide(); assert(not console.visible)
    movie.start()
    assert(movie.recording)
    sleep(1)
    movie.stop()
    assert(not movie.recording)
    console.show(); assert(console.visible)

    -- let's review it
    assert(camera.gui.idle == true)
    camera.gui.play = true
    assert(camera.gui.play == true)
    assert(camera.gui.play_movie == true)
    assert(camera.gui.play_photo == false)

    printf("Movie recording tests completed.\n")
    printf("\n")
end


What we can try doing is to insert printf statements to figure out if the test is getting past that point. For example:

    -- we must be in photo mode (from previous tests)
    assert(camera.mode ~= MODE.MOVIE)
printf("Hello! I got this far...camera.mode ~= MODE.MOVIE\n")
    -- this should raise error


Eventually we should be able to figure out which line the test is failing to reach.

[EDIT] Just realized that the test closes the console at a certain point:

    -- hide the console for a nicer look
    console.hide(); assert(not console.visible)


When you get to that line simply comment it out to keep the console from closing.

saulbass

650D.104 with magiclantern-lua_fix.2018Mar31.650D104

    menu.open()
    local s,e = pcall(movie.start)
    assert(s == false)
    assert(e:find("menu"))
    menu.close()
    -- now it should work
    -- hide the console for a nicer look
    console.hide(); assert(not console.visible)
    movie.start()
    assert(movie.recording)
    sleep(5)
        printf("A\n")
    movie.stop()
        printf("B\n")
    assert(not movie.recording)
        printf("C\n")
    console.show(); assert(console.visible)
        printf("D\n")
    -- let's review it
    assert(camera.gui.idle == true)
        printf("E\n")
    camera.gui.play = true
        printf("F\n")
    assert(camera.gui.play == true)
        printf("G\n")
    assert(camera.gui.play_movie == true)
        printf("H\n")
    assert(camera.gui.play_photo == false)
        printf("I\n")

    printf("Movie recording tests completed.\n")
        printf("J\n")
    printf("\n")
        printf("K\n")
end

function api_tests()
    menu.close()
    console.clear()
    console.show()
    test_log = logger("LUATEST.LOG")

    -- note: each test routine must print a blank line at the end
    --   strict_tests()
    --  generic_tests()
   
    printf("Module tests...\n")
    -- test_io()
    -- test_camera_gui()
-- test_menu()
    -- test_camera_take_pics()
    -- sleep(1)
    -- test_multitasking()
    -- test_keys()
    -- test_lv()
    -- test_lens_focus()
    -- test_camera_exposure()
    test_movie()


Result

===============================================================================
ML/SCRIPTS/api_test.lua - 2018-4-27 01:01:37
===============================================================================

Module tests...

Testing movie recording...
Please switch to Movie mode.
A
B
C
D
E
F
G



I then repeated the test commenting out the following line:
   -- assert(camera.gui.play_movie == true)

A
B
C
D
E
F
G
H
I
Movie recording tests completed.
J

K
Done!


so: assert(camera.gui.play_movie == true)

appears to be the problem...

dfort

Excellent bug hunting!

This might be the problem:

platform/650.104/stubs.S
NSTUB(0xFF666C4C,  PlayMovieGuideApp_handler)

Looks like it should be:
NSTUB(0xFF542BA0,  PlayMovieGuideApp_handler)

Made a new lua_fix build and posted it on my downloads page. Let's see if that works.

Walter Schulz

IMO there is something wrong with this build. Cam locked with red led constantly on (Powerswitch off).

saulbass

@dfort - I haven't checked your revised build as am short on time right now, but would make the point that I reran the entire vanilla api_test.script test again with the potentially offending assert(camera.gui.play_movie == true) commented out and once again the movie test failed to run.

650D.104 1855kit lens with magiclantern-lua_fix.2018Mar31.650D104

My gut feeling is that there is more than one thing at play here - an interaction between two aspects. Quite what, is hard to say..


saulbass

addenda -

replace: once again the movie test failed to run.

with: once again the movie test failed to complete.

dfort

Quote from: Walter Schulz on April 27, 2018, 08:12:45 AM
IMO there is something wrong with this build. Cam locked with red led constantly on (Powerswitch off).

Oops -- my bad.

FYI, you can open the autoexec.bin file with a text editor to get some information about the build. In this case:

Magic Lantern Nightly.2018Apr26.650D104
Camera   : 650D
Firmware : 104
Changeset: 4918aeffbdbe+ (lua_fix)
Built on : 2018-04-27 00:08:54 by rosiefort@RosieFoComputer

diff -r 4918aeffbdbe platform/650D.104/stubs.S
--- a/platform/650D.104/stubs.S Sat Mar 31 15:48:50 2018 +0200
+++ b/platform/650D.104/stubs.S Thu Apr 26 17:08:54 2018 -0700
@@ -132,7 +132,7 @@
NSTUB(0xFF52A8C4,  LiveViewApp_handler_end)                 // start of next function
NSTUB(0xFF6E056C,  LiveViewShutterApp_handler)
NSTUB(0xFF6F9D74,  PlayMain_handler)
-NSTUB(0xFF666C4C,  PlayMovieGuideApp_handler)
+NSTUB(0xFF542BA0,  PlayMovieGuideApp_handler)
NSTUB(0xFF52EFE8,  ShootOlcApp_handler)                     // AJ_DIALOG.HANDLER_DlgShootOlcInfo.c
// NSTUB(    ???,  LiveViewLevelApp_handler)                /* present on 5D3.113 */
// NSTUB(    ???,  LiveViewWbApp_handler)                   /* present on 7D.203, 5D3.113, 5D2.212 */


CONFIG_QEMU = y


Notice that last line? I'm checking everything in QEMU and forgot to turn off that option. Sorry for the screw up, new test build ready.

@saulbass - There's a chance that an incorrect stub might be putting the camera into an unstable condition. Try the new build I posted.

saulbass

@dfort - something funny with the latest rebuilds - camera behaves as if bricked - best to avoid these.

dfort

@saulbass - are you on the April 27 build? There was a problem with the April 26 build.