[Date Prev][Date Next][Thread Prev][Thread Next][Thread Index]

[XaraXtreme-dev] Segmentation fault with multiple blending


When I tried to blend 3 objects together (from object 1 to object 2 and then from object 2 to object 3) Xara (rev 804) crashed with "Segmentation fault".

The problem occurs in OpBlendNodes::DoBlendBlendAndObject() (in tools/blndtool.cpp). It seems that when we try to blend from already blended group that pNodeBlendStart is NULL. This is what I got from gdb:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1208932688 (LWP 2267)]
OpBlendNodes::GetNodeClosestToPoint (this=0xa00efb8, ppInk=0xbfc7c4c8, StartBlend=1) at .././Kernel/node.h:1143
1143            return(Child);

Also, I've noticed that there are 2 lines commented which assign value to pNodeBlendStart. When I recompiled with those two lines everything worked.

This is from "svn diff":

Index: tools/blndtool.cpp
--- tools/blndtool.cpp  (revision 804)
+++ tools/blndtool.cpp  (working copy)
@@ -3688,8 +3688,8 @@
        BOOL ok = FALSE;
        if (BlendIsStart)
-// BlenderInfoItem* pItem = (BlenderInfoItem*)BlenderList.GetTail();
-//             pNodeBlendStart = pNodeBlend;
+ BlenderInfoItem* pItem = (BlenderInfoItem*)BlenderList.GetTail();
+               pNodeBlendStart = pNodeBlend;
                ok              = GetNodeClosestToPoint(&pNodeStart, TRUE);
                pNodeEnd                = pRefEnd->pNode;
                pContextNode    = pNodeEnd;

I'm sure there is a reason why above two lines are commented, but when they are included at least it doesn't crash and multiple blending works. Anyway, I know that you guys would fix this properly. :)

Keep up the good work!