[RQt-devel] New crash

Deepayan Sarkar deepayan.sarkar at gmail.com
Fri Apr 9 12:34:17 CEST 2010


On Wed, Apr 7, 2010 at 9:18 AM, Michael Lawrence
<lawrence.michael at gene.com> wrote:
>
>
> On Tue, Apr 6, 2010 at 10:30 PM, Tengfei Yin <yintengfei at gmail.com> wrote:
>>
>> Hi,
>> I have the same crash here
>> my system ubuntu 9.10 64 bit, qt 4.5
>> my sessionInfo()
>> > sessionInfo()
>> R version 2.10.1 (2009-12-14)
>> x86_64-pc-linux-gnu
>> locale:
>>  [1] LC_CTYPE=zh_CN.UTF-8       LC_NUMERIC=C
>>  [3] LC_TIME=en_US.UTF-8        LC_COLLATE=en_US.UTF-8
>>  [5] LC_MONETARY=C              LC_MESSAGES=en_US.UTF-8
>>  [7] LC_PAPER=en_US.UTF-8       LC_NAME=C
>>  [9] LC_ADDRESS=C               LC_TELEPHONE=C
>> [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C
>> attached base packages:
>> [1] stats     graphics  grDevices utils     datasets  methods   base
>>
>> I have another crash caused by call demo('canvas','qtpaint'), here is
>> running message and the trace back version,
>> > library(qtpaint)
>> > demo('canvas','qtpaint')
>>
>> demo(canvas)
>> ---- ~~~~~~
>> Type  <Return> to start :
>> > ## tests/demonstrations for the interactive canvas
>> >
>> > library(qtpaint)
>> > options(warn=2)
>> > options(error=recover)
>> > circle <- qglyphCircle()
>> > n <- 1000
>> > x <- rnorm(n, 50, 25)
>> > y <- rnorm(n, 50, 25)
>> > df <- data.frame(X = x, Y = y)
>> > ##data(mtcars)
>> > ##df <- mtcars[,c("mpg", "hp")]
>> >
>> > ##data(iris)
>> > ##df <- iris
>> > fill <- col2rgb(rgb(1, seq(0, 1, length=nrow(df)), 0, 0.5), TRUE)
>> > ##fill <- col2rgb(rgb(1, 0, 0, 0.5), TRUE)
>> > ##fill <- rep("red", nrow(df))
>> > scatterplot <- function(item, painter) {
>> +   qstrokeColor(painter) <- NA
>> +   qfillColor(painter) <- fill
>> +   ##qantialias(painter) <- FALSE
>> +   ##qdrawText(painter, "x", df[,1], df[,2])
>> +   ##qdrawPoint(painter, df[,1], df[,2], stroke = fill)
>> +   qdrawGlyph(painter, circle, df[,1], df[,2], fill = fill)
>> + }
>> > labeled <- rep(FALSE, nrow(df))
>> > labeler <- function(item, painter) {
>> +   mat <- qdeviceTransform(painter)
>> +   off <- qmap(mat, c(5, 5)) - qmap(mat, c(0, 0))
>> +   df <- df[labeled,]
>> +   qdrawText(painter, rownames(df), df[,1]+off[1], df[,2]+off[2], "left",
>> +             "bottom")
>> + }
>> > margin <- 5
>> > adjust <- c(margin, -margin)
>> > adjustPoint <- Qt$QPointF(margin, margin)
>> > axes <- function(item, painter) {
>> +   qfont(painter) <- qfont(pointsize=12)
>> +   pos <- as.matrix(item$geometry) + adjust
>> +   qdrawText(painter, colnames(df)[1], pos[2], pos[4], "right", "bottom")
>> +   qdrawText(painter, colnames(df)[2], pos[1], pos[3], "left", "top")
>> + }
>> > pointAdder <- function(item, event) {
>> +   df <<- rbind(df, event$pos())
>> +   qupdate(scene)
>> + }
>> > pointIdentifier <- function(item, event) {
>> +   off <- 20
>> +   rect <- qrect(0, 0, off*2, off*2)
>> +   mat <- item$deviceTransform(event)$inverted()
>> +   rect <- mat$mapRect(rect)
>> +   pos <- event$pos()
>> +   rect$moveCenter(pos)
>> +   hits <- item$primitives(rect)
>> +   hitmat <- as.matrix(df[hits,])
>> +   posmat <- matrix(pos, ncol=2)
>> +   labeled <<- rep(FALSE, nrow(df))
>> +   labeled[hits][Biobase::matchpt(posmat, hitmat)[,1]] <<- TRUE
>> +   qupdate(labels)
>> + }
>> > boundsPainter <- function(item, painter) {
>> +   lims <- dim(item)
>> +   qstrokeColor(painter) <- "red"
>> +   qdrawRect(painter, lims[1,1], lims[1,2], lims[2,1], lims[2,2])
>> + }
>> > scene <- qscene()
>> Error in qinvokeStatic(cl, basename, ...) :
>>   Unable to disambiguate method QGraphicsScene::QGraphicsScene
>
> This bug was fixed yesterday in svn.
>
>>
>> #################another trace back version #############
>> > gctorture(TRUE)
>> > demo('canvas','qtpaint')
>>
>> demo(canvas)
>> ---- ~~~~~~
>> Type  <Return> to start :
>> > ## tests/demonstrations for the interactive canvas
>> >
>> > library(qtpaint)
>> > options(warn=2)
>> > options(error=recover)
>> > circle <- qglyphCircle()
>>  *** caught segfault ***
>> address (nil), cause 'unknown'
>
> 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.

Works now, thanks.

I'll try using the bug tracker for my next report.

-Deepayan


More information about the Qtinterfaces-devel mailing list