Frederic Bouvier wrote:
This is really a PUI bug.

In fact, the combo's arrow is 16 pixels wide and an input must be at least 15 pixels.
That means that every combo that are 31 pixels or less
are causing a segfault in a function named chop_to_width
in puInput.cxx.

okay, makes sense - even though I seem to remember that there DID occur some problems with controls > 31 px. But unfortunately only on an ocassional basis.

I don't have the time nor feel the need to provide a patch so don't hesitate to 
contribute one
to the plib group.

I'll at least report it and ask if they consider it "serious" enough to be fixed, because as I mentioned already, I don't consider it "critical" either - it's just something I stumpled over.

I don't see how flightgear could prevent the use of such a width when values are 
hardwired inside
the library and there is no check in it.

Well, I've had a quick lool into the code, and if I understand things correctly one could at least provide some basic width check if one really wanted to make sure this bug doesn't occur.

And the segfault is not caused by a wrong read access,
but after many wrong write access, so trying to catch the
fault and continue leads to a crash somewhere else because
of corrupted memory.

Yes, that would explain why some of these problems were not easy to reproduce, and maybe also whhy the whole thing is interpreted as a Nasal error ?

You are hard to follow. What about your initial posting :

# Nasal parse error: empty subexpression in <command>, line 3
# Failed to execute command nasal
# Segmentation fault

As I just pointed out to Andy, this was the console output prior to the crash.

and :

Interesting though, the problem does not occur if there's only ONE value
element specified for a combo box.


This means exactly what I wrote: the problem did only occur if there are more than 1 elements in a combo box. At least that's what I could observe here.

The width problem occurs for one or more values when width <= 31. When
width > 31, there is no 'Nasal parse error' ( there is no such error
when width <= 31 either )

You may be right, which would mean that I would have to check the other dialogs involved, I'll do that later - but actually I did receive that parse error only with that said dialog (which is admittedly weird).

------- Boris

Flightgear-devel mailing list

Reply via email to