Re: [Fxruby-users] segfault with FXTreeList in Ruby 1.8.0
Status: Inactive
Brought to you by:
lyle
From: Joel V. <vj...@PA...> - 2003-08-26 13:10:56
|
Lyle Johnson wrote: > OK, let me know if I need to take a look at it. I just went back and ran > 'stress1.rb', one of the stress test cases from the FXRuby/tests > subdirectory and it seemed to hold up fine. [That one basically creates > and then trashes a large number of tree items, trying to smoke out > GC-related problems.] I don't think it's a GC problem this time--GC.disable doesn't fix it. (Or does ruby always turns GC back on during finalizers?) Here's the valgrind output, with GC disabled and the -v and '-error-limit=no' options: http://PATH.Berkeley.EDU/~vjoel/tree-bug/tree-no-gc.err Turning GC off shortens this output to the point where I can read the whole thing, but I don't see anything in there that's obviously relevant. If you want to take a look at the code itself, it's at: http://PATH.Berkeley.EDU/~vjoel/tree-bug/observable-0.3-alpha.tgz http://PATH.Berkeley.EDU/~vjoel/tree-bug/foxtails-0.2-alpha.tgz The buggy code is in foxtails/examples/tree.rb. You can run it without installing anything. Just unpack both of the tarballs under the same dir and then: cd foxtails-0.2/examples RUBYLIB='../lib:../../observable-0.3/lib' ruby tree.rb If you quit immediately (Ctl-Q), there is no segfault. If you select the first tree item, and then quit, it segfaults, but only with ruby 1.8, not 1.7.3. (BTW, the tree example is kinda interesting, before it dies. It lets you have multiple synchronized browsers of trees or even of directed acyclic graphs, and it makes it easier to use existing data structures with their own child/parent relations and not worry about how they are mapped into list items. The browsers are synchronized in the sense that model changes (as opp. visual changes) propagate to all browsers. Currently the example only has one browser, but I'll make it a MDI before release. I'll be releasing this with the next foxtails.) |