POV-Ray : Newsgroups : povray.programming : Re: Full CRASH!!! BUG!!! Server Time
28 Jun 2024 02:11:42 EDT (-0400)
  Re: Full CRASH!!! BUG!!! (Message 1 to 4 of 4)  
From: Wolfgang Wieser
Subject: Re: Full CRASH!!! BUG!!!
Date: 8 Jun 2004 15:01:37
Message: <40c60d10@news.povray.org>
Thorsten Froehlich wrote:

> In article <40c304ac@news.povray.org> , "IkA" <ixis.yandex.ru> wrote:
> 
>> A code:
> 
> What is this about???
> 
It took me one second to see that this is a bug report. So people like 
Thorsten should figure out in approximately 0.1 seconds :)

The crash is in
  void Post_Tnormal (TNORMAL *Tnormal)  (normal.cpp): 

          case NORMAL_TYPE:
-->         Map->Blend_Map_Entries[i].Vals.Tnormal->Flags |= 
              (Tnormal->Flags & DONT_SCALE_BUMPS_FLAG);

  with i=2, Map->Number_Of_Entries=3 and ...Tnormal=NULL. 

The problem probably begins in express.cpp, Parse_Blend_List(), near 
the end (line 2680): 

        case NORMAL_TYPE:
          Temp_Ent[i].Vals.Tnormal=Copy_Tnormal(Default_Texture->Tnormal);
          break;
    
Copy_Tnormal will return NULL because Default_Texture->Tnormal is NULL. 
Then, in Post_Tnormal it's a classical NULL pointer deref. 

Using if(Map->Blend_Map_Entries[i].Vals.Tnormal!=NULL) in the 
case NORMAL_TYPE in Post_Tnormal() will make the test scene trace 
successfully but I doubt that this is a good solution. 

Instead, using 

        case NORMAL_TYPE:
          Temp_Ent[i].Vals.Tnormal=Copy_Tnormal(Default_Texture->Tnormal);
-->       if(!Temp_Ent[i].Vals.Tnormal)  Count=i;
          break;

in Parse_Blend_List(), will also make the crash go away. This, however, 
means that Parse_Blend_List() no longer guarantees that the number 
of entries is equal to the Count argument. 

Just my 10 minute bug analysis (so no warranty for anything)...
Somebody with a bit more clue about that portion of the code should have 
a look at this. 

Cheers,
Wolfgang


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Full CRASH!!! BUG!!!
Date: 8 Jun 2004 18:29:21
Message: <40c63dc1$1@news.povray.org>
In article <40c60d10@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>  
wrote:

>> What is this about???
>>
> It took me one second to see that this is a bug report.

In p.b.i???  With no further information whatsoever included?  Could just be
the scene does not render as expected, or a million other things.  We have
bug reporting guidelines for a reason...

    Thorsten

____________________________________________________
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: Wolfgang Wieser
Subject: Re: Full CRASH!!! BUG!!!
Date: 10 Jun 2004 05:54:55
Message: <40c82fee@news.povray.org>
Thorsten Froehlich wrote:

> In article <40c60d10@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>
> wrote:
> 
>>> What is this about???
>>>
>> It took me one second to see that this is a bug report.
> 
> In p.b.i???  With no further information whatsoever included?  Could just
> be
> the scene does not render as expected, or a million other things.  We have
> bug reporting guidelines for a reason...
> 
I did not say that this was a shining example of a bug report. 
But never underestimate the power of the... subject line ;)

Wolfgang


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: Full CRASH!!! BUG!!!
Date: 10 Jun 2004 14:16:06
Message: <40c8a566$1@news.povray.org>
In article <40c82fee@news.povray.org> , Wolfgang Wieser <wwi### [at] gmxde>  
wrote:

> I did not say that this was a shining example of a bug report.
> But never underestimate the power of the... subject line ;)

And the incorrect information in it - remember that many users report
POV-Ray error messages as "crash" <sigh>

    Thorsten

____________________________________________________
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

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