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

help: how to debug script interrupting?

  • 224 Replies
  • 64725 Views
Re: help: how to debug script interrupting?
« Reply #30 on: 05 / July / 2012, 22:09:31 »
Advertisements
It be quite mind boggling if a bad power supply could make both kinds of scripts die without killing kbd task. kbd_task dying would render the camera unusable.
Was responding to your musing about random key presses.   If the PS "glitches" things so that they look like random key presses but does not crash either processor then that might explain it ?

Ported :   A1200    SD940   G10    Powershot N    G16

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #31 on: 06 / July / 2012, 00:14:15 »
It be quite mind boggling if a bad power supply could make both kinds of scripts die without killing kbd task. kbd_task dying would render the camera unusable.
Was responding to your musing about random key presses.   If the PS "glitches" things so that they look like random key presses but does not crash either processor then that might explain it ?
Random key presses should give the "interrupted" message. Plus should have just as much chance of starting a script as stopping it. Or shooting randomly if not in alt mode.

FWIW, D10 is still running, battery icon is flashing now though

edit:
attached script ran for 5+ hours with no issue
« Last Edit: 06 / July / 2012, 00:20:23 by reyalp »
Don't forget what the H stands for.

Re: help: how to debug script interrupting?
« Reply #32 on: 06 / July / 2012, 00:15:54 »
FWIW, D10 is still running, battery icon is flashing now though
Are you running a script ... something interesting like pi to 4500 places ?
Ported :   A1200    SD940   G10    Powershot N    G16

Re: help: how to debug script interrupting?
« Reply #33 on: 06 / July / 2012, 12:18:21 »
So:
(from now on when I say "crash" or "error" i mean the "press shutter to close" ending script msg)

- it happens completly random, sometimes after 1 hour no problem, sometimes problems after 5 min...
- on 60 cams after 1 hour, about 50 of them experienced the error
- what appears on the screen is only and just the msg "PRESS SHUTTER TO CLOSE"
- when it crashes the restore() function is never called (tested and verified)
- my script is long and complex but the error arises also on super simple hard loops like

Code: [Select]
while(true) do
  sleep(3000)
end

here there's a picture showing: http://www.experience-3.com/camerror1.jpg
that's a point of the script where it just wait for a remote click to shoot,
as you can see cam52 is ok, still waiting while cam 23 crashed suddenly and with
no clear reason (I was doing nothing, no pressing buttons, nothing...)...
(NEOR6-RR etc... is the name of my script)

For the moment I worked-around the problem by enabling the "restart lua on error", but since my script
has different status this is not optimal as it could restart on a status different from the one in the other cams, so I always have to synch them manually...

On next days I'll be back in the studio where I have all the cams and try to reproduce again the error with the REMOTE.BAS script.


Quote
I could do a build for him without exmem and maybe everything but Lua turned off ?

well, I dont want to bother you but if you got time to do it I would appreciate it  :)

« Last Edit: 06 / July / 2012, 12:25:03 by Alarik »

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #34 on: 06 / July / 2012, 14:49:35 »
well, I dont want to bother you but if you got time to do it I would appreciate it  :)
I'm happy to provide test builds. Which canon firmware versions of sx130 do you have ?
Don't forget what the H stands for.

*

Offline philmoz

  • *****
  • 3450
    • Photos
Re: help: how to debug script interrupting?
« Reply #35 on: 06 / July / 2012, 19:39:23 »

here there's a picture showing: http://www.experience-3.com/camerror1.jpg


That would seem to indicate that Lua did print an error message at the start of lua_script_error; but the error message was empty (the blank line above the PRESS SHUTTER TO CLOSE message).

Not sure how this could happen; but it might provide a clue as to where to look.

Maybe do a build that displays free memory (both Canon heap and exmem) and see if it might be a leak somewhere.

Phil.
CHDK ports:
  sx30is (1.00c, 1.00h, 1.00l, 1.00n & 1.00p)
  g12 (1.00c, 1.00e, 1.00f & 1.00g)
  sx130is (1.01d & 1.01f)
  ixus310hs (1.00a & 1.01a)
  sx40hs (1.00d, 1.00g & 1.00i)
  g1x (1.00e, 1.00f & 1.00g)
  g5x (1.00c, 1.01a, 1.01b)
  g7x2 (1.01a, 1.01b, 1.10b)

Re: help: how to debug script interrupting?
« Reply #36 on: 07 / July / 2012, 07:25:46 »
Quote
I'm happy to provide test builds. Which canon firmware versions of sx130 do you have ?

wow,
I got canon SX130IS firmware GM1.01F (1.0.1.0)

thanks a lot!!


Quote
Not sure how this could happen; but it might provide a clue as to where to look.
I always ahd this blank line above the "press shutter..." except ONE time (only one), when it showed:

20
PRESS SHUTTER TO CLOSE

there was this "20" above the line, but onyl happened one time...
can it be useful?

« Last Edit: 07 / July / 2012, 07:54:16 by Alarik »

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #37 on: 07 / July / 2012, 20:35:10 »
OK, I've made two test builds, one with exmem enabled and one without.

These are trunk builds so you will need the modules along with the DISKBOOT.BIN/PS.FI2

The non-exmem build has ubasic and most other optional features disabled. Even so, it might not have enough memory to boot or run lua. If it boots, please report the values in "miscellaneous->show memory info"

Both will write a stack dump (plus the current time and memory information) if lua returns an error or panics. The lua error function also notices if it gets an NULL or empty message, and displays a message on the screen indicating this. For a normal error, the dump will be written to A/LUAERR.DMP. For a panic, it will be written to A/LUAPANIC.DMP. It's possible a panic will also cause the error case to be hit.

For this test, I suggest you not use "restart on error"

The dumps will not be automatically removed, so if you get them, please remove them before starting another test run. They will be overwritten if there is another error, but it could cause confusion.

Don't forget what the H stands for.

Re: help: how to debug script interrupting?
« Reply #38 on: 07 / July / 2012, 20:38:53 »
These are trunk builds so you will need the modules along with the DISKBOOT.BIN/PS.FI2
I don't know if it matters, but so far all testing has been with the stable release AFAIK.   So if both these run without scripts halting,  we still have an additional permutation to consider.
Ported :   A1200    SD940   G10    Powershot N    G16

Re: help: how to debug script interrupting?
« Reply #39 on: 08 / July / 2012, 06:09:24 »
Quote
OK, I've made two test builds, one with exmem enabled and one without.

thank you very much!!!
I appreciate!

On this week I'll be in the studio and test the builds with all the cams.
As soon as I'll have some result I will report them here.

thanks again

 

Related Topics


SimplePortal © 2008-2014, SimplePortal