<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>348</bug_id>
          
          <creation_ts>2010-09-21 00:57:32 +0000</creation_ts>
          <short_desc>[QT] fotowall segfaults with &quot;Painter not active&quot;</short_desc>
          <delta_ts>2011-08-15 00:45:56 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>7</classification_id>
          <classification>Build System, Metadata &amp; Runtime</classification>
          <product>Meta-yocto</product>
          <component>meta-yocto</component>
          <version>1.0</version>
          <rep_platform>x86</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WORKSFORME</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard>will be fixed by Aug24/2011</status_whiteboard>
          <keywords></keywords>
          <priority>Medium</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>1.1</target_milestone>
          
          <blocked>280</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Qing He">qing.he</reporter>
          <assigned_to name="Kai Kang">kai.kang</assigned_to>
          <cc>jessica.zhang</cc>
    
    <cc>jiajun.xu</cc>
    
    <cc>ke.yu</cc>
    
    <cc>kevin.tian</cc>
    
    <cc>liang.li2</cc>
    
    <cc>liangliang.wang</cc>
    
    <cc>poky.bs.watcher</cc>
    
    <cc>poky.watcher</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>sgw</cc>
    
    <cc>Xiaofeng.yan</cc>
    
    <cc>yi.zhao</cc>
          
          
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>---</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>9928</commentid>
    <comment_count>0</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-09-21 00:57:32 +0000</bug_when>
    <thetext>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
######</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10070</commentid>
    <comment_count>1</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-09-30 00:18:32 +0000</bug_when>
    <thetext>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&apos;t know where this weird parameter comes from</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10245</commentid>
    <comment_count>2</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-08 01:56:32 +0000</bug_when>
    <thetext>copied the fotowall binary of targets to my dev machine (x86_64), it runs without crashes, so it&apos;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&apos;s probably not the problem of Qt as well.


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

Has anyone tried running 64bit X and Qt on real hardware or with drivers other than vmware?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10247</commentid>
    <comment_count>3</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-08 02:56:07 +0000</bug_when>
    <thetext>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&apos;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&apos;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&apos;t necessarily lie in QT
3. In order to report it to upstream , we may need to reproduce it outside poky</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10249</commentid>
    <comment_count>4</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2010-10-08 04:05:10 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; copied the fotowall binary of targets to my dev machine (x86_64), it runs
&gt; without crashes, so it&apos;s likely not the problem of the app.
&gt; copied Qt libraries in my dev machine into the target (libQtGui, libQtCore,
&gt; libQtXml, libQtSvg, libQtNetwork), with some necessary dependencies (libasound,
&gt; libpcre.so.3), fotowall also crashes, so it&apos;s probably not the problem of Qt as
&gt; well.
&gt; Googling around shows some other unrelated cases that report &quot;painter not
&gt; active&quot;, (e.g. https://bugs.kde.org/show_bug.cgi?id=189059), no root cause can
&gt; be found, but some suspected &quot;probably a graphics driver issue&quot;, but Xorg.0.log
&gt; doesn&apos;t show anything about it. I tried also to replace vmware driver to vesa,
&gt; but it was not successful (X can&apos;t boot up)
&gt; Has anyone tried running 64bit X and Qt on real hardware or with drivers other
&gt; 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...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10250</commentid>
    <comment_count>5</comment_count>
    <who name="Kevin Tian">kevin.tian</who>
    <bug_when>2010-10-08 04:08:06 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Suggesting to lower the importance and delay to 1.0.
&gt; Severity:
&gt; 1. fotowall is a test application for QT, the issue shown in this bug hasn&apos;t
&gt; been observed in other applications so far.
&gt; 2. the bug only happens on x86_64 (and possibly with only vmware_drv.so)
&gt; Also suggesting to test several other QT apps to see whether this issue only
&gt; 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...

&gt; The bug is complex and has risk to be fixed within 0.9 M4
&gt; 1. It&apos;s difficult if not impossible to trace the origin from crash point due to
&gt; the event driven nature of QT
&gt; 2. The root cause doesn&apos;t necessarily lie in QT
&gt; 3. In order to report it to upstream , we may need to reproduce it outside poky</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10262</commentid>
    <comment_count>6</comment_count>
    <who name="Qing He">qing.he</who>
    <bug_when>2010-10-08 19:32:43 +0000</bug_when>
    <thetext>(In reply to comment #4)

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

Yes, I tried &quot;-vga std&quot; and removing the parameter (defaults to -vga cirrus), it still showed nothing (but in graphical mode though)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10289</commentid>
    <comment_count>7</comment_count>
    <who name="Jessica">jessica.zhang</who>
    <bug_when>2010-10-09 17:52:41 +0000</bug_when>
    <thetext>Can we test some other QT apps at least?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>10295</commentid>
    <comment_count>8</comment_count>
    <who name="Ke Yu">ke.yu</who>
    <bug_when>2010-10-10 19:03:24 +0000</bug_when>
    <thetext>(In reply to comment #7)
&gt; Can we test some other QT apps at least?

we can try qmmp, qtdemo.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>15459</commentid>
    <comment_count>9</comment_count>
    <who name="Kai Kang">kai.kang</who>
    <bug_when>2011-08-15 00:45:56 +0000</bug_when>
    <thetext>It works now, please refer the comment of bug 280</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>