|
|
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
|
|