POV-Ray : Newsgroups : povray.beta-test : "Known Bug" for Rune Server Time
12 Nov 2024 16:29:15 EST (-0500)
  "Known Bug" for Rune (Message 1 to 5 of 5)  
From: Tor Olav Kristensen
Subject: "Known Bug" for Rune
Date: 28 Sep 2001 17:35:20
Message: <3BB4ED11.8EC69CEC@hotmail.com>
The bug that lead to my bug report for v3.1g 
22. March 2000 to povray.bugreports with the title:
"Macros and Arrays in POV-Ray v3.1":

news://news.povray.org/38d9867f%40news.povray.org

- is still alive in v3.5.


Here's 3 sample scripts that will force this bug
to surface:



By Nigel Stewart:

#macro Macro1(A)
  #local B = A;
  B
#end

#macro Macro2(C)
  #local D = C;
  D
#end

#local Z = Macro1(Macro2(1.0));



By Tor Olav Kristensen:

#macro Dummy(NN)

  NN

#end


#declare M1 = array[2] { <1, 2>, <3, 4> }

#declare M3 = array[2]

#declare M3 = Dummy(M1)



By Ron Parker:

#macro Macro2(C)
  #local D = C;
  D
#end

#local Z =
Macro2(Macro2(Macro2(Macro2(Macro2(Macro2(Macro2(Macro2(5.0))))))));
  
#debug str(Z,5,5)  
#debug "\n"



A workaround for the macro in Ron's sample code is
to add a pair of parentheses around the returned
local variable. (Same solution for Nigel's code.)

Like this:

#macro Macro2(C)
  #local D = C;
  (D)
#end


For my example there's no known "straight forward"
workaround to make the macro return a local array
variable in a "safe" way.


Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: "Known Bug" for Rune
Date: 28 Sep 2001 17:42:56
Message: <3BB4EEDD.B1F08760@hotmail.com>
news://news.povray.org/Xns9113E864F7FAEseed7%40povray.org

Tor Olav Kristensen wrote:
> 
> The bug that lead to my bug report for v3.1g
> 22. March 2000 to povray.bugreports with the title:
> "Macros and Arrays in POV-Ray v3.1":
> 
> news://news.povray.org/38d9867f%40news.povray.org
> 
> - is still alive in v3.5.
>...


I forgot to mention that I suspect this to be the 
the bug/issue that Ingo refers to in his post;
"Known issues 3.5 beta 1" to this group at 5. Sept.:

news://news.povray.org/Xns9113E864F7FAEseed7%40povray.org

Here's the relevant line from that post:

** POV can dereference a deallocated pointer if you 
return a local from a macro



Tor Olav


Post a reply to this message

From: Tor Olav Kristensen
Subject: Re: "Known Bug" for Rune
Date: 28 Sep 2001 17:46:39
Message: <3BB4EFBB.E525C624@hotmail.com>
Tor Olav Kristensen wrote:
> 
> The bug that lead to my bug report for v3.1g
> 22. March 2000 to povray.bugreports with the title:
> "Macros and Arrays in POV-Ray v3.1":
> 
> news://news.povray.org/38d9867f%40news.povray.org
> 
> - is still alive in v3.5.
>...

I also forgot to mention that this bug
crashes POV-Ray Version 3.5.beta.4.msvc.win32.


Tor Olav


Post a reply to this message

From: Ron Parker
Subject: Re: "Known Bug" for Rune
Date: 28 Sep 2001 17:49:18
Message: <slrn9r9s31.6fn.ron.parker@fwi.com>
On Fri, 28 Sep 2001 23:42:53 +0200, Tor Olav Kristensen wrote:
>
>news://news.povray.org/Xns9113E864F7FAEseed7%40povray.org
>
>Tor Olav Kristensen wrote:
>> 
>> The bug that lead to my bug report for v3.1g
>> 22. March 2000 to povray.bugreports with the title:
>> "Macros and Arrays in POV-Ray v3.1":
>> 
>> news://news.povray.org/38d9867f%40news.povray.org
>> 
>> - is still alive in v3.5.
>>...
>
>
>I forgot to mention that I suspect this to be the 
>the bug/issue that Ingo refers to in his post;
>"Known issues 3.5 beta 1" to this group at 5. Sept.:

It is.  That's one of the few bugs that actually found its way into the
bug tracking system. :)

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

From: Rune
Subject: Re: "Known Bug" for Rune
Date: 28 Sep 2001 18:22:49
Message: <3bb4f839$1@news.povray.org>
Thanks for the report; I've added this to the list.

Rune


Post a reply to this message

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