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

help: how to debug script interrupting?

  • 224 Replies
  • 64723 Views
Re: help: how to debug script interrupting?
« Reply #50 on: 09 / July / 2012, 03:46:40 »
Advertisements
Thank you very much for all your efforts.

Just installed the exmem version and had a crash:

message on console:
ERROR: NULL error message
PRESS SHUTTER TO CLOSE

Mem Info:
Free: 1790360
Chdk: 226224
Loaded at: 0x3B089E0

but NO DUMP file... (no LUAERR, LUAPANIC, LUA*,...)

Re: help: how to debug script interrupting?
« Reply #51 on: 09 / July / 2012, 04:21:30 »
I succeeded in installing the no-exmem version, had the crash, here are the datas:

msg:
ERROR: NULL error mesage
PRESS SHUTTER TO CLOSE

mem info:
Free: 498912
Chdk: 202320
loaded at: 0xF00000

also in this case no Dump files...

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #52 on: 09 / July / 2012, 12:31:57 »
Thanks. It looks like I must have messed something up with the dump call. I'll put up a new build when I get a chance.

The fact that it happens with the no exmem version is a useful data point. It's also interesting the non-exmem version shows nearly 500k free, this should be plenty to run CHDK, even without everything disabled. It looks like the load address was the problem with the previous build. This is... odd.
Don't forget what the H stands for.

Re: help: how to debug script interrupting?
« Reply #53 on: 09 / July / 2012, 12:36:48 »
some additional infos on other tests made with 60 cams:

- the "press shutter to close" error still appears randomly but on the phase on which I press and keep pressed (so that on release it will shoot) I always experience 1 or 2 cams crashing

- I did a test using batteries on 10 cams, the problem appears much less times but still appears sometimes

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #54 on: 09 / July / 2012, 16:06:38 »
some additional infos on other tests made with 60 cams:

- the "press shutter to close" error still appears randomly but on the phase on which I press and keep pressed (so that on release it will shoot) I always experience 1 or 2 cams crashing
Do you mean an actual crash (camera shuts down or becomes unresponsive) or the "press shutter to close" ?

Quote
- I did a test using batteries on 10 cams, the problem appears much less times but still appears sometimes
If you can measure this quantitatively with a reasonable sample size, that could be useful data. Otherwise, I'm very wary of vague "seems to happen more/less often".
« Last Edit: 09 / July / 2012, 16:14:20 by reyalp »
Don't forget what the H stands for.

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #55 on: 09 / July / 2012, 16:30:23 »
Regarding the missing dumps, can you you check whether a normal lua error creates one ? Run a script with something like
Code: [Select]
foo()
where foo is NOT defined anywhere. This should produce an error like "attempt to call global 'foo' (a nil value)" and create LUAERR.DMP in the root of the SD card.

I checked the binaries I posted, and they definitely have the call to the dump function in the expected place. This  worked (with a regular lua error, as above) on my D10.
Don't forget what the H stands for.

Re: help: how to debug script interrupting?
« Reply #56 on: 10 / July / 2012, 11:16:47 »
Quote
Do you mean an actual crash (camera shuts down or becomes unresponsive) or the "press shutter to close" ?

sorry, I always mean "press shutter to close" error


Quote
If you can measure this quantitatively with a reasonable sample size, that could be useful data. Otherwise, I'm very wary of vague "seems to happen more/less often".

Ok, i'll try on next test session

Quote
Regarding the missing dumps, can you you check whether a normal lua error creates one ?

Ok, so I made the foo() script, the script terminates saying:
:6 attempt to call global 'foo' (a nil value)
PRESS SHUTTER TO CLOSE

meminfo:
free: 498912
chdk: 202320
loaded at: 0xF00000

It did create a dump file (dont know if you need, if you do its here: http//www.experience-3.com/foo_LUAERR.DMP

One more thing: maybe its' unfeasible but: would be it possible to modify the code that generates the "PRESS SHUTTER TO CLOSE" in order that if the error is NULL (as in my case), the script is not interrupted, the error is ignored and the script keeps going...?

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #57 on: 10 / July / 2012, 13:04:24 »
One more thing: maybe its' unfeasible but: would be it possible to modify the code that generates the "PRESS SHUTTER TO CLOSE" in order that if the error is NULL (as in my case), the script is not interrupted, the error is ignored and the script keeps going...?
Lua think it encountered an error, so it's very unlikely that it could continue in this case. I suspect the error isn't always null either, as you have reported sometimes it showed a number (and I think other people have seen something like this in the past), more likely it's garbage in memory that usually contains a null.

The fact that this error does not trigger a dump is a very important clue. I'll have to spend some time looking at the code to figure out what it means, but it should get us closer to the root cause.
Quote
meminfo:
free: 498912
chdk: 202320
loaded at: 0xF00000
Sorry if I wasn't clear, I don't need this every time. Since the error happens in the no-exmem version, we have ruled out exmem as the source. I'd suggest you do all future testing with the exmem version, since the no-exmem one is seriously crippled.

Thanks for your help so far.
Don't forget what the H stands for.

Re: help: how to debug script interrupting?
« Reply #58 on: 10 / July / 2012, 13:33:25 »
Quote
Thanks for your help so far.

I have to thankyou for all your support, sincerly!

*

Offline reyalp

  • ******
  • 14126
Re: help: how to debug script interrupting?
« Reply #59 on: 10 / July / 2012, 17:01:46 »
Here's another test build. The dump files will have various names depending where the error happens, so look for any LUA*.DMP

exmem only, since it looks like exmem on/off isn't a factor.
Don't forget what the H stands for.

 

Related Topics


SimplePortal © 2008-2014, SimplePortal