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

CHDKPTP - PC Remote Control Performance Analysis

  • 465 Replies
  • 132329 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #140 on: 11 / September / 2012, 00:01:24 »
Advertisements
Here is another form of failure, here after 12 good shoots.

I don't detect any memory problems from this test, no leaks, memory is stable.

I will get the SD crash log data next.

*

Offline reyalp

  • ******
  • 14118
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #141 on: 11 / September / 2012, 00:13:55 »
Ok some observations:
There's a logic error in the code you posted, the delete will be done for each directory in DCIM. This isn't the cause of your problem though.

On my D10, running your code crashes right after the first shot. The romlog is
Code: [Select]
ASSERT!! FsIoNotify.c Line 451
Occured Time  2012:09:10 19:52:31
Task ID: 12714009
Task name: PhySw
This is an error we know, it happens if too many file handles are open on the camera.

If I enter the shoot and the !dcimdl() manually, it doesn't crash.

If I put
Code: [Select]
sys.sleep(2000)
between the shoot and dcimdl, it doesn't crash. Conclusion is the download tries to run while while the camera still has files open related to the shot.

Assuming you are getting the same crash I am, you were on the right track with con:execwait('sleep(1000)'). I'm not sure why this didn't work, but it is a camera side sleep while sys.sleep is PC side. If the remote call failed for any reason (like a script still running) then it would return instantly.

edit:
A romlog would confirm whether or not you are getting the same assert.
« Last Edit: 11 / September / 2012, 00:15:55 by reyalp »
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #142 on: 11 / September / 2012, 00:14:58 »
ROMLOG dump after restoring power to SX110 following the previous failure and using CHDK menu option to dump.

*

Offline reyalp

  • ******
  • 14118
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #143 on: 11 / September / 2012, 00:17:35 »
ROMLOG dump after restoring power to SX110 following the previous failure and using CHDK menu option to dump.
Your romlog isn't the same as mine, but it might be a similar problem.

edit:
And I agree, this does not appear to be a RAM issue.
« Last Edit: 11 / September / 2012, 00:19:09 by reyalp »
Don't forget what the H stands for.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #144 on: 11 / September / 2012, 00:20:35 »
Quote "between the shoot and dcimdl, it doesn't crash."

==>> That's exactly what I did with my 1st presentation of the code earlier this evening, but I only went up to 1000 ms and explained that I saw no differences ... so I suppose was on the right track, but my presumption was not file handles, but rather a timing conflict of some sort??

Can you do 50 myshoots on yours?


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #145 on: 11 / September / 2012, 00:22:13 »
I want to try it again ... is this the correct syntax?

 con:exec('sleep(2000)')

*

Offline reyalp

  • ******
  • 14118
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #146 on: 11 / September / 2012, 00:26:51 »
I want to try it again ... is this the correct syntax?

 con:exec('sleep(2000)')
no
Please read the post. Mine uses sys.sleep which is a local lua function on chdkptp. Your code tries to run a script on the camera that sleeps, and doesn't check for errors.

I'm trying run 100 shoots with my script now, it seems ok so far

edit:
If you use con:exec() it doesn't wait, so the following stuff would try to run right away. If you used con:execwait() it should work in theory, but since you don't check the return status, you don't know.

edit:
100 shots completed ok.
« Last Edit: 11 / September / 2012, 00:32:51 by reyalp »
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #147 on: 11 / September / 2012, 00:55:33 »
Quote "Conclusion is the download tries to run while while the camera still has files open related to the shot."

That was my rationale in the first place for the botched sleep attempt.

I used your sys.sleep(2000) and got up to 37 good myshoots and then a failure, exactly the same as the last one.  I am saving only 1 JPG.  My time may be inadequate.  So this is really not a good soln because it is asynchronous, right?  Thus the your shoot function returns before the files are closed on SD after write, correct?   If true, then I have to make my sleep for the worst case write, is that right?  That means I'd have to eyeball the camera LCD, time the reappearance of liveview, and make sure sleep is longer??


*

Offline reyalp

  • ******
  • 14118
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #148 on: 11 / September / 2012, 01:09:24 »
Thus the your shoot function returns before the files are closed on SD after write, correct?
Right, shoot doesn't know when the camera files have finished writing.
Quote
   If true, then I have to make my sleep for the worst case write, is that right?
Yes, there is currently no way to check the condition that triggers the crash without crashing.
Quote
That means I'd have to eyeball the camera LCD, time the reappearance of liveview, and make sure sleep is longer??
I don't know that the reappearance of the live view would be a useful indicator. You are probably better off increasing the value until it doesn't crash over some sufficiently large number of exposures.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #149 on: 11 / September / 2012, 01:13:07 »
That can't be it // I went up to sys.sleep(3000) to make sure the shot image appeared in the viewfinder plus decent headroom before download activity.  I could see the CHDK message box flicker on the camera LCD and it was much later (by about 1 sec) after the appearance of the shot image.  So the timer was working, but, I still got a failure this time after 6 myshoots.  Please see if you can come up with something new I can test.  So no // no go ... something like related but unrelated.  It's late ... talk to you tomorrow.

edit: the blue light stops blinking too, when the shot shows up in liveview, so I think I'm OK.   I will try 6 seconds but I think that's ridiculously long.
« Last Edit: 11 / September / 2012, 01:15:21 by SticK »

 

Related Topics


SimplePortal 2.3.6 © 2008-2014, SimplePortal