CHDKPTP - PC Remote Control Performance Analysis - page 14 - RAW Shooting and Processing - CHDK Forum supplierdeeply

CHDKPTP - PC Remote Control Performance Analysis

  • 465 Replies
  • 130605 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #130 on: 10 / September / 2012, 18:09:34 »
Advertisements
I tried to narrow the problem source .... basically I cannot do more than 2-3 fully-functional myshoots in a row without a fail. 

I turned off the viewfinder because I thought at first there could be interference.  No difference.  Here is an example where the 1st two shots worked after a cleared DCIM, but the 3rd failed, leaving the files in the directory requiring hand removal.  When I get the ptp error, the camera LCD goes dead too and I have to power the camera OFF/ON and delete the directories.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #131 on: 10 / September / 2012, 19:55:43 »
More info ........

The problem also occurs on the SX110.  I did not go with enough shots to see it earlier.  Here there were 4 good shots and fail on the 5th, Fig 2. 

Fig 1 is S90 only, Fig 2 is S90 followed by SX110.  In the case of SX110, it's "ERROR: ptp error" w/o entry into listdir(). 

However I've seen the SX110 error also occur with the S90 once.

Are you OK after a good beer?  What should I look at to give you more data?

edit: LCD on the SX110 goes dark and lens stays extended -- same behavior as S90.
« Last Edit: 10 / September / 2012, 20:07:45 by SticK »

Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #132 on: 10 / September / 2012, 19:56:53 »
Are you OK after a good beer?  What should I look at to give you more data?
Or another spelling lesson ?   ::)
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #133 on: 10 / September / 2012, 20:08:53 »
What would we all do without you!?


Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #134 on: 10 / September / 2012, 20:22:25 »
What would we all do without you!?
touche'
Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #135 on: 10 / September / 2012, 20:37:26 »
Near end of historical tennis game // CBS.   Murray wins, will be the first UK male to win Grand Slam since 1936.

*

Offline reyalp

  • ******
  • 14114
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #136 on: 10 / September / 2012, 22:19:25 »
The one that says "not enough memory" seems clear enough. If the camera runs out of memory, what happens depends on exactly where the malloc fails. Lua may return the above mentioned error, if you are lucky. If the Canon system fails, it will probably shut down.

To get memory info from the camera, you can use
Code: [Select]
!return con:execwait('return get_meminfo()')
in the cli.
Getting this information at each step of your shoot/download/delete function could shed some light. To do this from lua code you could use something like
Code: [Select]
local status,mi=con:execwait('return get_meminfo()');
print(status,serialize(mi))
edit:
Also, from the my previous post
Quote
There may be some text in the command prompt window rather than the gui console.

You should also know that some memory is consumed for each image you take, and deleting the file does not free it. See http://chdk.wikia.com/wiki/CHDK/Camera_RAM_memory_usage for some information.
This should not be an issue on a camera with a reasonable amount of free memory until you have taken a lot of shots.

The current 1.1 builds  for most cameras have a very hacky thing in the ptp code that determines the amount of free memory by repeatedly mallocing larger and larger blocks. This may cause problems. I can provide builds use camera functions to check available memory. The 1.2 (unstable) builds do this by default.

If you can post the full code for your current "myshoot" function, that may help.
« Last Edit: 10 / September / 2012, 22:25:49 by reyalp »
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #137 on: 10 / September / 2012, 23:19:55 »
The typical return code in the DOS window is 0x2ff and occurs whenever a ptp error happens.  I haven't seen anything other than this.

Canon seems to "hang" rather than do a clean shutdown ... the lens stays extended and everything dies.

Also the camera LCD can die first, but it keeps running for one more shot, then all dies with a ptp error.  I always have viewfinder running.

I noted just now that it's quite random ... On the SX110 I can go 10 shots and all's fine until the 11th shot, or I get the problem 1st or 2nd shot ptp error.  The scene and exposure parameters are always the same.

The image files are always saved OK on the SD no matter what happens.  So I thought the fault occurs after the save.  I tried a con:exec('sleep(1000)') right after your shoot, to stave off possible command execution collision, but no help there.

Memory?  With the SX110 I only shoot a JPG and with the S90 I shoot JPG and Canon CR2.  The behavior is very similar with the two cameras. 

Code: [Select]
function dcimdl(destdir,del,pretend)
    if pretend then
        pretend = '-pretend '
    else
        pretend = ''
    end
    local dcim,err=con:listdir('A/DCIM')
    if not dcim then
        printf('error listing directory %s\n',tostring(err))
    return
    end
    for i,dname in ipairs(dcim) do
        if dname ~= 'CANONMSC' then
            cli:print_status(cli:execute('mdl '..pretend..' -fmatch=%.[JDC][PNR][G2W]$ DCIM/'..dname..' '..destdir))
            if del then
                cli:print_status(cli:execute('rm '..pretend..' -skip_topdirs DCIM'))
            end
        end
    end
end


function myshoot(tv, av, sv, destdir)
  cli:execute('shoot -tv='..tv..' -av='..av..' -sv='..sv..'')
  -- con:execwait('sleep(1000)')
  dcimdl(destdir, true, false)
end

I will fulfill the rest of your requests shortly.


*

Offline reyalp

  • ******
  • 14114
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #138 on: 10 / September / 2012, 23:32:10 »
Memory?  With the SX110 I only shoot a JPG and with the S90 I shoot JPG and Canon CR2.  The behavior is very similar with the two cameras. 
The file format is irrelevant. Memory in this case refers to camera RAM, not SD storage.  You got at least one "out of memory" form lua, and the other symptoms you describe are consistent with running out of RAM. So it would be good to know how much free memory each camera has on startup. You can get this with the get_meminfo line I posted earlier to get this.
Quote
Canon seems to "hang" rather than do a clean shutdown ... the lens stays extended and everything dies.
When the canon firmware encounters an error, it shuts down without parking the lens. In will normally record a crash log on internal flash. http://chdk.wikia.com/wiki/Debugging#Camera_crash_logs_.28romlog.29 explains how to get the crash log. This may provide useful clues.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #139 on: 10 / September / 2012, 23:47:34 »
Yes I was indeed referring to RAM.  I somehow don't think it's the problem .. because again two different cameras doing basically similar behavior.

The max block switches between 2 values, 405K and 438K.

Code: [Select]
function dcimdl(destdir,del,pretend)

local status,mi=con:execwait('return get_meminfo()');
print("enter dcimdl:",status,serialize(mi))


    if pretend then
        pretend = '-pretend '
    else
        pretend = ''
    end
    local dcim,err=con:listdir('A/DCIM')

local status,mi=con:execwait('return get_meminfo()');
print("after listdir:",status,serialize(mi))


    if not dcim then
        printf('error listing directory %s\n',tostring(err))
    return
    end
    for i,dname in ipairs(dcim) do
        if dname ~= 'CANONMSC' then
            cli:print_status(cli:execute('mdl '..pretend..' -fmatch=%.[JDC][PNR][G2W]$ DCIM/'..dname..' '..destdir))

local status,mi=con:execwait('return get_meminfo()');
print("after mdl",status,serialize(mi))


            if del then
                --cli:print_status(cli:execute('rm '..pretend..' -nodirs -fmatch=%.[JDC][PNR][G2W]$ DCIM/'..dname))
                cli:print_status(cli:execute('rm '..pretend..' -skip_topdirs DCIM'))
            end
        end
    end
end

function myshoot(tv, av, sv, destdir)
  cli:execute('shoot -tv='..tv..' -av='..av..' -sv='..sv..'')
  dcimdl(destdir, true, false)
end

edit: this time it hit 17 good and failed on the 18th.
« Last Edit: 10 / September / 2012, 23:50:20 by SticK »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal