Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
eris0xffOffline
Post subject: Patch for new libCairo / NX Crash  PostPosted: 10.05.2012, 17:37



Joined: 2012-02-24
Posts: 3

Status: Offline
This probably isn't the proper place to post this, but this is from the continuing discussion of the new libCairo (1.12.1+ ?) breaking things.

One of the things that libCairo breaks is NX. I developed a patch for NX that prevents it from crashing with the new libCairo.

It's a late-alpha, early-beta quality patch but it works for me. Could someone who uses NX try this? I use KDE and fixed it because I use GTK apps, so I'm especially interested in people who primarily use GTK-based desktops like Gnome and XFCE.


*** x2go/nx-libs-3.5.0.12/nx-X11/programs/Xserver/hw/nxagent/Render.c 2012-03-07 14:04:02.000000000 -0700
--- x2go-new/nx-libs-3.5.0.12/nx-X11/programs/Xserver/hw/nxagent/Render.c 2012-05-10 11:09:39.631786853 -0600
***************
*** 995,1000 ****
--- 995,1030 ----
#endif
}

+
+ int nxagentShouldDeferComposite(PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst)
+ {
+
+ int drawableDst;
+ int linkDeferred;
+ int unSyncedSrcMask;
+
+ drawableDst = ( nxagentRenderVersionMajor == 0 &&
+ nxagentRenderVersionMinor == 8 &&
+ (pDst) -> pDrawable -> type == DRAWABLE_PIXMAP
+ );
+
+ linkDeferred = ( nxagentOption(DeferLevel) >= 2 &&
+ nxagentOption(LinkType) <LINK_TYPE_ADSL> pDrawable -> type == DRAWABLE_PIXMAP &&
+ (
+ (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)) ||
+ ((pMask) && pMask -> pDrawable && (nxagentDrawableStatus((pMask) -> pDrawable) == NotSynchronized))
+ )
+ );
+
+
+ return drawableDst || linkDeferred || unSyncedSrcMask;
+ }
+
+
void nxagentComposite(CARD8 op, PicturePtr pSrc, PicturePtr pMask, PicturePtr pDst,
INT16 xSrc, INT16 ySrc, INT16 xMask, INT16 yMask, INT16 xDst,
INT16 yDst, CARD16 width, CARD16 height)
***************
*** 1036,1043 ****
}

#endif
!
! if (NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst))
{
pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst, width, height);

--- 1066,1073 ----
}

#endif
! /* if (NXAGENT_SHOULD_DEFER_COMPOSITE(pSrc, pMask, pDst)) */
! if (nxagentShouldDeferComposite(pSrc, pMask, pDst))
{
pDstRegion = nxagentCreateRegion(pDst -> pDrawable, NULL, xDst, yDst, width, height);

***************
*** 1095,1101 ****
}
}

! if (pMask != NULL && pMask -> pDrawable != pSrc -> pDrawable &&
pMask -> pDrawable != pDst -> pDrawable)
{
nxagentSynchronizeShmPixmap(pMask -> pDrawable, xMask, yMask, width, height);
--- 1125,1132 ----
}
}

! if ((pMask) && (pMask->pDrawable) &&
! pMask -> pDrawable != pSrc -> pDrawable &&
pMask -> pDrawable != pDst -> pDrawable)
{
nxagentSynchronizeShmPixmap(pMask -> pDrawable, xMask, yMask, width, height);
***************
*** 1259,1265 ****
* on the real X server.
*/

! if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n",
--- 1290,1296 ----
* on the real X server.
*/

! if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized))
{
#ifdef TEST
fprintf(stderr, "nxagentGlyphs: Synchronizing source [%s] at [%p].\n",
***************
*** 1302,1315 ****
nxagentSynchronizeBox(pSrc -> pDrawable, &glyphBox, NEVER_BREAK);
}

! if (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP)
{
nxagentIncreasePixmapUsageCounter((PixmapPtr) pSrc -> pDrawable);
}
}

! if (pSrc -> pDrawable != pDst -> pDrawable &&
! nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p].\n",
--- 1333,1347 ----
nxagentSynchronizeBox(pSrc -> pDrawable, &glyphBox, NEVER_BREAK);
}

! if (pSrc -> pDrawable && (pSrc -> pDrawable -> type == DRAWABLE_PIXMAP))
{
nxagentIncreasePixmapUsageCounter((PixmapPtr) pSrc -> pDrawable);
}
}

!
! if (pSrc -> pDrawable && (pSrc -> pDrawable != pDst -> pDrawable &&
! nxagentDrawableStatus(pDst -> pDrawable) == NotSynchronized))
{
#ifdef TEST
fprintf(stderr, "nxagentGlyphs: Synchronizing destination [%s] at [%p].\n",
***************
*** 1749,1755 ****
return;
}

! if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTrapezoids: Going to synchronize the source drawable at [%p].\n",
--- 1781,1789 ----
return;
}

! /* the following blocks need fixing to ignore null values of pDrawable */
!
! if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized))
{
#ifdef TEST
fprintf(stderr, "nxagentTrapezoids: Going to synchronize the source drawable at [%p].\n",
***************
*** 1843,1849 ****
* operation like nxagentTrapezoids() does.
*/

! if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTriangles: Going to synchronize the source drawable at [%p].\n",
--- 1877,1885 ----
* operation like nxagentTrapezoids() does.
*/

!
!
! if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized))
{
#ifdef TEST
fprintf(stderr, "nxagentTriangles: Going to synchronize the source drawable at [%p].\n",
***************
*** 1920,1926 ****
* operation like nxagentTrapezoids() does.
*/

! if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTriStrip: Going to synchronize the source drawable at [%p].\n",
--- 1956,1963 ----
* operation like nxagentTrapezoids() does.
*/

!
! if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized))
{
#ifdef TEST
fprintf(stderr, "nxagentTriStrip: Going to synchronize the source drawable at [%p].\n",
***************
*** 1997,2003 ****
* operation like nxagentTrapezoids() does.
*/

! if (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized)
{
#ifdef TEST
fprintf(stderr, "nxagentTriFan: Going to synchronize the source drawable at [%p].\n",
--- 2034,2041 ----
* operation like nxagentTrapezoids() does.
*/

!
! if (pSrc -> pDrawable && (nxagentDrawableStatus(pSrc -> pDrawable) == NotSynchronized))
{
#ifdef TEST
fprintf(stderr, "nxagentTriFan: Going to synchronize the source drawable at [%p].\n",
 
 View user's profile Send private message  
Reply with quote Back to top
ghoOffline
Post subject: RE: Patch for new libCairo / NX Crash  PostPosted: 13.05.2012, 08:43



Joined: 2010-09-18
Posts: 2

Status: Offline
I use KDE as well, but I have an installation with XFCE to test it.
Because I am not experienced, can you please give a short description how to use the patch?

regards
gho Rolling Eyes
 
 View user's profile Send private message  
Reply with quote Back to top
DonKultOffline
Post subject: RE: Patch for new libCairo / NX Crash  PostPosted: 14.05.2012, 08:39
Team Member


Joined: 2010-09-02
Posts: 482

Status: Offline
Please propose patches on the relevant mailinglist/bugtracker of the progam. People there know a lot better what is needed for their specific program to get the patch in and have easier ways to test it (e.g. because a bunch of testers linger on these mailinglists, too).

If you really don't know who to contact post the patch to the debian bugtracker, the maintainer of the package will know and can possibly include it in an upload for testing out.


The community here is in general to broad to help with testing of specific patches. It doesn't hurt to ask of course, but most of the users here are indeed users and not developers and/or don't know enough about the problem at hand to be helpful (e.g. i don't even know what you mean with NX…) so if you want meaningful input from here, you need to include more details than what you need to for the upstream developer community.

_________________
MfG. DonKult
"I never make stupid mistakes. Only very, very clever ones." ~ The Doctor
 
 View user's profile Send private message Visit poster's website  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio