[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [32769] branches/soc-2008-mxcurioni/source /blender/freestyle/intern/stroke/Curve.cpp: Yet another attempt to fix a fatal error in the constructor of the
Tamito Kajiyama
rd6t-kjym at asahi-net.or.jp
Sat Oct 30 15:00:12 CEST 2010
Revision: 32769
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32769
Author: kjym3
Date: 2010-10-30 15:00:11 +0200 (Sat, 30 Oct 2010)
Log Message:
-----------
Yet another attempt to fix a fatal error in the constructor of the
CurvePoint class (cf. revision 32688). Also added a few printf calls
for debugging, with the aim of making bug reports more informative.
Problem reported by edna in the BA Freestyle thread together with a
.blend file for reproducing the fatal error, thanks!
Revision Links:
--------------
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=32688
Modified Paths:
--------------
branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Curve.cpp
Modified: branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Curve.cpp
===================================================================
--- branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Curve.cpp 2010-10-30 12:04:00 UTC (rev 32768)
+++ branches/soc-2008-mxcurioni/source/blender/freestyle/intern/stroke/Curve.cpp 2010-10-30 13:00:11 UTC (rev 32769)
@@ -127,6 +127,12 @@
//_t2d = t3;
_t2d=t2*t3;
}
+ else if((iA->getPoint2D() - iA->getPoint2D()).norm() < 1e-6) {
+ __A = iB->A();
+ __B = iB->B();
+ //_t2d = t3;
+ _t2d=t2*t3;
+ }
}
else if(iA->A() != 0 && iB->A() != 0 && (iA->A()->point3d() - iB->A()->point3d()).norm() < 1e-6)
{
@@ -141,7 +147,13 @@
goto iA_B_eq_iB_A;
}
if (!__A || !__B) {
- cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)" << endl;
+ printf("iA A 0x%p p (%f, %f)\n", iA->A(), iA->A()->getPoint2D().x(), iA->A()->getPoint2D().y());
+ printf("iA B 0x%p p (%f, %f)\n", iA->B(), iA->B()->getPoint2D().x(), iA->B()->getPoint2D().y());
+ printf("iB A 0x%p p (%f, %f)\n", iB->A(), iB->A()->getPoint2D().x(), iB->A()->getPoint2D().y());
+ printf("iB B 0x%p p (%f, %f)\n", iB->B(), iB->B()->getPoint2D().x(), iB->B()->getPoint2D().y());
+ printf("iA t2d %f p (%f, %f)\n", iA->t2d(), iA->getPoint2D().x(), iA->getPoint2D().y());
+ printf("iB t2d %f p (%f, %f)\n", iB->t2d(), iB->getPoint2D().x(), iB->getPoint2D().y());
+ cerr << "Fatal error in CurvePoint::CurvePoint(CurvePoint *iA, CurvePoint *iB, float t3)" << endl;
}
assert(__A != 0 && __B != 0);
More information about the Bf-blender-cvs
mailing list