POV-Ray : Newsgroups : povray.general : Strange bug Server Time
29 Nov 2024 17:47:02 EST (-0500)
  Strange bug (Message 1 to 5 of 5)  
From: Nicolas Alvarez
Subject: Strange bug
Date: 14 Jul 2005 16:10:52
Message: <42d6c6cc@news.povray.org>
I was working in a scene and I got the following message when I tried to
render:

The POV-Ray core rendering code threw an unhandled exception.
The backend thread has been shut down and you will not be able to perform
any further renders.
It is STRONGLY RECOMMENDED that you save your work and exit POV-Ray now.
Note that if internal structures have been damaged POV-Ray may crash
immediately after you click OK).

Then I noticed that I had mispelled a variable name. I corrected it,
restarted POV-Ray, and the scene rendered normally.

But I expect to get parse errors instead of crashes :)

It took me like half an hour to work out the cause in my 430 lines code and
get the scene minimal!

//begin crash scene
#include "transforms.inc"
#declare Obj=sphere
{
    0,1
    Shear_Trans(x,-z,y)
}
#if(UndeclaredId)
    #declare DoSomething=123;
#end
//end crash scene

If I comment out Shear_Trans I get the expected behaviour:
Parse Error: Expected 'numeric expression', undeclared identifier
'UndeclaredId' found instead

In summary, it seems like undeclared identifiers hang povray if there is a
Shear_Trans before :S (maybe just any matrix transform, I didn't try)

I'd like to see if you get the same crash so that I can report the bug. 
Remember to include your system specs in the message.

POV-Ray 3.6.1a.icl8.win32
Windows XP Professional (SP2)
Pentium IV 3 GHz
512MB Ram
120GB hard disk


Post a reply to this message

From: Vincent LE CHEVALIER
Subject: Re: Strange bug
Date: 15 Jul 2005 10:39:44
Message: <42d7cab0@news.povray.org>
Nicolas Alvarez wrote:
> I was working in a scene and I got the following message when I tried to
> render:
<snip>
> 
> In summary, it seems like undeclared identifiers hang povray if there is a
> Shear_Trans before :S (maybe just any matrix transform, I didn't try)
> 

Well I tried to reduce the scene still more and it seems that the 
content of the macro doesn't really matter...
Here is the minimal scene I've got :

//begin crash.inc
#macro Trans() #end
//end crash.inc

//begin crash.pov
//including the file makes POV-Ray crash
#include "crash.inc"

//if the content of crash.inc is included inline, normal behaviour:
//#macro Trans() #end

Trans()

#if(UndeclaredId) #end
//end crash.pov

Seems that it has to do with the parsing of macros in includes...

Here is the output I have in Debian Linux, kernel 2.6.11.6, 256 MB RAM, 
Pentium M 1.5 GHz :

Persistence of Vision(tm) Ray Tracer Version 3.6.1 (g++ 3.4.1 @
  i686-pc-linux-gnu)
This is an official version prepared by the POV-Ray Team. See the
  documentation on how to contact the authors or visit us on the
  internet at http://www.povray.org/.
POV-Ray is based on DKBTrace 2.12 by David K. Buck & Aaron A. Collins
Copyright 1991-2003 Persistence of Vision Team
Copyright 2003-2004 Persistence of Vision Raytracer Pty. Ltd.

Primary POV-Ray 3.5/3.6 Developers: (Alphabetically)
   Chris Cason         Thorsten Froehlich  Nathan Kopp         Ron 
Parker

Contributing Authors: (Alphabetically)
   Steve Anger         Eric Barish         Dieter Bayer        Steve A. 
Bennett
   David K. Buck       Nicolas Calimet     Aaron A. Collins    Chris 
Dailey
   Steve Demlow        Andreas Dilger      Alexander Enzmann   Dan 
Farmer
   Mark Gordon         Christoph Hormann   Mike Hough          Chris 
Huff
   Kari Kivisalo       Lutz Kretzschmar    Jochen Lippert      Pascal 
Massimino
   Jim McElhiney       Douglas Muir        Juha Nieminen       Bill 
Pulver
   Eduard Schwan       Wlodzimierz Skiba   Robert Skinner      Yvo 
Smellenbergh
   Zsolt Szalavari     Scott Taylor        Massimo Valentini   Timothy 
Wegner
   Drew Wells          Chris Young

Other contributors are listed in the documentation.

Support libraries used by POV-Ray:
   ZLib 1.2.1, Copyright 1995-1998 Jean-loup Gailly and Mark Adler
   LibPNG 1.2.5, Copyright 1998-2002 Glenn Randers-Pehrson
   LibJPEG 6b, Copyright 1998 Thomas G. Lane
   LibTIFF 3.6.1, Copyright 1988-1997 Sam Leffler, 1991-1997 SGI
zsh: segmentation fault  povray crash.pov

Hope this will help...

-- 
Vincent


Post a reply to this message

From: Nicolas Alvarez
Subject: Re: Strange bug
Date: 17 Jul 2005 20:07:11
Message: <42daf2af@news.povray.org>
The bug is still odd.

And it seems like it's not platform specific, because your linux maaged to 
crash too :D

Can someone check if he can find the cause in the pov sources? I can't 
compile POV-Ray with my Dev-C++ IDE (gcc compiler). (And i'm not very 
interested in doing it anyways :)


Post a reply to this message

From: Vincent LE CHEVALIER
Subject: Re: Strange bug
Date: 18 Jul 2005 04:31:18
Message: <42db68d6@news.povray.org>
Nicolas Alvarez wrote:
> The bug is still odd.
> 
> And it seems like it's not platform specific, because your linux maaged to 
> crash too :D
> 
> Can someone check if he can find the cause in the pov sources? I can't 
> compile POV-Ray with my Dev-C++ IDE (gcc compiler). (And i'm not very 
> interested in doing it anyways :)
> 
> 
Now what is really strange is that after rebooting under Windows, I 
tried both your minimal scene and the one I proposed, and couldn't get a 
crash...
After giving a deeper look, I realized that I have in fact the version 
3.6.0.icl8.win32. So it looks like it's some change between 3.6.0 and 
3.6.1 that causes this behaviour.

I fear I can't help much with the source either though ;-)

-- 
Vincent


Post a reply to this message

From: Nicolas Calimet
Subject: Re: Strange bug
Date: 18 Jul 2005 09:18:49
Message: <42dbac39$1@news.povray.org>
Thanks for reporting.

	I can confirm there is a crash with 3.6.1 under linux with the minimal
scene that you derived.  The scene indeed doesn't crash in the alternate case
(i.e. without using the #include directive).
	The crash is a bit tough to trace back with the tools I have at hand,
so I haven't find the fix so far.  Yet the problem seems definitely cross-
platform.  I have a tiny idea where it can lie.

 > So it looks like it's some change between 3.6.0 and
 > 3.6.1 that causes this behaviour.

	Thanks, that should help a lot.  Gonna try 3.6.0 out too.

	- NC


Post a reply to this message

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