[Kde-bindings] Another GC problem
Richard Dale
Richard_Dale at tipitina.demon.co.uk
Thu Oct 7 13:07:14 UTC 2004
On Wednesday 06 October 2004 20:44, Han Holl wrote:
> On Wednesday 06 October 2004 21:12, Richard Dale wrote:
> > Hi Han
> >
> > All this feedback is great. So I'm keen to get a new snapshot released as
> > soon as possible so that you can try that and see if you have the same
> > problems. I've just got the Qt Designer/ColorTool tutorial example
> > working - so I like to get that checked into the CVS and then do a new
> > release. Then convert the tutorial to ruby and put it up on the KDE
> > Developer's corner ruby bindings site. But if you can send me an example
> > to debug in the meantime, please do. I've attached Qt.cpp with
> > yesterday's fix if you'd like to try that and see if it makes any
> > difference.
> >
> > -- Richard
>
> Hello Richard,
>
> I've tried the attached Qt.cpp, but it make no difference.
> So I'm attaching an archive that will enable you to see for yourself.
> Happy bug-hunting.
Another great bug report! Here's progress the so far. I've looked at the trace
with Qt::Internal::setDebug(Qt::QtDebugChannel::QTDB_GC) garbage collection
debugging on, and it looks fine. Although I spotted a bug in the
smokeruby_mark() function, that is called by the ruby garbage collector and
marks which instances are still in use, and shouldn't be GC'd. It was taking
a Qt::Object parent and only marking its immediate children with the ruby
rb_gc_mark() function, rather than the entire object tree underneath it.
However, when I fixed that unfortunately the bug was still there.
Next I tried the Qt::Object.dumpObjectTree() method to print out the
Qt::Objects and their names at program start up, and after it had been
running, and they appear to be the same. You can do this (you need to build
Qt with the '-debug' configure option):
w = $tabw = GoToCellDialog.new
a.mainWidget = w
w.show
w.removePage($hide)
$tabw.dumpObjectTree
...
Apart from one minor change, the trees were identical, where I think you
hadn't given a parent to the constructor when it needed one. It's worth
giving all the Qt::Objects meaningful names in their constructors though, to
make it easier to tell which instances are which. I've attached some sample
output.
So I'm still stuck I'm afraid.
I've just checked in the Qt Designer 'Color Tool' tutorial sources, so once
I've got the corresponding tutorial online at the KDE Developer's corner
site, and fixed this gc bug I'll do another QtRuby/Korundum snapshot release.
-- Richard
-------------- next part --------------
A non-text attachment was scrubbed...
Name: tree2.log
Type: text/x-log
Size: 20528 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20041007/f4e62314/attachment.log>
More information about the Kde-bindings
mailing list