# WxRuby GridCellChoiceEditor Segfault

**URL:** <https://www.ruby-forum.com/t/wxruby-gridcellchoiceeditor-segfault/144370>\
**Category:** Ruby\
**Created:** [July 29, 2008, 5:02am UTC](https://www.ruby-forum.com/t/wxruby-gridcellchoiceeditor-segfault/144370 "2008-07-29T05:02:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glen\_H](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/34f0e0/32.png) [@Glen\_H](https://www.ruby-forum.com/u/Glen_H)\
**Post date:** [July 29, 2008, 5:02am UTC](https://www.ruby-forum.com/t/wxruby-gridcellchoiceeditor-segfault/144370/1 "2008-07-29T05:02:35Z")

</div>

Does anyone have a specific experience with WxRuby’s  
GridCellChoiceEditor  
causing a segfault? I’m sure it’s something simple I’m doing wrong but  
have  
no idea how to fix it.

Here is the code that is causing the segfault:

def get\_attr(row, col, attr\_kind)  
attr = Wx::GridCellAttr.new

if @db\_table == “computers” and col == 4  
attr.set\_editor(Wx::GridCellChoiceEditor.new([“CAD”, “GIS”, “CMT”]))  
end

attr  
end

This is simplier than what I need it to do but I thought the more  
complicated code might be at fault at first. The problem is when I try  
to  
edit one of the GridCellChoiceEditor cells it briefly renders the drop  
down  
menu then immediately goes back to looking like a normal grid cell. If  
you  
then click anywhere in the application it produces a segfault.

C:\Documents and Settings\Administrator\My Documents\Ruby Scripts\>ruby  
circadia-  
wx5.rb  
circadia-wx5.rb:661: [BUG] Segmentation fault  
ruby 1.8.6 (2007-09-24) [i386-mswin32]

This application has requested the Runtime to terminate it in an unusual  
way.  
Please contact the application’s support team for more information.

Unfortunately I’m stuck in Windows XP for this one so there isn’t much I  
can  
do about the segfault, at least as far as I know.

Thanks,  
Glen

–  
“Hey brother Christian with your high and mighty errand, Your actions  
speak  
so loud, I can’t hear a word you’re saying.”

-Greg Graffin (Bad Religion)
