help: how to debug script interrupting? - page 7 - General Discussion and Assistance - CHDK Forum supplierdeeply

help: how to debug script interrupting?

  • 224 Replies
  • 39030 Views
*

Offline reyalp

  • ******
  • 13432
Re: help: how to debug script interrupting?
« Reply #60 on: 11 / July / 2012, 01:37:21 »
Advertisements
Here's another test build with some additional debug code added. If you haven't already got dumps from the previous one (1971-1) please disregard it and use this one instead.

In this build, you may see messages in the script console like ASSERT: foo.c 123 ...
If so, please report them. As with the previous build I also want to see any *.DMP files that are generated.
Don't forget what the H stands for.

Re: help: how to debug script interrupting?
« Reply #61 on: 12 / July / 2012, 07:32:09 »
thanks
here we are (build 1974)

Console message:
ERROR: Null error message
PRESS SHUTTER TO CLOSE

meminfo:
free 1618624
chdk 249456
loaded at 0x3B089E0

dump file: http://www.experience-3.com/LUARES1.DMP

hope it will help
thx


*

Offline reyalp

  • ******
  • 13432
Re: help: how to debug script interrupting?
« Reply #62 on: 13 / July / 2012, 01:43:02 »
dump file: http://www.experience-3.com/LUARES1.DMP

hope it will help
thx
It narrows things down some, but it's quite confusing. Are you certain this is the only .DMP file created ?

This shows that the call to luaD_rawrunprotected in lua_resume is returning non-zero, but I don't see how it can do that without triggering another dump (which should create LUATHROW.DMP)

I'll have dig a bit more to figure out what the next step is.
Don't forget what the H stands for.

Re: help: how to debug script interrupting?
« Reply #63 on: 13 / July / 2012, 13:29:27 »
yes I'm sure that is the only dump file created...

I have other news: previously I said that also ubasic scripts gave same error but actually that was wrong, I misunderstood what the person, that made the test with ubasic, told me.
So I tried to "translate" my lua script in ubasic (simplifying it) and it works perfectly, no crash, no errors on all 60 cams...
Now I have another big problem (but I'll write another post for that): if I use any script my 60 cams do not shoot synchronously, there is a random delay on each cam, sometime small, sometime bigger... We were very worried about that then we tried to use the built remote functionality (no scripts and chdk disabled) and cams are in sync... does this mean that by using script I cannot have sync guaranteed?


Re: help: how to debug script interrupting?
« Reply #64 on: 13 / July / 2012, 13:35:45 »
does this mean that by using script I cannot have sync guaranteed?
Not at all.

It just means that you have to write the script with an understanding of how CHDK sync works.  You will likely still need to use the USB  remote sync  built-in features - scripting alone will not be fast or precise enough. You just need to control the sequence that leads up to triggering through your script rather than the built-in triggering functions.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: help: how to debug script interrupting?
« Reply #65 on: 13 / July / 2012, 13:45:43 »
ok,
currently the code that triggers te shoot is the following:
Code: [Select]
press "shoot_half"
sleep 2000
set_aflock 1
v=0
while v<1
    wait_click 1
    if is_key "remote" then
         click "shoot_full"
         v=1
    endif
wend
release "shoot_half"
set_aflock 0

(build 1950, dev branch, Enable remote = yes, SwithcType= onePush, ControlMode = none, Sync Enabled)

With this configuration the actual shoot is taken when I release my external trigger, so I thought the code was not anymore involved in this...
is this correct? shall I use the "yield" feature?

(if this is wrong please give me some hints on where to find documentation about "how CHDK sync works." thx
« Last Edit: 13 / July / 2012, 14:07:51 by Alarik »

Re: help: how to debug script interrupting?
« Reply #66 on: 13 / July / 2012, 15:11:28 »
does this mean that by using script I cannot have sync guaranteed?

Yes.

It will not be precision synch.


David

Re: help: how to debug script interrupting?
« Reply #67 on: 13 / July / 2012, 15:21:20 »
Quote
It will not be precision synch.

Thx... since i got 60 cams and i need precision synch but also ability to set shutter speed, exposure, check focus, etc... do you think it would be possibile for me to code directly in C some personal code to achieve my tasks and obtain precision sync or shall I surrender to the fact that to have precision sync I have to do all operations manually on each cam?

Do you think that SDM could solve my problems?

thanks


Re: help: how to debug script interrupting?
« Reply #68 on: 13 / July / 2012, 15:36:49 »

Do you think that SDM could solve my problems?

No.

Neither will PTP commands.

Quite simply, the cameras are not electrically connected.
There is no guarantee that a script command will be executed on any particular 'tick' of the clock.
Apart from that, the clocks are not running in synch, there is a random and probably changing clock phase-difference between all cameras.
« Last Edit: 13 / July / 2012, 15:40:16 by Microfunguy »

Re: help: how to debug script interrupting?
« Reply #69 on: 13 / July / 2012, 15:42:30 »
Quote
There is no guarantee that a script command will be executed on any particular 'tick' of the clock.

I perfectly understand this but, with "Sync Enabled" feature
i see that when i click the trigger, the 'click "shoot_full"' function is called
but is not returned immediatly, it waits that I release the trigger,
since I did not code this, I though that all this behaviour (waiting for release)
was not handled by the script engine but directly from chdk core (so no "tick" waiting)... as the built in feature...
Am I wrong?

Moreover: on SDM yahoo group they say that are able to synch cams perfectly to 1/1000th with flash...
« Last Edit: 13 / July / 2012, 15:44:55 by Alarik »

 

Related Topics