Hi Deepayan,<br><br>Nice to hear you are back into the Qt stuff. I can indeed reproduce this. But not anymore, because I've fixed it.<br><br>Thanks for the report,<br>Michael<br><br><div class="gmail_quote">On Mon, Sep 19, 2011 at 5:28 AM, Deepayan Sarkar <span dir="ltr"><<a href="mailto:deepayan.sarkar@gmail.com">deepayan.sarkar@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi,<br>
<br>
I'm working with qtbase after a long gap. In some code making use of<br>
QGraphicsView/Scene, I'm intermittently (but frequently) encountering<br>
what look like memory problems. I've simplified my code to a<br>
sort-of-reproducible minimal example, available at<br>
<br>
<a href="http://www.isid.ac.in/%7Edeepayan/tmp/foo.R" target="_blank">http://www.isid.ac.in/~deepayan/tmp/foo.R</a><br>
<br>
Running this (a couple of times) gives:<br>
<br>
deepayan@kanika:/tmp$ R --slave < foo.R<br>
NULL<br>
QGraphicsView instance<br>
1 QPen<br>
2 QPen<br>
3 QPen<br>
4 QPen<br>
5 QPen<br>
6 QPen<br>
7 QPen<br>
8 QPen<br>
9 QPen<br>
10 QPen<br>
11 QPen<br>
12 QPen<br>
13 QGraphicsEllipseItem<br>
Error in qinvoke(<environment>, "addRect", ...) :<br>
Expected an instance of type 'QPen', not 'QGraphicsEllipseItem'<br>
Calls: <Anonymous> -> qinvoke -> .Call<br>
Execution halted<br>
<br>
deepayan@kanika:/tmp$ R --slave < foo.R<br>
NULL<br>
QGraphicsView instance<br>
1 QPen<br>
2 QPen<br>
3 QPen<br>
4 QPen<br>
5 QPen<br>
6 QPen<br>
7 QPen<br>
8 QPen<br>
Error in qinvokeStatic(cl, basename, ...) :<br>
Wrong number or types of arguments passed to 'QColor::QColor'<br>
Calls: qpen ... qbrush -> qcolor -> <Anonymous> -> qinvokeStatic -> .Call<br>
Execution halted<br>
<br>
<br>
I get no error if I comment out the scene$addRect and scene$addEllipse<br>
calls. If I move the pen <- qpen(...) call outside the loop, then the<br>
error still happens, but typically takes much longer; e.g.,<br>
<br>
...<br>
259 QPen<br>
260 QPen<br>
261 QPen<br>
Error in qinvoke(<environment>, "setScene", ...) :<br>
Expected an instance of type 'QGraphicsScene', not 'QGraphicsEllipseItem'<br>
Calls: <Anonymous> -> qinvoke -> .Call<br>
Execution halted<br>
<br>
Can anyone reproduce?<br>
<br>
(I have added a few missing break statements in qtbase/src/module.cpp,<br>
but they don't seem to be relevant.)<br>
<br>
I am using Qt 4.7.2 on Debian.<br>
<br>
-Deepayan<br>
_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org">Qtinterfaces-devel@lists.r-forge.r-project.org</a><br>
<a href="https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel" target="_blank">https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/qtinterfaces-devel</a><br>
</blockquote></div><br>