noreply at rubyforge.org
2009-Jul-22 11:53 UTC
[wxruby-development] [ wxruby-Bugs-26693 ] HtmlWindow#set_fonts causes Segmentation fault
Bugs item #26693, was opened at 2009-07-22 13:53
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=218&aid=26693&group_id=35
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Marvin G?lker (mguelker)
Assigned to: Nobody (None)
Summary: HtmlWindow#set_fonts causes Segmentation fault
Initial Comment:
Hi,
It is impossible to call HtmlWindow#set_fonts without a segmentation fault. The
error says, the method is expecting a wxString, but was given a String.
<pre>
#Encoding: UTF-8
require "wx"
include Wx
class MyApp < App
def on_init
@mainwindow = Frame.new(nil, -1, "Test", DEFAULT_POSITION,
Size.new(400, 400))
@mainwindow.set_background_colour(NULL_COLOUR)
StaticText.new(@mainwindow, -1, "This doesn''t work: ")
@html = HtmlWindow.new(@mainwindow, -1, Point.new(20, 20), Size.new(360,
360))
#The following line causes the error:
@html.set_fonts("", "Helvetica", nil)
@html.set_page("<b>Some test content.</b>")
@mainwindow.show
end
end
x = MyApp.new
x.main_loop
</pre>
Result:
<pre>>ruby test.rb
test.rb:15:in `set_fonts'': Expected argument 1 of type wxString, but
got String "" (TypeError)
in SWIG method ''SetFonts''
from test.rb:15:in `on_init''
from test.rb:25:in `main_loop''
from test.rb:25:in `<main>''
<main>: [BUG] Segmentation fault
ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
-- control frame ----------
c:0001 p:0000 s:0002 b:0002 l:000a54 d:000a54 TOP
---------------------------
-- Ruby level backtrace information-----------------------------------------
-- C level backtrace information -------------------------------------------
0x812dd48 ruby(rb_vm_bugreport+0x48) [0x812dd48]
0x815c8a1 ruby [0x815c8a1]
0x815c918 ruby(rb_bug+0x28) [0x815c918]
0x80d95f6 ruby [0x80d95f6]
0xb8032410 [0xb8032410]
0x811aabb ruby [0x811aabb]
0x811ab13 ruby(rb_get_method_body+0x23) [0x811ab13]
0x811e17b ruby [0x811e17b]
0x811e967 ruby(rb_funcall+0xb7) [0x811e967]
0xb777cfe8
/opt/rubies/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.0-x86-linux/lib/wxruby2.so(_ZN16SwigDirector_App11FilterEventER7wxEvent+0x48)
[0xb777cfe8]
0xb6ba5718
/usr/lib/libwx_baseu-2.8.so.0(_ZN12wxEvtHandler12ProcessEventER7wxEvent+0x38)
[0xb6ba5718]
0xb6e9ebe8
/usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN12wxWindowBase16SendDestroyEventEv+0x48)
[0xb6e9ebe8]
0xb6d91d0a /usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN8wxWindowD2Ev+0x2a)
[0xb6d91d0a]
0xb6ec3db8 /usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN7wxPanelD2Ev+0x28) [0xb6ec3db8]
0xb6eccccd /usr/lib/libwx_gtk2u_core-2.8.so.0(_ZN16wxScrolledWindowD2Ev+0x4d)
[0xb6eccccd]
0xb70badb6 /usr/lib/libwx_gtk2u_html-2.8.so.0(_ZN12wxHtmlWindowD2Ev+0x1b6)
[0xb70badb6]
0xb79343e1
/opt/rubies/ruby-1.9.1-p243/lib/ruby/gems/1.9.1/gems/wxruby-ruby19-2.0.0-x86-linux/lib/wxruby2.so(_ZN23SwigDirector_HtmlWindowD0Ev+0x81)
[0xb79343e1]
0x80633a1 ruby [0x80633a1]
0x806351c ruby [0x806351c]
0x8063701 ruby(rb_gc_call_finalizer_at_exit+0x181) [0x8063701]
0x805e70b ruby(ruby_cleanup+0x10b) [0x805e70b]
0x805e88e ruby(ruby_run_node+0x4e) [0x805e88e]
0x805bf50 ruby(main+0x60) [0x805bf50]
0xb7e55775 /lib/tls/i686/cmov/libc.so.6(__libc_start_main+0xe5) [0xb7e55775]
0x805be51 ruby [0x805be51]
[NOTE]
You may encounter a bug of Ruby interpreter. Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
Aborted>Exit code: 134
</pre>
ruby -v: ruby 1.9.1p243 (2009-07-16 revision 24175) [i686-linux]
OS: Linux Ubuntu 9.04
Marvin
----------------------------------------------------------------------
You can respond by visiting:
http://rubyforge.org/tracker/?func=detail&atid=218&aid=26693&group_id=35