Forum: wxRuby wxRuby - Segmentation fault

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.
Ridge M. (Guest)
on 2009-02-05 02:07
# Windows XP Professional + SP3
# ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
# wxruby (1.9.9)

If you can tell me how to update to 1.9.10, I'd be happy to run
this and a few other tests.  Also, if I should be posting bugs
somewhere else, please let me know.

Here's a bit of code to reproduce a seg fault:
-----------------------------------------------------------
require 'wx'
include Wx

class MyGui < App
    def on_init
  frame = Frame.new(nil, -1, 'Seg fault')
        panel = Panel.new(frame, -1)

  500.times { Window.new(frame) }

        frame.show()
    end
end

MyGui.new.main_loop()
-----------------------------------------------------------

If the number is 64 (instead of 500), it doesn't seg fault
(on my system).

Keep up the good work Alex.  I'm looking forward to the
new release.
Ridge M. (Guest)
on 2009-02-05 02:21
Ridge M. wrote:
> # Windows XP Professional + SP3
> # ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> # wxruby (1.9.9)
>
> If you can tell me how to update to 1.9.10, I'd be happy to run
> this and a few other tests.  Also, if I should be posting bugs
> somewhere else, please let me know.
>
> Here's a bit of code to reproduce a seg fault:
> -----------------------------------------------------------
> require 'wx'
> include Wx
>
> class MyGui < App
>     def on_init
>   frame = Frame.new(nil, -1, 'Seg fault')
>         panel = Panel.new(frame, -1)
>
>   500.times { Window.new(frame) }
>
>         frame.show()
>     end
> end
>
> MyGui.new.main_loop()
> -----------------------------------------------------------
>
> If the number is 64 (instead of 500), it doesn't seg fault
> (on my system).
>
> Keep up the good work Alex.  I'm looking forward to the
> new release.

I should note that:

"gem install wxruby" still points to 1.9.9 (as of 2009-Feb-04 16:00:00
PST)
"gem install wxruby2" doesn't work (and probably isn't supposed to)
Alex F. (Guest)
on 2009-02-05 05:04
(Received via mailing list)
Ridge M. wrote:
> # Windows XP Professional + SP3
> # ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
> # wxruby (1.9.9)
>
> If you can tell me how to update to 1.9.10, I'd be happy to run
> this and a few other tests.

It can sometimes take a little time for the gem indexes to update, but
it seems to have happened now:

Abaddon:~ alex$ sudo gem install wxruby
Successfully installed wxruby-1.9.10-universal-darwin-9
1 gem installed
Abaddon:~ alex$ ruby -v
ruby 1.8.6 (2008-03-03 patchlevel 114) [universal-darwin9.0]

As an alternative, you can always download the gem file from
http://rubyforge.org/frs/?group_id=35 and then do "gem install
<filename>" to install from a local file.

> Also, if I should be posting bugs
> somewhere else, please let me know.
>

Here is fine. If you have a rubyforge account, you can instead post bugs
direct to the rubyforge tracker
http://rubyforge.org/tracker/?atid=218&group_id=35 which helps us track
them. Being logged in when filing a bug ensures we can get further
information if needed.

>   500.times { Window.new(frame) }
>
>         frame.show()
>     end
> end
>
> MyGui.new.main_loop()
> -----------------------------------------------------------
>

Thanks for the sample code. It works fine for me on OS X; I'll try it on
Windows when I get a chance.

alex
Ridge M. (Guest)
on 2009-02-07 05:44
Alex F. wrote:
> Ridge M. wrote:
>> # Windows XP Professional + SP3
>> # ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
>> # wxruby (1.9.9)
>>
>> If you can tell me how to update to 1.9.10, I'd be happy to run
>> this and a few other tests.
>
> It can sometimes take a little time for the gem indexes to update, but
> it seems to have happened now:

Yep, I just installed 1.9.10 - thanks.


> Thanks for the sample code. It works fine for me on OS X; I'll try it on
> Windows when I get a chance.

I just tried it on 1.9.10 and it still seg faults (on exit).

Ridge
Chauk-Mean P. (Guest)
on 2009-02-07 11:36
(Received via mailing list)
Hi Ridge,

2009/2/7 Ridge M. <removed_email_address@domain.invalid>:
> I just tried it on 1.9.10 and it still seg faults (on exit).
>

I've been able to reproduce the seg fault with ruby-1.9.1 on MinGW.
On Linux, the exit takes some time but does not seg faults.

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