POV-Ray : Newsgroups : povray.beta-test : Bugs with string/macro handling Server Time
2 Nov 2024 15:24:41 EDT (-0400)
  Bugs with string/macro handling (Message 1 to 5 of 5)  
From: Mark Wagner
Subject: Bugs with string/macro handling
Date: 5 Nov 2001 23:04:24
Message: <3be76148$1@news.povray.org>
While trying to code a binary search tree in POV-Ray for Windows, I've come
across a number of bugs in how POV-Ray handles strings and macros.  Scene
files are in beta-test.binaries

The "All errors.pov" scene file is the minimal scene file to produce the
sequence of errors listed in this message.  The "minimal.pov" file is the
minimal scene file to produce some of the listed behaviors.

First off, sorry about the size of the scene file.  It really is as minimal
as I can make it and still have it produce the full variety of errors.
Removing either of the unused "Remove" or "_BST_FREE" macros produces a
different sequence of errors; removing them both produces a still different
one.  Removing both the unused "Find" and "_Find" macros keeps the correct
behavior from appearing at all.  Re-writing the code to get rid of the "V"
parameter in the node definition, but keeping all of the macros, eliminates
all incorrect behavior.

Bug number one:  Open POV-Ray, and run the scene file.  It should give a
"Too many nested symbol tables" parse error while doing the inorder
traversal of the tree, but only on the first run after POV-Ray is launched.

The second run of the scene file will go properly, with the inorder
traversal of the BST printing out the string "BCFGHJKLMQSUVWXY"

The third run of the scene file will go almost properly, with the inorder
traversal of the BST printing out "BCFGHJKLMQSUVWWXY".  Note the two
occurrences of "W"

The fourth run of the scene file will be the first to produce serious
garbage: the string "BCFGHJKLMQWSUVBCFGHJKLMQWSUVWXY1WXBCFGHJKLMQWSUVWXY1Y"

The fifth run will produce an even longer string of nonsense.

The sixth run will produce a "Attempt to access uninitialized array element"
error.

Further runs of the scene file will produce one of the previous results.

POV-Ray 3.5.beta.7.icl.win32, Win98, AMD K6-II, 128MB RAM

--
Mark


Post a reply to this message

From:
Subject: Re: Bugs with string/macro handling
Date: 7 Nov 2001 10:43:08
Message: <08liutsfsj1g5plag4u6qb6h20ud1bacmn@4ax.com>
On Mon, 5 Nov 2001 22:35:05 -0500, "Mark Wagner" <mar### [at] gtenet> wrote:

> While trying to code a binary search tree in POV-Ray for Windows, I've come
> across a number of bugs in how POV-Ray handles strings and macros.  Scene
> files are in beta-test.binaries

POV 3.5 b7 on PII 233 128 MB with NT 4 Sp6

I have checked your scene yesterday and I can confirm it generates errors with
intel compile but every second render on vc compile works fine. Strange.
Moreover today I've created system of macros which also generate strange errors
with both compile (and even sometimes crash). For example I achived error
"Unknown Warp type 4016" while there is no warp in my script. Currently I'm
trying to find smallest scene to present problem. Why I attached my post to this
thread? Becouse we both use arrays to store structures.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Bugs with string/macro handling
Date: 7 Nov 2001 15:57:10
Message: <3be9a026@news.povray.org>
In article <3be76148$1@news.povray.org> , "Mark Wagner" 
<mar### [at] gtenet> wrote:

> While trying to code a binary search tree in POV-Ray for Windows, I've come
> across a number of bugs in how POV-Ray handles strings and macros.  Scene
> files are in beta-test.binaries
>
> The "All errors.pov" scene file is the minimal scene file to produce the
> sequence of errors listed in this message.  The "minimal.pov" file is the
> minimal scene file to produce some of the listed behaviors.

Are you by anyx chance returning a #local as a macro result somewhere?


____________________________________________________
Thorsten Froehlich, Duisburg, Germany
e-mail: tho### [at] trfde

Visit POV-Ray on the web: http://mac.povray.org


Post a reply to this message

From: Mark Wagner
Subject: Re: Bugs with string/macro handling
Date: 8 Nov 2001 01:09:33
Message: <3bea219d@news.povray.org>
Thorsten Froehlich wrote in message <3be9a026@news.povray.org>...
>In article <3be76148$1@news.povray.org> , "Mark Wagner"
><mar### [at] gtenet> wrote:
>
>> While trying to code a binary search tree in POV-Ray for Windows, I've
come
>> across a number of bugs in how POV-Ray handles strings and macros.  Scene
>> files are in beta-test.binaries
>>
>> The "All errors.pov" scene file is the minimal scene file to produce the
>> sequence of errors listed in this message.  The "minimal.pov" file is the
>> minimal scene file to produce some of the listed behaviors.
>
>Are you by anyx chance returning a #local as a macro result somewhere?


I've been very careful to avoid that.  The "return statements" are:
    concat(L, ";", R, ";", V, ";", D) /* Where L, R, V, and D are macro
parameters */
    (_BST_TEMP - 1) /* _BST_TEMP is a local */
    true
    false

None of these statements returns a #local directly.

--
Mark


Post a reply to this message

From:
Subject: Re: Bugs with string/macro handling
Date: 8 Nov 2001 05:48:58
Message: <3mokutg7ursr0a03f7ci0fk1mmo8984b7s@4ax.com>

wrote:
> Why I attached my post to this
> thread? Becouse we both use arrays to store structures.

After Thorsten's note about "returned #local" bug I removed my problem. So
perhaps you have different one.

ABX
--
#declare _=function(a,b,x){((a^2)+(b^2))^.5-x}#default {pigment{color rgb 1}}
union{plane{y,-3}plane{-x,-3}finish{reflection 1 ambient 0}}isosurface{ //ABX
function{_(x-2,y,1)|_((x+y)*.7,z,.1)|_((x+y+2)*.7,z,.1)|_(x/2+y*.8+1.5,z,.1)}
contained_by{box{<0,-3,-.1>,<3,0,.1>}}translate z*15finish{ambient 1}}//POV35


Post a reply to this message

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