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

CHDKPTP - PC Remote Control Performance Analysis

  • 465 Replies
  • 119651 Views
*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #150 on: 11 / September / 2012, 01:17:03 »
Advertisements
I'm thinking ... maybe dcimdl() needs to be peppered with some small sleeps??

*

Offline reyalp

  • ******
  • 14079
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #151 on: 11 / September / 2012, 01:22:00 »
I'm thinking ... maybe dcimdl() needs to be peppered with some small sleeps??
No, there's no reason for that. Shoot is a special case, because that's the camera firmware opening and writing files in ways that we aren't in direct control of. The commands in dcimdl will only return when they are actually complete.
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14079
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #152 on: 11 / September / 2012, 01:29:09 »
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.
It worked for a 100 shots with my camera, using an ancient slow 1gb SD card. So I really don't have any insight as to what might be happening on yours.

You are only shooting jpeg correct ? If you are shooting DNG or RAW, it will take a lot longer, in that case 6+ seconds wouldn't be unreasonable.
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #153 on: 11 / September / 2012, 01:39:01 »
No, 6 sec doesn't work ... this time after 37 myshoots.  There's definitely something else, and now "the feeling" is more unrelated than related.  Why .. I got a similar power lock-out just by starting up camera+CHDKPTP from cold and playing the play/rec buttons with no files in directories.

That's it for me for today.


*

Offline reyalp

  • ******
  • 14079
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #154 on: 11 / September / 2012, 12:59:50 »
No, 6 sec doesn't work ... this time after 37 myshoots.  There's definitely something else, and now "the feeling" is more unrelated than related.  Why .. I got a similar power lock-out just by starting up camera+CHDKPTP from cold and playing the play/rec buttons with no files in directories.

That's it for me for today.
If it always stops at exactly 37 now, maybe there is some other problem.

I'd suggest getting another romlog and seeing if it is different from the previous one. If this happens on both cameras, get a romlog from each one. If you can get the current romlogs, I'll try to take a look and see what part of the code they are from.

Given that you had a lot of crashes while the camera was writing files, it's possible your filesystem got messed up.

As I said earlier, it's also possible that the canon OS isn't expecting the CANONMSC directory or current image directory to disappear out from under it at random times. OTOH, my D10 seemed OK with it.

Another thing you could try to do is work out exactly which call it crashes on. You could also try eliminating different parts (e.g. don't download, just delete, or don't delete, just download)

Quote
Why .. I got a similar power lock-out just by starting up camera+CHDKPTP from cold and playing the play/rec buttons with no files in directories.
No information I can do anything with there.
edit: But if you get a ROMLOG, please make sure you know which crash it's from, e.g. wait for the specific crash you wan to investigate to happen and get a romlog right after that. Then check the time in the log to make sure it matches, because some crashes don't make a log and then you get an old one.
« Last Edit: 11 / September / 2012, 13:05:04 by reyalp »
Don't forget what the H stands for.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #155 on: 11 / September / 2012, 13:59:19 »
Quote "You are only shooting jpeg correct ?"

Yes, they are 1M JPGs ... small to help isolate the problem.  I wait long enough until everything on the camera LCD settles and is ready for the next shot before I allow dcimdl() to execute ... roughly 2s after myshoot, so I give it 4s to be sure.  I think that's not the problem ... only that w/o the sleep it occurs much more frequently.

Quote "If it always stops at exactly 37 now, maybe there is some other problem."

No it doesn't ... see below, with ROMLOG etc.

Quote "Given that you had a lot of crashes while the camera was writing files, it's possible your filesystem got messed up."

No, that's not the case.  I make sure the sleep in front of dcimdl is long enough to put the camera state into "I am ready for the next shot."  So definitely not while the SD is written.  I did another similar test -- see below.

Quote "Another thing you could try to do is work out exactly which call it crashes on. You could also try eliminating different parts (e.g. don't download, just delete, or don't delete, just download)"

I could try that but as I am discovering more and more, the crashes randomly occur anywhere in listdir, mdl, rm, except shoot ... shoot always works.  So for example if I knock out mdl and rm, I expect it will occur expect less often (go on for more successful myshoots).


Here is my understanding and insight I can presently offer:

#1 - I peppered dcimdl with 200ms sleeps (a very honest and real hack because fundamentally I have no idea what I'm doing) and the highest number of myshoots in a row I got was 40 // in effect, no difference.

#2 - The failure could happen during any of the three calls inside dcimdl() -- I certain now it's random, and even less related to the long sleep.  Your shoot in myshoot has not failed.

#3 - I had a case yesterday where turning camera ON (with empty DCIM) and pressing PLAY/REC gave me the dead condition with the usual ptp error.

#4 - I restored the functional condition.

#5 - I figured this  ...... the only asynchronous event I know that could interfere of is liveview.  Liveview on the SX110 bench is 2.7 to 3 fps.   I have had liveview running by itself overnight on the SX110 w/o a problem.  So I set fps to 1, and I could see the slow transfer for a few frames.  I left the bench unattended for a couple of minutes and came back to a dead system.  There was *no* ptp error, in fact no message at all anywhere ... as if everything had frozen in time.  Very strange.

#6 - After PDN/PUP, Connect, save ROM_7 attached for the above, REC mode, and no freeze for at least 10 minutes // OK.

#7 -  My hypothesis, and hope, was to observe a statistical increase in the number of myshoots.  So at 1 fps the first fail was at 7 myshoots, and the second fail was at 39 // in essence no difference.

#8 - The next step I restored the faster frame rate and increased the peppered sleeps in dcimdl: 0.4s, 1s (in addtion to 4s before dcimdl). 

#9 - Again  no difference .... but ..... look what noticed in the Fig 1 (next post)  ..  a sudden drop to 20K max block.   That myshoot worked, but failed on the next attempt.

#10 - I reset the liveview to 3 fps and noticed a similar effect before failure, Fig 2 next post.  So there may *in fact* be something related to malloc() which is transient and occurs randomly affecting only the functions in dcimdl ??

Q1.  Does listdir return after it has delivered the goods?

Q2.  Does mdl return only after it has delivered the goods?


I hope this helps.  A tiny thing I never expected but showstopper.  I am getting a little worried and willing to put more elbow grease to resolve it.  Other than what you already suggested, how can we look deeper into the fail event?  Another kind of debug code?  elsewhere?

See next post for more attachments.

*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #156 on: 11 / September / 2012, 14:03:06 »
20K transient max block figures

Quote "wait for the specific crash you wan to investigate to happen and get a romlog right after that"

That's what I did above.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #157 on: 11 / September / 2012, 14:09:05 »
Quote "If it always stops at exactly 37 now, maybe there is some other problem."

The longest good train of myshoots I could get is 49 with the sleep-peppered dcimdl.  The one I got just now stopped at 18 // so it is random.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #158 on: 11 / September / 2012, 14:25:09 »
ZIP

Screen shots from yesterday and today.


*

Offline SticK

  • *****
  • 779
Re: CHDKPTP - PC Remote Control Performance Analysis
« Reply #159 on: 11 / September / 2012, 15:02:32 »
Another ROMLOG.

This one occurred at 12:21 today so it must be one of the regulars.  Now that I have the hang of date/time verfication, I will staple them together with the screen shots.

 

Related Topics