POV-Ray : Newsgroups : povray.bugreports : Syntax Bug Report Server Time
22 Dec 2024 14:32:08 EST (-0500)
  Syntax Bug Report (Message 1 to 2 of 2)  
From: Ken
Subject: Syntax Bug Report
Date: 19 Aug 1999 06:49:21
Message: <37BBE12F.E15E9101@pacbell.net>
The following causes an invalid page fault in Povray for windows versions
v3.1r1.watcom, v3.1a, and v3.1g.watcom. The same code in Pov v3.01.watcom
issues an error message that no closing quotes are present at the end of the
include statement. I also got confirmation that Pov v3.1 for the SunOS compile
similarly produces an error message instead of an invalid page fault or a
system crash so it appears to be a windows version related problem.


/*** Start of code ***/

#include "colors.inc"
#include "textures.inc'

/*** End of code ***/


Povray for windows v3.1g 
pentium 200 mmx
128 megs edo ram
Win 98 OS


-- 
Ken Tyler


Post a reply to this message

From: Ron Parker
Subject: Re: Syntax Bug Report
Date: 19 Aug 1999 10:05:46
Message: <37bc0f3a@news.povray.org>
On Thu, 19 Aug 1999 03:49:19 -0700, Ken wrote:
>
>  The following causes an invalid page fault in Povray for windows versions
>v3.1r1.watcom, v3.1a, and v3.1g.watcom. The same code in Pov v3.01.watcom
>issues an error message that no closing quotes are present at the end of the
>include statement. I also got confirmation that Pov v3.1 for the SunOS compile
>similarly produces an error message instead of an invalid page fault or a
>system crash so it appears to be a windows version related problem.
>
>
>/*** Start of code ***/
>
>#include "colors.inc"
>#include "textures.inc'
>
>/*** End of code ***/


Believe it or not, it's a core problem, but it would be slightly dependent 
on the behavior of the memory management on different compilers or operating
systems.  

For the technically minded, there's a function called Open_Include in 
tokenize.c.  It currently reads like this:

   Include_File_Index++;

   if (Include_File_Index >= MAX_INCLUDE_FILES)
   {
     Include_File_Index--;
     Error ("Too many nested include files.\n");
   }

   temp = Parse_String();


If parsing the string fails, it executes the error routine.  Unfortunately,
that causes POV to try to free all the include file names.  But the last
index hasn't been filled with a name yet.  I fixed this by moving the
Parse_String before the increment, like so:

   temp = Parse_String();

   Include_File_Index++;

   if (Include_File_Index >= MAX_INCLUDE_FILES)
   {
     Include_File_Index--;
     Error ("Too many nested include files.\n");
   }


Post a reply to this message

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