Hello everyone,
My programm has a scheduler in the background (openwferu-scheduler
0.9.16.1404). which should replace the content/(children) of a toplevel
window.
but i get a segment fault when i add and remove a embedded mozilla, i
tried everything!! now I m out of ideas
here are 2 basic sample how it (not)works:
→ two with embeded mozilla is is not working :-/
→ one with Buttons as content this is working
does anyone have a idea whats the problem ? anyone a idea for a
workaround ?
thanks ahead !!
Philipp
#####################################################################
require ‘gtkmozembed’
Gtk.init
gtk = Gtk::Window.new
Gtk::MozEmbed.set_profile_path(ENV[‘HOME’] + ‘/.mozilla’, ‘RubyGecko’)
moz = Gtk::MozEmbed.new
gtk.add(moz)
gtk.show_all
moz.load_url(“https://mail.google.com/”)
Thread.new do
Gtk.main
end
sleep 5
gtk.child.destroy
moz = Gtk::MozEmbed.new
gtk.add(moz)
gtk.show_all
moz.load_url(“http://www.google.com/”)
###################
error################################################
(irb):30: [BUG] Segmentation fault
ruby 1.8.6 (2007-06-07) [i486-linux]
#########################################################################
require ‘gtkmozembed’
Thread.abort_on_exception = true
Gtk.init
@gtk
@moz
@gtk = Gtk::Window.new
Gtk::MozEmbed.set_profile_path(ENV[‘HOME’] + ‘/.mozilla’, ‘RubyGecko’)
Thread.new do
@moz = Gtk::MozEmbed.new
@gtk.add(@moz)
@gtk.show_all
@moz.load_url(“https://mail.google.com/”)
end
Thread.new do
sleep 10
@gtk.child.destroy
@moz = Gtk::MozEmbed.new
@gtk.add(@moz)
@gtk.show_all
@moz.load_url(“http://www.google.com/”)
end
Gtk.main
###################
error################################################
(irb):30: [BUG] Segmentation fault
ruby 1.8.6 (2007-06-07) [i486-linux]
#########################################################################
#############################################################################
require ‘gtkmozembed’
Gtk.init
gtk = Gtk::Window.new
moz = Gtk::Button.new “AAAAA”
gtk.add(moz)
gtk.show_all
Thread.new do
Gtk.main
end
sleep 5
gtk.child.destroy
moz = Gtk::Button.new “bbbbbb”
gtk.add(moz)
gtk.show_all
################### working !!!
##############################################################################