Bug 348 - [QT] fotowall segfaults with "Painter not active"
Summary: [QT] fotowall segfaults with "Painter not active"
Status: RESOLVED WORKSFORME
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: meta-yocto (show other bugs)
Version: 1.0
Hardware: x86 Multiple
: Medium normal
Target Milestone: 1.1
Assignee: Kai Kang
QA Contact:
URL:
Whiteboard: will be fixed by Aug24/2011
Depends on:
Blocks: 280
  Show dependency tree
 
Reported: 2010-09-21 00:57 UTC by Qing He
Modified: 2011-08-15 00:45 UTC (History)
12 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Qing He 2010-09-21 00:57:32 UTC
See also bug 280 and bug 347

After adding -cpu qemux86-64,+ssse3 on qemu command line to workaround bug 347, fotowall still crashes:

######
root@qemux86-64:~# DISPLAY=:0.0 fotowall
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv failed for
BOM: Bad file descriptor
QIconvCodec::convertFromUnicode: using Latin-1 for conversion, iconv_open
failed
QIconvCodec::convertToUnicode: using Latin-1 for conversion, iconv_open failed
QNativeImage: Unable to attach to shared memory segment.
QPainter::begin: Paint device returned engine == 0, type: 3
QPainter::setOpacity: Painter not active
QPainter::translate: Painter not active
QPainter::setWorldTransform: Painter not active
QPainter::setPen: Painter not active
QPainter::setBrush: Painter not active
QPainter::setBackground: Painter not active
QPainter::setBackgroundMode: Painter not active
QPainter::setBrushOrigin: Painter not active
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::setRenderHint: Painter must be active to set rendering hints
QPainter::drawPath: Painter not active
QPainter::end: Painter not active, aborted
Segmentation fault
######
Comment 1 Qing He 2010-09-30 00:18:32 UTC
the below error message:
    QNativeImage: Unable to attach to shared memory segment.
is caused by a likely invalid rect size, QNativeImage is a recent addition in Qt, it used shm to map the image, the call trace shows something like:

#0 XShmCreateImage()
#1 QNativeImage(this=0x8e5a60, width=6418448, height=432...)
#2 QRasterWindowSurface::prepareBuffer(...)
...

the width parameter is too high and causing problems, considering the depth, this needs to shmget about 11G address space, which fails shmget and returns EINVAL.

Still don't know where this weird parameter comes from
Comment 2 Qing He 2010-10-08 01:56:32 UTC
copied the fotowall binary of targets to my dev machine (x86_64), it runs without crashes, so it's likely not the problem of the app.

copied Qt libraries in my dev machine into the target (libQtGui, libQtCore, libQtXml, libQtSvg, libQtNetwork), with some necessary dependencies (libasound, libpcre.so.3), fotowall also crashes, so it's probably not the problem of Qt as well.


Googling around shows some other unrelated cases that report "painter not active", (e.g. https://bugs.kde.org/show_bug.cgi?id=189059), no root cause can be found, but some suspected "probably a graphics driver issue", but Xorg.0.log doesn't show anything about it. I tried also to replace vmware driver to vesa, but it was not successful (X can't boot up)

Has anyone tried running 64bit X and Qt on real hardware or with drivers other than vmware?
Comment 3 Qing He 2010-10-08 02:56:07 UTC
Suggesting to lower the importance and delay to 1.0.

Severity:
1. fotowall is a test application for QT, the issue shown in this bug hasn't been observed in other applications so far.
2. the bug only happens on x86_64 (and possibly with only vmware_drv.so)

Also suggesting to test several other QT apps to see whether this issue only happens to fotowall or is more widespread.



The bug is complex and has risk to be fixed within 0.9 M4
1. It's difficult if not impossible to trace the origin from crash point due to the event driven nature of QT
2. The root cause doesn't necessarily lie in QT
3. In order to report it to upstream , we may need to reproduce it outside poky
Comment 4 Kevin Tian 2010-10-08 04:05:10 UTC
(In reply to comment #2)
> copied the fotowall binary of targets to my dev machine (x86_64), it runs
> without crashes, so it's likely not the problem of the app.
> copied Qt libraries in my dev machine into the target (libQtGui, libQtCore,
> libQtXml, libQtSvg, libQtNetwork), with some necessary dependencies (libasound,
> libpcre.so.3), fotowall also crashes, so it's probably not the problem of Qt as
> well.
> Googling around shows some other unrelated cases that report "painter not
> active", (e.g. https://bugs.kde.org/show_bug.cgi?id=189059), no root cause can
> be found, but some suspected "probably a graphics driver issue", but Xorg.0.log
> doesn't show anything about it. I tried also to replace vmware driver to vesa,
> but it was not successful (X can't boot up)
> Has anyone tried running 64bit X and Qt on real hardware or with drivers other
> than vmware?

Qing, could you post the last question to the yocto list as only limited people are monitoring bugzilla?

For disabling vmware driver, I think you also need some option tweak in qemu side, e.g. using stdvga...
Comment 5 Kevin Tian 2010-10-08 04:08:06 UTC
(In reply to comment #3)
> Suggesting to lower the importance and delay to 1.0.
> Severity:
> 1. fotowall is a test application for QT, the issue shown in this bug hasn't
> been observed in other applications so far.
> 2. the bug only happens on x86_64 (and possibly with only vmware_drv.so)
> Also suggesting to test several other QT apps to see whether this issue only
> happens to fotowall or is more widespread.

Have you tried other QT apps? Ke may better answer this question since he chose those QT demo apps...

> The bug is complex and has risk to be fixed within 0.9 M4
> 1. It's difficult if not impossible to trace the origin from crash point due to
> the event driven nature of QT
> 2. The root cause doesn't necessarily lie in QT
> 3. In order to report it to upstream , we may need to reproduce it outside poky
Comment 6 Qing He 2010-10-08 19:32:43 UTC
(In reply to comment #4)

> For disabling vmware driver, I think you also need some option tweak in qemu
> side, e.g. using stdvga...

Yes, I tried "-vga std" and removing the parameter (defaults to -vga cirrus), it still showed nothing (but in graphical mode though)
Comment 7 Jessica 2010-10-09 17:52:41 UTC
Can we test some other QT apps at least?
Comment 8 Ke Yu 2010-10-10 19:03:24 UTC
(In reply to comment #7)
> Can we test some other QT apps at least?

we can try qmmp, qtdemo.
Comment 9 Kai Kang 2011-08-15 00:45:56 UTC
It works now, please refer the comment of bug 280