I think this is fixed in the latest version of qtbase. Had to modify the smoke generator.<br><br><div class="gmail_quote">On Sun, Jan 17, 2010 at 10:24 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: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">On Sun, Jan 17, 2010 at 7:32 AM, Michael Lawrence<br>
<div class="im"><<a href="mailto:lawrence.michael@gene.com">lawrence.michael@gene.com</a>> wrote:<br>
</div><div class="im">> Unfortunately, I can't seem to reproduce the error, only the segfault. Btw,<br>
> your test code is off by 1 (so the error is happening on the first<br>
> iteration). It's also weird how the segfault is so predictable (it crashes<br>
> somewhere between 400 and 500 on my machine too).<br>
<br>
</div>Yes, the segfault is quite predictable (although not quite 100%), and<br>
happens much earlier if I include a gc() call. Here's a variation:<br>
<br>
----Code:<br>
<div class="im">library(qtbase)<br>
i <- 1L<br>
while (TRUE) {<br>
</div> gc()<br>
pen <- Qt$QPen(Qt$QColor(10L, 20L, 10L))<br>
message(i, "\t", capture.output(print(pen))[1], "\t", class(pen)[1])<br>
i <- i + 1L<br>
}<br>
----Typical output:<br>
1 <environment: 0x141e530> QPen<br>
2 <environment: 0x1f75788> QColor<br>
3 <environment: 0x1f758d8> QPen<br>
4 <environment: 0x1f75868> QColor<br>
5 <environment: 0x1f757f8> QColor<br>
6 <environment: 0x1f75868> QColor<br>
7 <environment: 0x1f757f8> QColor<br>
<div class="im"><br>
*** caught segfault ***<br>
address (nil), cause 'unknown'<br>
aborting ...<br>
Segmentation fault<br>
</div>----<br>
Note the wrongly reported QColor. Taking the diff() of the pointer<br>
addresses is interesting:<br>
<br>
> diff(c(0x141e530, 0x1f75788, 0x1f758d8, 0x1f75868, 0x1f757f8, 0x1f75868, 0x1f757f8))<br>
[1] 11891288 336 -112 -112 112 -112<br>
<br>
The numbers 336 and 112 recur.<br>
<div class="im"><br>
> Are you saying that this is a regression? I can't install the old version,<br>
> because it's broken for Qt 4.6.<br>
<br>
</div>I had thought so, but it's not. I get similar behavior with an older version.<br>
<br>
Somehow the QColor seems important. If I just use<br>
<br>
pen <- Qt$QPen()<br>
<br>
then things seem stabler (it doesn't segfault, though it sometimes<br>
gives an error).<br>
<font color="#888888"><br>
-Deepayan<br>
</font></blockquote></div><br>