Yea I know about the unhandled Moc type stuff. Clearing those up is going to be a pain, since the Smoke generator resolves typedefs (this is optional, but we already rely on it) whereas Qt's metaobject compiler (MOC) uses the typedef names. <br>
<br><div class="gmail_quote">On Wed, Apr 7, 2010 at 11:43 AM, Tengfei Yin <span dir="ltr"><<a href="mailto:yintengfei@gmail.com">yintengfei@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;">
Hi Michael,<div><br></div><div>Thanks, latest version works like a charm on canvas demo in qtpaint. No crash anymore.</div><div>For qrepl(), I got the following message, anyway no crash anymore</div><div><br><div>> library(qtutils)</div>
<div>Loading required package: qtbase</div><div class="im"><div>> foo=qrepl()</div><div>Cannot handle Moc type 'qreal'</div><div><br></div></div><div>debug(qrepl) gave me</div><div><br></div><div><div>Browse[2]> n</div>
<div>debug: ined1 <- qeditor(rsyntax = TRUE, richtext = TRUE)</div>
<div>Browse[2]> n</div><div class="im"><div>Cannot handle Moc type 'qreal'</div><div><br></div></div><div>debug: ined1$setCurrentFont(font)</div><div>Browse[2]> n</div></div><div><br></div><div>Thanks</div>
<div><br></div><div>Regards</div>
<div><br></div><font color="#888888"><div>Tengfei</div></font><div><div></div><div class="h5"><div><br></div><div><br></div><div><br></div><div class="gmail_quote">On Wed, Apr 7, 2010 at 11:18 AM, Michael Lawrence <span dir="ltr"><<a href="mailto:lawrence.michael@gene.com" target="_blank">lawrence.michael@gene.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;"><br><br><div class="gmail_quote"><div>On Tue, Apr 6, 2010 at 10:30 PM, Tengfei Yin <span dir="ltr"><<a href="mailto:yintengfei@gmail.com" target="_blank">yintengfei@gmail.com</a>></span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>Hi,</div><div><br></div><div><div></div><div>I have the same crash here<div>my system ubuntu 9.10 64 bit, qt 4.5</div><div>my sessionInfo()</div><div><br></div><div><div>> sessionInfo()</div><div>R version 2.10.1 (2009-12-14) </div>
<div>
x86_64-pc-linux-gnu </div><div><br></div><div>locale:</div><div> [1] LC_CTYPE=zh_CN.UTF-8 LC_NUMERIC=C </div><div> [3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8 </div><div> [5] LC_MONETARY=C LC_MESSAGES=en_US.UTF-8 </div>
<div> [7] LC_PAPER=en_US.UTF-8 LC_NAME=C </div><div> [9] LC_ADDRESS=C LC_TELEPHONE=C </div><div>[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C </div><div><br></div>
<div>attached base packages:</div><div>[1] stats graphics grDevices utils datasets methods base </div><div><br></div><div><br></div><div>I have another crash caused by call demo('canvas','qtpaint'), here is running message and the trace back version,</div>
<div><br></div><div><div>> library(qtpaint)</div><div>> demo('canvas','qtpaint')</div><div><br></div><div><br></div><div><span style="white-space: pre;">        </span>demo(canvas)</div>
<div><span style="white-space: pre;">        </span>---- ~~~~~~</div><div><br></div><div>Type <Return><span style="white-space: pre;">        </span> to start : </div><div><br></div><div>
> ## tests/demonstrations for the interactive canvas</div><div>> </div><div>> library(qtpaint)</div><div><br></div><div>> options(warn=2)</div><div><br></div><div>> options(error=recover)</div><div><br></div>
<div>> circle <- qglyphCircle()</div><div><br></div><div>> n <- 1000</div><div><br></div><div>> x <- rnorm(n, 50, 25)</div><div><br></div><div>> y <- rnorm(n, 50, 25)</div><div><br></div><div>> df <- data.frame(X = x, Y = y)</div>
<div><br></div><div>> ##data(mtcars)</div><div>> ##df <- mtcars[,c("mpg", "hp")]</div><div>> </div><div>> ##data(iris)</div><div>> ##df <- iris</div><div>> fill <- col2rgb(rgb(1, seq(0, 1, length=nrow(df)), 0, 0.5), TRUE)</div>
<div><br></div><div>> ##fill <- col2rgb(rgb(1, 0, 0, 0.5), TRUE)</div><div>> ##fill <- rep("red", nrow(df))</div><div>> scatterplot <- function(item, painter) {</div><div>+ qstrokeColor(painter) <- NA</div>
<div>+ qfillColor(painter) <- fill</div><div>+ ##qantialias(painter) <- FALSE</div><div>+ ##qdrawText(painter, "x", df[,1], df[,2])</div><div>+ ##qdrawPoint(painter, df[,1], df[,2], stroke = fill)</div>
<div>+ qdrawGlyph(painter, circle, df[,1], df[,2], fill = fill)</div><div>+ }</div><div><br></div><div>> labeled <- rep(FALSE, nrow(df))</div><div><br></div><div>> labeler <- function(item, painter) {</div>
<div>
+ mat <- qdeviceTransform(painter)</div><div>+ off <- qmap(mat, c(5, 5)) - qmap(mat, c(0, 0))</div><div>+ df <- df[labeled,]</div><div>+ qdrawText(painter, rownames(df), df[,1]+off[1], df[,2]+off[2], "left",</div>
<div>+ "bottom")</div><div>+ }</div><div><br></div><div>> margin <- 5</div><div><br></div><div>> adjust <- c(margin, -margin)</div><div><br></div><div>> adjustPoint <- Qt$QPointF(margin, margin)</div>
<div><br></div><div>> axes <- function(item, painter) {</div><div>+ qfont(painter) <- qfont(pointsize=12)</div><div>+ pos <- as.matrix(item$geometry) + adjust</div><div>+ qdrawText(painter, colnames(df)[1], pos[2], pos[4], "right", "bottom")</div>
<div>+ qdrawText(painter, colnames(df)[2], pos[1], pos[3], "left", "top")</div><div>+ }</div><div><br></div><div>> pointAdder <- function(item, event) {</div><div>+ df <<- rbind(df, event$pos())</div>
<div>+ qupdate(scene)</div><div>+ }</div><div><br></div><div>> pointIdentifier <- function(item, event) {</div><div>+ off <- 20</div><div>+ rect <- qrect(0, 0, off*2, off*2)</div><div>+ mat <- item$deviceTransform(event)$inverted()</div>
<div>+ rect <- mat$mapRect(rect)</div><div>+ pos <- event$pos()</div><div>+ rect$moveCenter(pos)</div><div>+ hits <- item$primitives(rect)</div><div>+ hitmat <- as.matrix(df[hits,])</div><div>+ posmat <- matrix(pos, ncol=2)</div>
<div>+ labeled <<- rep(FALSE, nrow(df))</div><div>+ labeled[hits][Biobase::matchpt(posmat, hitmat)[,1]] <<- TRUE</div><div>+ qupdate(labels)</div><div>+ }</div><div><br></div><div>> boundsPainter <- function(item, painter) {</div>
<div>+ lims <- dim(item)</div><div>+ qstrokeColor(painter) <- "red"</div><div>+ qdrawRect(painter, lims[1,1], lims[1,2], lims[2,1], lims[2,2])</div><div>+ }</div><div><br></div><div>> scene <- qscene()</div>
<div>Error in qinvokeStatic(cl, basename, ...) : </div><div> Unable to disambiguate method QGraphicsScene::QGraphicsScene</div></div><div><br></div></div></div></div></blockquote><div><br>This bug was fixed yesterday in svn.<br>
<br>
</div><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div></div><div>#################another trace back version #############</div>
<div>
<br></div><div><div>> gctorture(TRUE)</div></div><div>> demo('canvas','qtpaint')</div><div><div><br></div><div><br></div><div><span style="white-space: pre;">        </span>demo(canvas)</div>
<div><span style="white-space: pre;">        </span>---- ~~~~~~</div><div><br></div><div>Type <Return><span style="white-space: pre;">        </span> to start : </div><div><br></div><div>
> ## tests/demonstrations for the interactive canvas</div><div>> </div><div>> library(qtpaint)</div><div><br></div><div>> options(warn=2)</div><div><br></div><div>> options(error=recover)</div><div><br></div>
<div>> circle <- qglyphCircle()</div><div><br></div><div> *** caught segfault ***</div><div>address (nil), cause 'unknown'</div><div><br></div></div></div></blockquote></div><div><br>This seems to have the same cause as the bug reported by Deepayan. The "fix" I made to Smoke last week to fix the bug reported by Deepayan in January (I think we need numbers for these) was actually not a fix. It resulted in a crash whenever a non-Smoke-derived object was deleted. I've found a new work-around (inside qtbase this time), which fixes the old bug, without causing this problem. Try the latest svn.<br>
<font color="#888888">
<br>Michael<br> <br></font></div><div><div></div><div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div><div><div></div><div>Traceback:</div>
<div> 1: glyph$addEllipse</div>
<div> 2: qglyphCircle()</div>
<div> 3: eval.with.vis(expr, envir, enclos)</div><div> 4: eval.with.vis(ei, envir)</div><div> 5: source(available, echo = echo, max.deparse.length = Inf, keep.source = TRUE)</div><div> 6: demo("canvas", "qtpaint")</div>
<div>
<div><br></div><div>Possible actions:</div><div>1: abort (with core dump, if enabled)</div><div>2: normal R exit</div><div>3: exit R without saving workspace</div><div>4: exit R saving workspace</div></div></div><div><br>
</div>
<div><br></div><div>Regards</div><div><br></div><div>Tengfei</div><div><br></div><div><br></div><div><br></div><div><div><div></div><div><br><br><div class="gmail_quote">On Wed, Apr 7, 2010 at 12:11 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="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi,<br>
<br>
I haven't had a chance to investigate this closely, but I'm<br>
consistently getting the following segfault. Can anyone reproduce?<br>
<br>
-Deepayan<br>
<br>
<br>
> library(qtutils)<br>
> foo <- qrepl()<br>
Cannot handle Moc type 'qreal'<br>
<br>
<br>
*** caught segfault ***<br>
address 0x100000002, cause 'memory not mapped'<br>
<br>
Possible actions:<br>
1: abort (with core dump, if enabled)<br>
2: normal R exit<br>
3: exit R without saving workspace<br>
4: exit R saving workspace<br>
_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org" target="_blank">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><br clear="all"><br></div></div>-- <br>Tengfei Yin<br>MCDB PhD student <br>1620 Howe Hall, 2274,<br>Iowa State University<br>Ames, IA,50011-2274<br>Homepage: <a href="http://www.tengfei.name" target="_blank">www.tengfei.name</a><br>
English Blog: <a href="http://www.tengfei.name/en" target="_blank">www.tengfei.name/en</a><br>Chinese Blog: <a href="http://www.tengfei.name/ch" target="_blank">www.tengfei.name/ch</a><br>
</div></div>
<br>_______________________________________________<br>
Qtinterfaces-devel mailing list<br>
<a href="mailto:Qtinterfaces-devel@lists.r-forge.r-project.org" target="_blank">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>
<br></blockquote></div></div></div><br>
</blockquote></div><br><br clear="all"><br>-- <br>Tengfei Yin<br>MCDB PhD student <br>1620 Howe Hall, 2274,<br>Iowa State University<br>Ames, IA,50011-2274<br>Homepage: <a href="http://www.tengfei.name" target="_blank">www.tengfei.name</a><br>
English Blog: <a href="http://www.tengfei.name/en" target="_blank">www.tengfei.name/en</a><br>Chinese Blog: <a href="http://www.tengfei.name/ch" target="_blank">www.tengfei.name/ch</a><br>
</div></div></div>
</blockquote></div><br>