[Qt-interest] crash with QPixmap::fromImage(image);
Tim Dewhirst
tim at bugless.co.uk
Fri Jul 16 18:27:58 CEST 2010
Hello,
Matthias Pospiech wrote:
> In this code I experience a crash in the line with QPixmap::fromImage
>
> void QCameraImage::setImage(const QImage & image)
> {
> d->time.start();
> d->imageChanged = true;
> d->image = image;
> d->pixmap = QPixmap::fromImage(d->image);
> update(); // calls paintEvent
> }
>
> and need help since I can not see at all how to debug this.
Odd; your stack jumps off to QWizard and you don't show what value d is
in frame 6. If I had to guess, I would say that d is uninitialized or
was initialized but was subsequently free'd and not NULL'd off. Another
possibility is that the QImage was constructed from raw data and that
the raw image data is no longer valid.
Tim
More information about the Qt-interest-old
mailing list