POV-Ray : Newsgroups : povray.beta-test : Bugs with string/macro handling : Bugs with string/macro handling Server Time
30 Jul 2024 12:33:09 EDT (-0400)
  Bugs with string/macro handling  
From: Mark Wagner
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

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