Unfortunately, I can't seem to reproduce the error, only the segfault. Btw, your test code is off by 1 (so the error is happening on the first iteration). It's also weird how the segfault is so predictable (it crashes somewhere between 400 and 500 on my machine too).<br>
<br>Are you saying that this is a regression? I can't install the old version, because it's broken for Qt 4.6.<br><br>Michael<br><br><div class="gmail_quote">On Sun, Jan 17, 2010 at 12:00 AM, Deepayan Sarkar <span dir="ltr"><<a href="mailto:deepayan.sarkar@gmail.com" target="_blank">deepayan.sarkar@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>On Sat, Jan 16, 2010 at 8:27 AM, Michael Lawrence<br>
<<a href="mailto:lawrence.michael@gene.com" target="_blank">lawrence.michael@gene.com</a>> wrote:<br>
><br>
><br>
> On Sat, Jan 16, 2010 at 7:33 AM, Deepayan Sarkar <<a href="mailto:deepayan.sarkar@gmail.com" target="_blank">deepayan.sarkar@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi (mostly MIchael),<br>
>><br>
>> r206 (2010-01-14, Update to latest smoke) caused a regression in my<br>
>> setup because these lines were removed (they had been added following<br>
>> Justin's suggestion because I need the -fPIC flag):<br>
>><br>
>> ----<br>
>> if( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )<br>
>> set_target_properties(smokeqt PROPERTIES COMPILE_FLAGS "-fPIC")<br>
>> endif( CMAKE_SYSTEM_PROCESSOR STREQUAL "x86_64" )<br>
>> ----<br>
>><br>
>> Not a big deal, I just added them back, but I was wondering if there's<br>
>> anything we might do to prevent repeat occurrences. Was the file<br>
>> copied verbatim from the new smoke release?<br>
>><br>
><br>
> Yes, those files are copied verbatim with the sync. We need to get these<br>
> changes into upstream. But the uptake seems pretty slow. There is this fix,<br>
> as well as the fixes for OS X. We probably need to create our own branch of<br>
> the kdebindings stuff or at least maintain a set of patches. The latter is<br>
> probably a better idea.<br>
<br>
</div>Yes, maintaining patches is fairly common practice, although I'm not<br>
sure how it's actually done in practice.<br>
<br>
Anyway, have either of you noticed more instability than there used to<br>
be? It's not very reproducible, but something always seems to go wrong<br>
after a while. In one case, the result of calling Qt$QPen() was<br>
reported as being of class "QGraphicsItem" (and there were some of<br>
those around), which may give a hint about what might be happening.<br>
<br>
Here's a small attempt at reproducing the bug (it's an infinite loop,<br>
so be ready to interrupt if nothing goes wrong). Notice how sometimes<br>
there is a segfault, and other times an error.<br>
<br>
--------<br>
dsarkar@sphulinga:tmp$ cat qbug.R<br>
library(qtbase)<br>
i <- 1L<br>
while (TRUE) {<br>
i <- i + 1L<br>
if ((i %% 100) == 0) message(i)<br>
pen <- try(Qt$QPen(Qt$QColor(10L, 20L, 10L)), silent = TRUE)<br>
if (is(pen, "try-error"))<br>
{<br>
message(i, ":", as.character(pen))<br>
break<br>
}<br>
}<br>
<br>
dsarkar@sphulinga:tmp$ R-devel --vanilla --slave < qbug.R<br>
100<br>
200<br>
300<br>
400<br>
<br>
*** caught segfault ***<br>
address (nil), cause 'unknown'<br>
aborting ...<br>
Segmentation fault<br>
dsarkar@sphulinga:tmp$ R-devel --vanilla --slave < qbug.R<br>
100<br>
200<br>
300<br>
400<br>
<br>
*** caught segfault ***<br>
address (nil), cause 'unknown'<br>
aborting ...<br>
Segmentation fault<br>
dsarkar@sphulinga:tmp$ R-devel --vanilla --slave < qbug.R<br>
100<br>
200<br>
300<br>
400<br>
<br>
*** caught segfault ***<br>
address (nil), cause 'unknown'<br>
aborting ...<br>
Segmentation fault<br>
dsarkar@sphulinga:tmp$ R-devel --vanilla --slave < qbug.R<br>
2:Error in assign(enum, structure(enums[enum], class = "QtEnum"), env) :<br>
attempt to use zero-length variable name<br>
<br>
dsarkar@sphulinga:tmp$ R-devel --vanilla --slave < qbug.R<br>
100<br>
200<br>
300<br>
400<br>
<br>
*** caught segfault ***<br>
address (nil), cause 'unknown'<br>
aborting ...<br>
Segmentation fault<br>
dsarkar@sphulinga:tmp$ R-devel --vanilla --slave < qbug.R<br>
2:Error in assign(enum, structure(enums[enum], class = "QtEnum"), env) :<br>
attempt to use zero-length variable name<br>
<br>
dsarkar@sphulinga:tmp$ R-devel --vanilla --slave < qbug.R<br>
100<br>
200<br>
300<br>
400<br>
<br>
*** caught segfault ***<br>
address (nil), cause 'unknown'<br>
aborting ...<br>
Segmentation fault<br>
<br>
--------<br>
<font color="#888888"><br>
-Deepayan<br>
</font></blockquote></div><br>