On 02/09/12 13:08, [email protected] wrote:
> Hello,
>
> I am currently attempting to use a program that employs the FLTK library, but
> it crashes reliably when a drop-down menu button is clicked. It seems to
> occur in fl_draw's fl_measure function when the 64bit library is used.
>
> running the program through gdb on 64-bit Redhat Linux results in the
> following message when the button is clicked...
>
> Segmentation fault
> 0x00002aaaaab4c299 in fl_measure(char const*, int&, int&, int) ()
> from /usr/lib64/libfltk.so.1.1
>
> Any insights would be greatly appreciated.
Most common problems with fl_measure():
o Forgetting to call set_font(int,int) before calling
fl_measure(),
so that it knows what font face and size to use for the
measurement.
(fl_measure() uses the 'current font' which, if unset, might
crash)
o Be sure the two arguments after the string are set to 0
(unless you want wrapping behavior)
o Be sure the string passed in isn't NULL
If it's not one of those, is there anything special about
the string being passed in? (utf8, symbols..)
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk