User:Philosopher/Nasal FGCommand crashes: Difference between revisions

Jump to navigation Jump to search
m
m (more testing...)
Line 26: Line 26:
=== Current status ===
=== Current status ===
It looks like something happens when calling the function, which is [https://gitorious.org/fg/flightgear/source/740b3f35e98b8c0506bc887326ef831704520f89:src/Scripting/NasalSys.cxx#L1139 compiled each time] from the property tree - something that didn't happen in 2.12. The crash is reproducible after enough iterations, with any kind of (valid) binding code, and regardless of other conditions. It appears that some sort of invalid symbol appears on the stack, which does not exist as a valid address.
It looks like something happens when calling the function, which is [https://gitorious.org/fg/flightgear/source/740b3f35e98b8c0506bc887326ef831704520f89:src/Scripting/NasalSys.cxx#L1139 compiled each time] from the property tree - something that didn't happen in 2.12. The crash is reproducible after enough iterations, with any kind of (valid) binding code, and regardless of other conditions. It appears that some sort of invalid symbol appears on the stack, which does not exist as a valid address.
Well, it will keep calling bind() for each invocation/parse() of the binding [https://gitorious.org/fg/flightgear/source/740b3f35e98b8c0506bc887326ef831704520f89:src/Scripting/NasalSys.cxx#L1113]. And it's all in a fresh context using a new func naRef - so it may be possible, that previously bound stuff is still lingering around - but we need to dump the namespace to see what's going on there for tens of thousands of invocations. The short-term "fix" might be NOT re-parsing things over and over again, and checking if that solves the problem or not. After all, it seems unrelated to compiler optimizations, which is a good thing :) We may also want to check Andy's usage of naBindFunction() vs. naBindToContext() [https://gitorious.org/fg/simgear/source/19481983e5e67c60603acb41d42ff406751ada0c:simgear/nasal/code.c#L834].


=== Available backtraces ===
=== Available backtraces ===

Navigation menu