Hello,
I wrote an application in wxRuby:
ruby 1.8.6
wxruby 1.9.4 installed from gem
windows xp sp2
After several minutes of running it crashes with the following error:
"c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27: [BUG]
Segmentation fault
ruby 1.8.6 (2007-03-13) [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."
The biggest problem is that it is extremely difficult for me to find
the cause of the error because:
- I don’t get the normal exception so I cannot find the line of code
which causes the error - the application merely crashes with the
message cited above - the crash occurs randomly in different situations, basicly when an
event like pressing a button, opening a window, changing focus, etc.
occurs (it doesn’t occur when I don’t touch the mouse/keyboard) - but
I am unable to reproduce any of the crashes - when it crashes for
instance after clicking button X, next time I can click button X a
hundred of times and everything works perfectly until it crashes on
pressing button Y, I think you know what I mean
The application has already about 160kb of source code and I have
completely no idea what causes the crash.
Anyway I think I should get an exception, not a crash so I assume this
is a bug in wxRuby.
I thought that maybe the crash occurs on first garbage collection but
it’s not the case - when I run GC manually somewhere in my application
(ObjectSpace.garbage_collect) it doesn’t crash.
What can I do in this situation?
I have an application which is almost finished but completely useless
because of those random crashes
Can someone help me?
How can I debug the application to actually see the reason of the crash?