POV-Ray : Newsgroups : povray.beta-test : splinefollow Server Time
23 Apr 2024 21:21:38 EDT (-0400)
  splinefollow (Message 11 to 20 of 20)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: clipka
Subject: Re: splinefollow
Date: 27 Feb 2016 09:45:40
Message: <56d1b694$1@news.povray.org>
Am 27.02.2016 um 14:04 schrieb Le_Forgeron:

> No such problem on stable branch, and not yet either on my two branches.
> So, it's new, it's fresh... (less than a year old)

Strangely enough, the offending code has been around ever since we put
POV-Ray on GitHub, i.e. it is also in the stable branch.


Post a reply to this message

From: clipka
Subject: Re: splinefollow
Date: 27 Feb 2016 09:58:21
Message: <56d1b98d$1@news.povray.org>
Am 27.02.2016 um 15:23 schrieb Le_Forgeron:
> If it can help, it's already in github
> 
> https://github.com/LeForgeron/povray/commit/489e2eaf8e655eacdf102b6d5961
> 3f0f725584b8
> 
>> https://github.com/LeForgeron/povray/commit/489e2eaf8e655eacdf102b6d59
> 613f0f725584b8
> 
> But
> 
> I do not know how to create a pull request for a single commit..
> Just do it if you can.

Actually your solution, too, still has a bug: If the last entry of the
spline is to be replaced, replacement is done on [i] when it should be
on [i-1].


Post a reply to this message

From: Le Forgeron
Subject: Re: splinefollow
Date: 27 Feb 2016 10:27:58
Message: <56d1c07e$1@news.povray.org>
Le 27/02/2016 15:58, clipka a écrit :
> Am 27.02.2016 um 15:23 schrieb Le_Forgeron:
>> If it can help, it's already in github
>>
>> https://github.com/LeForgeron/povray/commit/489e2eaf8e655eacdf102b6d5961
>> 3f0f725584b8
>>
>>> https://github.com/LeForgeron/povray/commit/489e2eaf8e655eacdf102b6d59
>> 613f0f725584b8
>>
>> But
>>
>> I do not know how to create a pull request for a single commit..
>> Just do it if you can.
> 
> Actually your solution, too, still has a bug: If the last entry of the
> spline is to be replaced, replacement is done on [i] when it should be
> on [i-1].
> 

I think that I just tried to "uncompress" the original condition (of
four tests) to avoid the problem.

And you are correct, the branch i==splineSize ... replace=true should
also reduce the value of i !

Nicely spotted.


Post a reply to this message

From: clipka
Subject: Re: splinefollow
Date: 27 Feb 2016 10:28:27
Message: <56d1c09b$1@news.povray.org>
Am 27.02.2016 um 10:42 schrieb ThH:
> could some kind soul please check this...
> 
> Trying scenes/animation/splinefollow.pov I got this:
> 
> thh@quadro:~/POV_Master/share/povray-3.7/scenes/animations/splinefollow$
> povray splinefollow.pov +p +w320 +h240
> Persistence of Vision(tm) Ray Tracer Version
> 3.7.1-alpha.8492620.unofficial (g++
>  4.9.2 @ x86_64-unknown-linux-gnu)
> This is an unofficial version compiled by:
>  ThH <no.spam@address>
>  The POV-Ray Team is not responsible for supporting this version.
> 
> 8< snip >8
> 
> ==== [Parsing...]
> ==========================================================
> Speicherzugriffsfehler

Please try the source code now available at
https://github.com/POV-Ray/povray (still waiting for the Windows builds
to complete, so it's not available in the Releases section yet).


Post a reply to this message

From: Le Forgeron
Subject: Re: splinefollow
Date: 27 Feb 2016 10:45:22
Message: <56d1c492@news.povray.org>
> Please try the source code now available at
> https://github.com/POV-Ray/povray (still waiting for the Windows builds
> to complete, so it's not available in the Releases section yet).
> 
Gitid: 832d5713976c6f883c8242035b9694c262b07fc5

still crashing... do not try to be smart, if spline is not empty, and i
is size, but last entry is not the new index, you take the else
branch... and access out of bound to compute replace.

+    if (!sp->SplineEntries.empty())
+    {
+        if (i == sp->SplineEntries.size() &&
(sp->SplineEntries[i-1].par == p))
+        {
+            --i;
+            replace = true;
+        }
+        else
+            replace = (sp->SplineEntries[i].par == p);
+    }

I unrolled the code... there was a reason.


Post a reply to this message

From: ThH
Subject: Re: splinefollow
Date: 27 Feb 2016 11:01:44
Message: <56d1c868@news.povray.org>
Am 27.02.2016 um 16:45 schrieb Le_Forgeron:

> still crashing...

Same here.

do not try to be smart, if spline is not empty, and i
> is size, but last entry is not the new index, you take the else
> branch... and access out of bound to compute replace.
>
> +    if (!sp->SplineEntries.empty())
> +    {
> +        if (i == sp->SplineEntries.size() &&
> (sp->SplineEntries[i-1].par == p))
> +        {
> +            --i;
> +            replace = true;
> +        }
> +        else
> +            replace = (sp->SplineEntries[i].par == p);
> +    }
>
> I unrolled the code... there was a reason.


Post a reply to this message

From: clipka
Subject: Re: splinefollow
Date: 27 Feb 2016 11:24:07
Message: <56d1cda7$1@news.povray.org>
Am 27.02.2016 um 17:02 schrieb ThH:
> Am 27.02.2016 um 16:45 schrieb Le_Forgeron:
> 
>> still crashing...
> 
> Same here.

Please try again with the newest stuff.


Post a reply to this message

From: Le Forgeron
Subject: Re: splinefollow
Date: 27 Feb 2016 11:56:41
Message: <56d1d549$1@news.povray.org>
Le 27/02/2016 17:24, clipka a écrit :
> Am 27.02.2016 um 17:02 schrieb ThH:
>> Am 27.02.2016 um 16:45 schrieb Le_Forgeron:
>>
>>> still crashing...
>>
>> Same here.
> 
> Please try again with the newest stuff.
> 

works better with POV-Ray 3.7.1-alpha.8498421.unofficial

Gitid: 6211eee2626b8ebc0b2a3364798c2c0be5fcf57c

no more crash for splinefollow


Post a reply to this message

From: ThH
Subject: Re: splinefollow
Date: 27 Feb 2016 12:02:39
Message: <56d1d6af$1@news.povray.org>
Am 27.02.2016 um 17:56 schrieb Le_Forgeron:
> Le 27/02/2016 17:24, clipka a écrit :
>> Am 27.02.2016 um 17:02 schrieb ThH:
>>> Am 27.02.2016 um 16:45 schrieb Le_Forgeron:
>>>
>>>> still crashing...
>>>
>>> Same here.
>>
>> Please try again with the newest stuff.
>>
>
> works better with POV-Ray 3.7.1-alpha.8498421.unofficial
>
> Gitid: 6211eee2626b8ebc0b2a3364798c2c0be5fcf57c
>
> no more crash for splinefollow
>

Same here. Fine :))


Post a reply to this message

From: Sven Littkowski
Subject: Re: splinefollow
Date: 27 Feb 2016 19:07:24
Message: <56d23a3c@news.povray.org>
Damn, did we just discover again a bug here, CLIPKA? :-D
Ts, ts, ts...



On 27.02.2016 04:42, ThH wrote:
> could some kind soul please check this...
> 
> Trying scenes/animation/splinefollow.pov I got this:
> 
> thh@quadro:~/POV_Master/share/povray-3.7/scenes/animations/splinefollow$
> povray splinefollow.pov +p +w320 +h240
> Persistence of Vision(tm) Ray Tracer Version
> 3.7.1-alpha.8492620.unofficial (g++
>  4.9.2 @ x86_64-unknown-linux-gnu)
> This is an unofficial version compiled by:
>  ThH <no.spam@address>
>  The POV-Ray Team is not responsible for supporting this version.
> 
> 8< snip >8
> 
> ==== [Parsing...]
> ==========================================================
> Speicherzugriffsfehler
>


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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