[RQt-devel] possible bug in qtbase

Michael Lawrence lawrence.michael at gene.com
Tue Sep 20 17:25:58 CEST 2011


Hi Deepayan,

Nice to hear you are back into the Qt stuff. I can indeed reproduce this.
But not anymore, because I've fixed it.

Thanks for the report,
Michael

On Mon, Sep 19, 2011 at 5:28 AM, Deepayan Sarkar
<deepayan.sarkar at gmail.com>wrote:

> Hi,
>
> I'm working with qtbase after a long gap. In some code making use of
> QGraphicsView/Scene, I'm intermittently (but frequently) encountering
> what look like memory problems. I've simplified my code to a
> sort-of-reproducible minimal example, available at
>
> http://www.isid.ac.in/~deepayan/tmp/foo.R
>
> Running this (a couple of times) gives:
>
> deepayan at kanika:/tmp$ R --slave < foo.R
> NULL
> QGraphicsView instance
> 1       QPen
> 2       QPen
> 3       QPen
> 4       QPen
> 5       QPen
> 6       QPen
> 7       QPen
> 8       QPen
> 9       QPen
> 10      QPen
> 11      QPen
> 12      QPen
> 13      QGraphicsEllipseItem
> Error in qinvoke(<environment>, "addRect", ...) :
>  Expected an instance of type 'QPen', not 'QGraphicsEllipseItem'
> Calls: <Anonymous> -> qinvoke -> .Call
> Execution halted
>
> deepayan at kanika:/tmp$ R --slave < foo.R
> NULL
> QGraphicsView instance
> 1       QPen
> 2       QPen
> 3       QPen
> 4       QPen
> 5       QPen
> 6       QPen
> 7       QPen
> 8       QPen
> Error in qinvokeStatic(cl, basename, ...) :
>  Wrong number or types of arguments passed to 'QColor::QColor'
> Calls: qpen ... qbrush -> qcolor -> <Anonymous> -> qinvokeStatic -> .Call
> Execution halted
>
>
> I get no error if I comment out the scene$addRect and scene$addEllipse
> calls.  If I move the pen <- qpen(...) call outside the loop, then the
> error still happens, but typically takes much longer; e.g.,
>
> ...
> 259     QPen
> 260     QPen
> 261     QPen
> Error in qinvoke(<environment>, "setScene", ...) :
>  Expected an instance of type 'QGraphicsScene', not 'QGraphicsEllipseItem'
> Calls: <Anonymous> -> qinvoke -> .Call
> Execution halted
>
> Can anyone reproduce?
>
> (I have added a few missing break statements in qtbase/src/module.cpp,
> but they don't seem to be relevant.)
>
> I am using Qt 4.7.2 on Debian.
>
> -Deepayan
> _______________________________________________
> Qtinterfaces-devel mailing list
> Qtinterfaces-devel at lists.r-forge.r-project.org
>
> https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/qtinterfaces-devel/attachments/20110920/23d1769f/attachment.htm>


More information about the Qtinterfaces-devel mailing list