Mike,<div><br></div><div>Did you send them my patch?</div><div><br></div><div>Jim</div><div><br><br><div class="gmail_quote">On Mon, May 14, 2012 at 3:54 PM, Mike Gabriel <span dir="ltr"><<a href="mailto:mike.gabriel@das-netzwerkteam.de" target="_blank">mike.gabriel@das-netzwerkteam.de</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Jim, hi all,<br>
<br>
NoMachine upstream of NX has become aware of the issue (reported by me)...<br>
<a href="http://www.nomachine.com/tr/view.php?id=TR05J02703" target="_blank">http://www.nomachine.com/tr/<u></u>view.php?id=TR05J02703</a><span class="HOEnZb"><font color="#888888"><br>
<br>
Mike</font></span><div class="im HOEnZb"><br>
<br>
On Do 10 Mai 2012 19:21:18 CEST Jim Burnes wrote:<br>
<br>
</div><div class="HOEnZb"><div class="h5"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I don't know what the current patch status is for fixing nxagent with the<br>
new libcairo (1.12.1+ I believe), but eventually I got tired of waiting and<br>
created my own patches for nxagent/x2goagent.<br>
<br>
Most of the fixes were required because the render extension now allows<br>
(and libcairo uses) null source drawables (for gradients etc), null masks<br>
and null mask drawables.<br>
<br>
This change creates a bit of a logic mess in the code.   Previous patches<br>
to the code tried to account for all of the possibilities, but fell a<br>
little short.<br>
<br>
Consider this an alpha-quality patch.  I've only tested it in KDE while<br>
running GTK applications.   All my favorite GTK apps like Firefox, Emacs,<br>
 rox-filer and all my other GTK apps that were broken are now working just<br>
fine.  (Though I'm getting only the standard GTK look and feel - don't know<br>
if that's caused by anything I've done.)<br>
<br>
Could someone test this under Gnome?<br>
<br>
 Also, since I'm not primarily an X software engineer I'd like a specialist<br>
to take a look at it.   The fix is a little crude.   I just attached to the<br>
x2goagent process and fixed the lines that caused segfaults.   (About 10 of<br>
them).<br>
<br>
I also rewrote one of the macros in Pixels.h into a local subroutine in<br>
Render.c.  It had a bug in it and complex macro bugs are a PITA to debug in<br>
gdb (or anything else really).   The macro is only used in one place and<br>
although the code in the macro is called pretty often, it's very likely<br>
that the compiler would inline it anyway.  The rewrite increases<br>
readability by a large factor.<br>
<br>
A better patch could be created by someone that understands nxagent and X<br>
much better.   The render extension code receives render ops from X client<br>
programs.  The render ops can contain any combination of picture source,<br>
picture destination and picture mask.  It's apparently legal to send render<br>
ops with combinations of null picture source drawables, picture masks and<br>
picture mask drawables.   A better way to patch this would be to simply<br>
perform a return on all the illegal combinations of null parameters for the<br>
render ops.  That way you wouldn't have to keep re-checking the parameter<br>
values.<br>
<br>
So anyway, here it is.  I appreciate it if someone out there would test it<br>
and let me know.   Also if anyone knows of the X docs which discuss null<br>
picture sources and masks in the render extension I'd be glad to create a<br>
cleaner patch that conforms to the stands.<br>
<br>
Let me know.<br>
<br>
eris0xff<br>
<br>
*** x2go/nx-libs-3.5.0.12/nx-X11/<u></u>programs/Xserver/hw/nxagent/<u></u>Render.c<br>
2012-03-07 14:04:02.000000000 -0700<br>
---<br>
x2go-new/nx-libs-3.5.0.12/nx-<u></u>X11/programs/Xserver/hw/<u></u>nxagent/Render.c<br>
2012-05-10 11:09:39.631786853 -0600<br>
***************<br>
*** 995,1000 ****<br>
--- 995,1030 ----<br>
    #endif<br>
  }<br>
<br>
+<br>
+ int nxagentShouldDeferComposite(<u></u>PicturePtr pSrc, PicturePtr pMask,<br>
PicturePtr pDst)<br>
+ {<br>
+<br>
+ int drawableDst;<br>
+ int linkDeferred;<br>
+ int unSyncedSrcMask;<br>
+<br>
+     drawableDst      =  ( nxagentRenderVersionMajor == 0 &&<br>
+                           nxagentRenderVersionMinor == 8 &&<br>
+                       (pDst) -> pDrawable -> type == DRAWABLE_PIXMAP<br>
+                             );<br>
+<br>
+     linkDeferred     =  ( nxagentOption(DeferLevel) >= 2<br>
&&<br>
+                               nxagentOption(LinkType) < LINK_TYPE_ADSL<br>
+                             );<br>
+<br>
+     unSyncedSrcMask  =  ( nxagentOption(DeferLevel) == 1 &&<br>
+                               (pDst) -> pDrawable -> type ==<br>
DRAWABLE_PIXMAP &&<br>
+                               (<br>
+                    (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -><br>
pDrawable) == NotSynchronized)) ||<br>
+                            ((pMask) && pMask -> pDrawable &&<br>
(nxagentDrawableStatus((pMask) -> pDrawable) == NotSynchronized))<br>
+                   )<br>
+                 );<br>
+<br>
+<br>
+     return drawableDst || linkDeferred || unSyncedSrcMask;<br>
+ }<br>
+<br>
+<br>
  void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask,<br>
PicturePtr pDst,<br>
                            INT16 xSrc, INT16 ySrc, INT16 xMask, INT16<br>
yMask, INT16 xDst,<br>
                                INT16 yDst, CARD16 width, CARD16 height)<br>
***************<br>
*** 1036,1043 ****<br>
    }<br>
<br>
    #endif<br>
!<br>
!   if (NXAGENT_SHOULD_DEFER_<u></u>COMPOSITE(pSrc, pMask, pDst))<br>
    {<br>
      pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst,<br>
width, height);<br>
<br>
--- 1066,1073 ----<br>
    }<br>
<br>
    #endif<br>
!   /* if (NXAGENT_SHOULD_DEFER_<u></u>COMPOSITE(pSrc, pMask, pDst)) */<br>
!   if (nxagentShouldDeferComposite(<u></u>pSrc, pMask, pDst))<br>
    {<br>
      pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst,<br>
width, height);<br>
<br>
***************<br>
*** 1095,1101 ****<br>
      }<br>
    }<br>
<br>
!   if (pMask != NULL && pMask -> pDrawable != pSrc -> pDrawable &&<br>
            pMask -> pDrawable != pDst -> pDrawable)<br>
    {<br>
      nxagentSynchronizeShmPixmap(<u></u>pMask -> pDrawable, xMask, yMask, width,<br>
height);<br>
--- 1125,1132 ----<br>
      }<br>
    }<br>
<br>
!   if ((pMask) && (pMask->pDrawable) &&<br>
!           pMask -> pDrawable != pSrc -> pDrawable &&<br>
            pMask -> pDrawable != pDst -> pDrawable)<br>
    {<br>
      nxagentSynchronizeShmPixmap(<u></u>pMask -> pDrawable, xMask, yMask, width,<br>
height);<br>
***************<br>
*** 1259,1265 ****<br>
     * on the real X server.<br>
     */<br>
<br>
!   if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n",<br>
--- 1290,1296 ----<br>
     * on the real X server.<br>
     */<br>
<br>
!   if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) ==<br>
NotSynchronized))<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n",<br>
***************<br>
*** 1302,1315 ****<br>
        nxagentSynchronizeBox(pSrc -> pDrawable, &glyphBox, NEVER_BREAK);<br>
      }<br>
<br>
!     if (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP)<br>
      {<br>
        nxagentIncreasePixmapUsageCoun<u></u>ter((PixmapPtr) pSrc -> pDrawable);<br>
      }<br>
    }<br>
<br>
!   if (pSrc -> pDrawable != pDst -> pDrawable &&<br>
!           nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized)<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at<br>
[%p].\n",<br>
--- 1333,1347 ----<br>
        nxagentSynchronizeBox(pSrc -> pDrawable, &glyphBox, NEVER_BREAK);<br>
      }<br>
<br>
!     if (pSrc -> pDrawable && (pSrc -> pDrawable -> type ==<br>
DRAWABLE_PIXMAP))<br>
      {<br>
        nxagentIncreasePixmapUsageCoun<u></u>ter((PixmapPtr) pSrc -> pDrawable);<br>
      }<br>
    }<br>
<br>
!<br>
!   if (pSrc -> pDrawable && (pSrc -> pDrawable != pDst -> pDrawable &&<br>
!           nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized))<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at<br>
[%p].\n",<br>
***************<br>
*** 1749,1755 ****<br>
      return;<br>
    }<br>
<br>
!   if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTrapezoids: Going to synchronize the source<br>
drawable at [%p].\n",<br>
--- 1781,1789 ----<br>
      return;<br>
    }<br>
<br>
!   /* the following blocks need fixing to ignore null values of pDrawable<br>
*/<br>
!<br>
!   if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) ==<br>
NotSynchronized))<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTrapezoids: Going to synchronize the source<br>
drawable at [%p].\n",<br>
***************<br>
*** 1843,1849 ****<br>
     * operation like nxagentTrapezoids() does.<br>
     */<br>
<br>
!   if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTriangles: Going to synchronize the source<br>
drawable at [%p].\n",<br>
--- 1877,1885 ----<br>
     * operation like nxagentTrapezoids() does.<br>
     */<br>
<br>
!<br>
!<br>
!   if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) ==<br>
NotSynchronized))<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTriangles: Going to synchronize the source<br>
drawable at [%p].\n",<br>
***************<br>
*** 1920,1926 ****<br>
     * operation like nxagentTrapezoids() does.<br>
     */<br>
<br>
!   if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTriStrip: Going to synchronize the source<br>
drawable at [%p].\n",<br>
--- 1956,1963 ----<br>
     * operation like nxagentTrapezoids() does.<br>
     */<br>
<br>
!<br>
!   if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) ==<br>
NotSynchronized))<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTriStrip: Going to synchronize the source<br>
drawable at [%p].\n",<br>
***************<br>
*** 1997,2003 ****<br>
     * operation like nxagentTrapezoids() does.<br>
     */<br>
<br>
!   if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTriFan: Going to synchronize the source<br>
drawable at [%p].\n",<br>
--- 2034,2041 ----<br>
     * operation like nxagentTrapezoids() does.<br>
     */<br>
<br>
!<br>
!   if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) ==<br>
NotSynchronized))<br>
    {<br>
      #ifdef TEST<br>
      fprintf(stderr, "nxagentTriFan: Going to synchronize the source<br>
drawable at [%p].\n",<br>
<br>
</blockquote>
<br>
<br>
<br></div></div><div class="HOEnZb"><div class="h5">
-- <br>
<br>
DAS-NETZWERKTEAM<br>
mike gabriel, dorfstr. 27, 24245 barmissen<br>
fon: <a href="tel:%2B49%20%284302%29%20281418" value="+494302281418" target="_blank">+49 (4302) 281418</a>, fax: <a href="tel:%2B49%20%284302%29%20281419" value="+494302281419" target="_blank">+49 (4302) 281419</a><br>
<br>
GnuPG Key ID 0xB588399B<br>
mail: <a href="mailto:mike.gabriel@das-netzwerkteam.de" target="_blank">mike.gabriel@das-netzwerkteam.<u></u>de</a>, <a href="http://das-netzwerkteam.de" target="_blank">http://das-netzwerkteam.de</a><br>
<br>
freeBusy:<br>
<a href="https://mail.das-netzwerkteam.de/freebusy/m.gabriel%40das-netzwerkteam.de.xfb" target="_blank">https://mail.das-netzwerkteam.<u></u>de/freebusy/m.gabriel%40das-<u></u>netzwerkteam.de.xfb</a><br>
</div></div><br>_______________________________________________<br>
X2Go-Dev mailing list<br>
<a href="mailto:X2Go-Dev@lists.berlios.de">X2Go-Dev@lists.berlios.de</a><br>
<a href="https://lists.berlios.de/mailman/listinfo/x2go-dev" target="_blank">https://lists.berlios.de/mailman/listinfo/x2go-dev</a><br></blockquote></div><br></div>