Forum: FXRuby fillItems() method - segmentation fault solved

56c8db2891b2d2714ff22be005859285?d=identicon&s=25 Alex DeCaria (deke)
on 2010-03-31 03:17
I had an FXRuby app that was randomly segfaulting at the following code
line:

listbox.clearItems()
listbox.fillItems(some_string_array)

It would segfault when executing .fillItems, but the segfault was
unpredictable and seemingly without reason.  After weeks of struggle, I
discovered that if instead I do:

listbox.clearItems()
some_string_array.each { |item| listbox.appendItem(item) }

the code works fine and never segfaults.  So, the issue seems to be
somewhere in the .fillItems method.

Anyway, I thought I'd post this in case others experience problems with
the .fillItems method.

--Alex
This topic is locked and can not be replied to.