POV-Ray : Newsgroups : povray.beta-test : splinefollow : Re: splinefollow Server Time
25 Apr 2024 17:26:19 EDT (-0400)
  Re: splinefollow  
From: Le Forgeron
Date: 27 Feb 2016 09:11:07
Message: <56d1ae7b@news.povray.org>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

Le 27/02/2016 14:55, clipka a écrit :
> Am 27.02.2016 um 14:04 schrieb Le_Forgeron:
> 
>> traced to se.resize()
>> 
>> void mkfree(GenericSpline * sp, SplineEntryList::size_type i) { 
>> SplineEntryList::size_type j; SplineEntryList& se =
>> sp->SplineEntries;
>> 
>> se.resize(se.size()+1); for (j=sp->SplineEntries.size()-1; j>i;
>> j--) se[j] = se[j-1]; }
>> 
>> But it might be due to a previous memory corruption because the 
>> segfault is due to malloc.c, a code that is safe as long as
>> memory is not corrupted.
> 
> `se.resize()` is `std::vector::resize()`, so yes, I guess we can
> safely presume that the error is somewhere else ;)
> 
Yes... And in fact, I already encountered that problem on my master
branch (which try to follow the official master... when I have time to
follow)

The problem is in Insert_Spline_Entry, the condition try to handle too
much and fails.

I rewrote it

https://bitbucket.org/LeForgeron/povray/src/8813d261f3c529cb734c0f5697b86e9dbf916966/source/backend/math/splines.cpp?at=default&fileviewer=file-view-default

>
https://bitbucket.org/LeForgeron/povray/src/8813d261f3c529cb734c0f5697b86e9dbf916966/source/backend/math/splines.cpp?at=default&fileviewer=file-view-default
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iJwEAQEIAAYFAlbRrnoACgkQhKAm8mTpkW2JwAP/cMQfYj7+N/rsONb1pADU3g3J
jW7hVB0agTuWk5+A2JXTPRLQY8gB4Ib34uGyou5Nu8kU55+H1ezcobmPYsmPKDUx
SngVsUesaDpeiSLYNXuemkSEr/Yo8LfZ73GhZEzqvpL/fPxunXN+KHnnQZz69NlE
cz9jRSt43BUAqSFySEQ=
=WTV+
-----END PGP SIGNATURE-----


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.