This is kind of hard to explain, but I’ll do my best.
I have a window that has a complex ListCtrl using LC_VIRTUAL, and my
own implementation of ListView. I use this tons of places and it works
fine, except for here. In Ruby 1.8 there’s no warning, just a segfault
out of nowhere. In Ruby 1.9, when trying to do set_size() on the
Wx::Frame or show(), it crashes every time by raising a NoMethodError
on “calc_min” for various objects. The object changes every time, but
has been String, Array, Hash, and various of my own objects. I don’t
do anything with calc_min() in my ListView, and this doesn’t happen
ANYWHERE else. Sometimes it works fine on 1.8, and sometimes it
segfaults. I can make the code available on a limited basis (it is
private, for the US government), preferably only to Alex, if you think
you can help.
I know that’s not a ton of information, but I’m not sure what else I
can include. I’ve tried very hard to make sure it’s not something I’m
doing, and I can’t reproduce it with anything but the exact code I use
now. In order for you to reproduce it you’d probably need the whole
program (which is huge, and complicated), but I can provide you with
traces or anything you need.
Thanks for any help you can provide.
– Eric W.
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
calc_min': undefined method
calc_min’ for
#DateTime:0x00000003046de0 (NoMethodError)
from
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
calc_min' from /home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
calc_min’
from
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
calc_min' from /home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
calc_min’
from
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
layout' from /home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
process_event’
from
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
process_event' from /home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
show’
from
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera/ui/equipmentfinder.rb:34:in
initialize' from /home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera.rb:173:in
new’
from
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Palaeoptera.rb:173:in
block in on_init' from /home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Hymenoptera/ui/main.rb:106:in
call’
from
/home/rakaur/Dropbox/Sources/work/Palaeoptera/lib/Hymenoptera/ui/main.rb:106:in
block (2 levels) in initialize_events' from bin/Palaeoptera.rb:20:in
call’
from bin/Palaeoptera.rb:20:in process_event' from bin/Palaeoptera.rb:20:in
process_event’
from bin/Palaeoptera.rb:20:in process_event' from bin/Palaeoptera.rb:20:in
on_run’
from bin/Palaeoptera.rb:20:in main_loop' from bin/Palaeoptera.rb:20:in
’
rakaur@callandor ~/Dropbox/Sources/work/Palaeoptera $
Line 34 is a show() call for a Wx::Frame.