Re: reproducible core dump in Qt::Table

Germain Garand <[email protected]>
Newsgroups gmane.comp.kde.devel.perl
Message-ID <[email protected]>
Le Mardi 23 Mars 2004 02:02, Marc Horowitz a écrit :
> System: Debian/x86
>
> Package versions:
>
> ii  libperl5.8     5.8.3-2        Shared Perl library.
> ii  libqt-perl     3.008-1        Perl bindings for the Qt library
>
> The simplest way to reproduce this is to use pqtsh.  When I run the
> following commands:
>
>     use Qt::attributes qw(table);
>     table = Qt::Table();
>     table->show;
>     table->setNumRows(1);
>     table->setNumCols(1);
>     table->setText(0,0,"hello");
>     table->removeRow(0);
>
> the final command causes a segmentation fault.  valgrind strongly
> indicates that this is a double-free bug (logs appended).
> Interestingly, if I keep running (which is possible only under
> valgrind), I don't see the problem again.

OK, I can reproduce with CVS as well. No wonder.
Could you please file a report on sourceforge with the same content?

>
> Is there any other way for me to remove rows from a table using
> PerlQt?

yes but it's more convoluted.
You need to table->takeItem( table->item(x,y) )

Obviouly, the garbage collection model for *Items is unsatisfying. Qt isn't 
sound enough in that respect  to come up with something reliable.
That needs to be worked out, 
but I'm concerned about backward compatibility ;-/

G.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.