POV-Ray : Newsgroups : povray.windows : Windows crash. : Re: Windows crash. Server Time
28 Sep 2024 11:00:39 EDT (-0400)
  Re: Windows crash.  
From: Ronald L  Parker
Date: 16 Apr 1999 00:25:16
Message: <3717a98c.4853660@news.povray.org>
On Thu, 15 Apr 1999 15:28:39 +0200, Spider <spi### [at] bahnhofse> wrote:

>hello. I was tinkering with the #default option in WinPov, as I stubled across
>this bug.
>I think it is related to the 
>#declare tDefault = texture {}
>....
>in the attached code, but I don't know for certain, so I include the whole pice.

The following two lines can reproduce the problem:

#default { texture {} }
box { 0 1 pigment {color rgb 1}}

It is indeed due to the default texture.  It's also not just a Windows
problem; it's in the core code.  The problem is that Post_Textures()
isn't getting called, so POV isn't detecting the fact that it just
created a texture full of null pointers.  If you tried to just say 

  object {foo texture{}}

POV would complain that there was a missing pigment; this is handled
by Post_Pigment, which is called by Post_Textures.  Anyway, to make
a long story short, I added a line to Parse_Default and it fixes the
problem, though there might still be other similar problems in some of
the other cases.  If all goes as planned, a copy of this post is being
sent to Chris Young, so you shouldn't have to worry about reporting
it.  Thorsten, you may want to pass it along anyway, just in case my
newsreader doesn't like me.

     CASE (TEXTURE_TOKEN)
       Local_Texture = Default_Texture;
       Parse_Begin ();
       Default_Texture = Parse_Texture();
+      Post_Textures( Default_Texture );
       Parse_End ();
       if (Default_Texture->Type != PLAIN_PATTERN)
	 Error("Default texture cannot be material map or tiles.");
       if (Default_Texture->Next != NULL)
	 Error("Default texture cannot be layered.");


Post a reply to this message

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