Forum: wxRuby Segmentation fault on exiting program

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Peter Lane (Guest)
on 2009-05-16 17:31
(Received via mailing list)
Hi,

I have been using wxRuby for a while now, but hit a problem on
upgrading.  I
have ruby1.9.1p129 installed, along with wxruby 2.0.0.  My system is
Ubuntu
8.10, with wxWidgets 2.8-0 from the repository.

Whenever I exit an application, I get an error message.  My programs
seem to
work fine, it's just the error as you exit which is irritating.  I've
not
noticed this with any non-wxruby ruby programs.  Has anyone else come
across
the same problem?  Is there a fix?

  many thanks,

    Peter.

For instance, the following program:

require 'wx'

class SimpleFrame < Wx::Frame
  def initialize
    super(nil, :title => "Simple Frame Title")
  end
end

Wx::App.run do
  SimpleFrame.new.show
end

$ ruby simple-frame.rb
<main>: [BUG] Segmentation fault
ruby 1.9.1p129 (2009-05-12 revision 23412) [i686-linux]

-- control frame ----------
c:0001 p:0000 s:0002 b:0002 l:000404 d:000404 TOP
---------------------------
-- Ruby level backtrace
information-----------------------------------------

-- C level backtrace information
-------------------------------------------
0x812d558 ruby(rb_vm_bugreport+0x48) [0x812d558]
0x815bb31 ruby [0x815bb31]
0x815bba8 ruby(rb_bug+0x28) [0x815bba8]
0x80d8ae6 ruby [0x80d8ae6]
0xb7fa4410 [0xb7fa4410]
0xb5c6ab8e /lib/libselinux.so.1 [0xb5c6ab8e]
0xb5c631d8 /lib/libselinux.so.1 [0xb5c631d8]
0xb5c73350 /lib/libselinux.so.1 [0xb5c73350]
0xb7f98153 /lib/ld-linux.so.2 [0xb7f98153]
0xb7dc6d69 /lib/tls/i686/cmov/libc.so.6(exit+0x89) [0xb7dc6d69]
0xb7dae68d /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xed)
[0xb7dae68d]
0x805bda1 ruby [0x805bda1]

[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

Aborted
Alex F. (Guest)
on 2009-05-19 05:03
(Received via mailing list)
Hi Peter

Peter Lane wrote:
> I have been using wxRuby for a while now, but hit a problem on
> upgrading.  I have ruby1.9.1p129 installed, along with wxruby 2.0.0.
> My system is Ubuntu 8.10, with wxWidgets 2.8-0 from the repository.
>
> Whenever I exit an application, I get an error message.  My programs
> seem to work fine, it's just the error as you exit which is
> irritating.  I've not noticed this with any non-wxruby ruby programs.
> Has anyone else come across the same problem?  Is there a fix?

Thanks for the report. I'm seeing the same thing with Ruby 1.9 on my
Ubuntu machine, haven't quite figured out why yet. I will definitely
want to fix this for the upcoming 2.0.1 release.

alex
Chauk-Mean P. (Guest)
on 2009-05-19 11:32
(Received via mailing list)
Hi,

On Tue, May 19, 2009 at 3:00 AM, Alex F. <removed_email_address@domain.invalid> 
wrote:
>
> Thanks for the report. I'm seeing the same thing with Ruby 1.9 on my Ubuntu
> machine, haven't quite figured out why yet. I will definitely want to fix
> this for the upcoming 2.0.1 release.
>

I suspect a binary incompatibility introduced by the ruby1.9.1p129
related with native extensions.

With ruby1.9.1p0, I haven't noticed such kind of problems on Ubuntu
8.10 and wxRuby-2.0.
I have upgraded to Ubuntu 9.04 recently, and I just run the test case
still with ruby1.9.1p0 and wxRuby-2.0 without any problem.

Conversely, on my MinGW installation, I have upgraded to ruby1.9.1p129
and I've noticed that the corresponding wxRuby-2.0 binary gem (built
with ruby1.9.1p0) does not work at all. I've just rebuilt the
wxRuby-2.0 lib with ruby1.9.1p129 and then everything works again.

Can you try to rebuild wxRuby ?

Anyway, I will check soon what I suspect on Ubuntu 9.10 :
- upgrade to ruby1.9.1p129 then try your test case with the wxRuby-2.0
binary gem : the error at the exit should occur
- rebuild wxRuby-2.0 for ruby1.9.1p129 and see if the error doesn't
occur any more.

Cheers.

Chauk-Mean.
Chauk-Mean P. (Guest)
on 2009-05-20 04:01
(Received via mailing list)
On Tue, May 19, 2009 at 9:28 AM, Chauk-Mean P. 
<removed_email_address@domain.invalid>
wrote:

> I suspect a binary incompatibility introduced by the ruby1.9.1p129
> related with native extensions.

I was wrong ...

> Anyway, I will check soon what I suspect on Ubuntu 9.10 :
> - upgrade to ruby1.9.1p129 then try your test case with the wxRuby-2.0
> binary gem : the error at the exit should occur

No error at the exit.
Alex has more luck than me :-)

Cheers.

Chauk-Mean.
Peter L. (Guest)
on 2009-05-21 00:58
Chauk-Mean P. wrote:
> On Tue, May 19, 2009 at 9:28 AM, Chauk-Mean P. <removed_email_address@domain.invalid>
> wrote:
>
>> I suspect a binary incompatibility introduced by the ruby1.9.1p129
>> related with native extensions.
>
> I was wrong ...
>
>> Anyway, I will check soon what I suspect on Ubuntu 9.10 :
>> - upgrade to ruby1.9.1p129 then try your test case with the wxRuby-2.0
>> binary gem : the error at the exit should occur
>
> No error at the exit.
> Alex has more luck than me :-)
>
> Cheers.
>
> Chauk-Mean.

So the key could be to upgrade Ubuntu ?

Thanks for exploring this.  I tried the binary gem when I upgraded ruby
to 1.9.1, and I got the same problem on both p129 and an earlier
release.

  cheers,

    Peter.
This topic is locked and can not be replied to.