DO NOT REPLY TO THIS MESSAGE.  INSTEAD, POST ANY RESPONSES TO THE LINK BELOW.

[STR New]

Link: http://www.fltk.org/str.php?L2706
Version: 1.3-current


If a fluid generated class uses an Fl_Input_Choice widget with menu items
that have their own callbacks, the generated code will access the invalid
class object, most likely crashing the application. Reason is that the
Fl_Input_Choice widget is derived from Fl_Group with the menu button being
a child of it. Menu item callbacks always get called with their "owner"
Fl_Menu_ object pointer. Fluid generated callbacks use repeated
"->parent()" calls starting at the callback's widget pointer argument to
access the enclosing Fluid class. The code generator did not take into
account the extra group level introduced by the Fl_Input_Choice widget.

Attached small Fluid file illustrates the program. Clicking on the input
choice widget's menu items will result in a segmentation fault if the file
is compiled with an unpatched fluid.

Second attached file is the patch for Fluid that fixes the problem.
Recompiling the attached test program with a patched Fluid will result in
proper operation.


Link: http://www.fltk.org/str.php?L2706
Version: 1.3-current

Attachment: testinputchoice.fl
Description: Binary data

_______________________________________________
fltk-bugs mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk-bugs

Reply via email to