RE: [Fxruby-users] Error: FXRbGetRubyObj(this=0x084e7fb8) returns non-Qnil
Status: Inactive
Brought to you by:
lyle
From: Daniel S. <da...@pr...> - 2004-03-14 22:35:06
|
I've experienced the same (or similar) problem - same error messages anyway. I don't believe that it is related to the overriding of the objects.=20 Have a look at the code at http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D913892&group= _id =3D20243&atid=3D120243 - it provides as little code as I could to reprodu= ce the problem. Are there any common elements with your code? I have a feeling the segfault is caused by a race condition involved in the disposal code of either the treelist or the treeitem object, due to the fact that adding profiling to the code also introduces the segfault (see http://sourceforge.net/tracker/index.php?func=3Ddetail&aid=3D913892&group= _id =3D20243&atid=3D120243) > -----Original Message----- > From: Hal Fulton [mailto:ha...@hy...]=20 > Sent: Sunday, 14 March 2004 10:23 PM > To: fxr...@li... > Subject: [Fxruby-users] Error:=20 > FXRbGetRubyObj(this=3D0x084e7fb8) returns non-Qnil >=20 >=20 > I've been rewriting my tree logic and it's much cleaner and=20 > shorter now. >=20 > I subclass TopicItem < FXTreeItem and TopicTree < FXTreeList=20 > -- then I override addItemLast to create a TopicItem; and=20 > then call super with that item; and then return the item. >=20 > But I'm getting an error every time I click a tree item (see=20 > subject line). The object id differs. >=20 > Partial code below. (For the whole thing, see=20 > tycho.rubyforge.org and run mkdata.rb first.) >=20 > However, it all works fine besides the error message, EXCEPT=20 > that it segfaults when I hit the Quit button. >=20 > Ideas??? >=20 > Thanks, > Hal >=20 >=20 >=20 >=20 >=20 > class TopicItem < FXTreeItem >=20 > attr_accessor :dir, :path, :title, :notes >=20 > def initialize(dir,path,title) > super(title) > @dir, @path =3D dir, path > @notes =3D [] > end >=20 > end >=20 > #################################################### >=20 > class TopicTree < FXTreeList >=20 > Index =3D "index.yaml" >=20 > def addItemLast(parent,dir,path,title) > item =3D TopicItem.new(dir,path,title) > super(parent,item) > item > end >=20 > def expand > self.expandTree(@treetop) > end >=20 > def initialize(contain,root_dir) > tree_opts =3D=20 > FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP| > =20 > LAYOUT_RIGHT|TREELIST_SHOWS_LINES|TREELIST_SHOWS_BOXES| > TREELIST_ROOT_BOXES|TREELIST_EXTENDEDSELECT > super(contain, 0, nil, 0, tree_opts) > @treetop =3D nil > load(nil,root_dir) > end >=20 > def load(parent,root) > current =3D nil > Dir.chdir(root) do > # Load index for this dir > info =3D File.open(Index) {|f| ::YAML.load(f) } # error=20 > if not there > title =3D info[0]['title'] > current =3D self.addItemLast(parent,root,Dir.pwd,title) > @treetop =3D current if @treetop.nil? >=20 > # Load all files as notes > files =3D Dir.all_files - [Index] > current.notes =3D files.map {|x| Note.new(x) } >=20 > # Recurse and load directories as topics > Dir.all_dirs.each {|dir| load(current,dir) } > end > end >=20 > end >=20 >=20 >=20 > ------------------------------------------------------- > This SF.Net email is sponsored by: IBM Linux Tutorials > Free Linux tutorial presented by Daniel Robbins, President=20 > and CEO of GenToo technologies. Learn everything from=20 > fundamentals to system=20 > administration.http://ads.osdn.com/?ad_id=3D1470&alloc_id=3D3638&op=3Dc= lick > _______________________________________________ > Fxruby-users mailing list > Fxr...@li... > https://lists.sourceforge.net/lists/listinfo/fxruby-users >=20 #########################################################################= ############ This email has been scanned by MailMarshal, an email content filter. #########################################################################= ############ |