POV-Ray : Newsgroups : povray.beta-test : division-by-zero-crash? Server Time
30 Jul 2024 18:22:01 EDT (-0400)
  division-by-zero-crash? (Message 1 to 10 of 10)  
From: Lutz-Peter Hooge
Subject: division-by-zero-crash?
Date: 28 Sep 2001 14:16:53
Message: <MPG.161edd5f8ac5762898968e@news.povray.org>
Hi,

If using a function in a pigment like this

#declare f=function {1/x}
plane{z,0 inverse pigment{function{f(x,y,z)}}}

povray crashes after creating the preview window.
A problem with with the handling of div. by zero errors I guess.

3.5 beta 4, Win98SE

Lutz-Peter


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 14:36:49
Message: <3bb4c341@news.povray.org>
In article <MPG.161edd5f8ac5762898968e@news.povray.org> , Lutz-Peter Hooge
<lpv### [at] gmxde>  wrote:

> If using a function in a pigment like this
>
> #declare f=function {1/x}
> plane{z,0 inverse pigment{function{f(x,y,z)}}}
>
> povray crashes after creating the preview window.
> A problem with with the handling of div. by zero errors I guess.

Hmm, I get a proper "Floating-point exception detected in function 'f'. Your
function either attempted a division by zero, used a function outside its
domain or called an internal function with invalid parameters." message
using the "A typical camera" template together with your example.  Without a
set camera the scene runs through without any problems.


    Thorsten


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:10:40
Message: <MPG.161ee9f9c07838c998968f@news.povray.org>
In article <3bb4c341@news.povray.org>, tho### [at] trfde says...
> using the "A typical camera" template together with your example.  Without a
> set camera the scene runs through without any problems.

Ok, this is the complete "scene"

#version 3.5;
camera
{
	location <0,1,-4>
	look_at <0,0,0>
}
#declare f=function {1/x}
plane{z,0 inverse pigment{function{f(x,y,z)}}}


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:15:04
Message: <3bb4cc38@news.povray.org>
In article <MPG.161ee9f9c07838c998968f@news.povray.org> , Lutz-Peter Hooge
<lpv### [at] gmxde>  wrote:

> #version 3.5;
> camera
> {
>  location <0,1,-4>
>  look_at <0,0,0>
> }
> #declare f=function {1/x}
> plane{z,0 inverse pigment{function{f(x,y,z)}}}

Still getting an error message and no crash.

    Thorsten


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:17:53
Message: <MPG.161eebabeda1c72f989690@news.povray.org>
In article <3bb4cc38@news.povray.org>, tho### [at] trfde says...

> Still getting an error message and no crash.

Strange... over here it happens every time. I also restartet windows and 
tried again.


Post a reply to this message

From: Ron Parker
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:20:13
Message: <slrn9r9jbf.639.ron.parker@fwi.com>
On Fri, 28 Sep 2001 15:14:56 -0400, Thorsten Froehlich wrote:
>In article <MPG.161ee9f9c07838c998968f@news.povray.org> , Lutz-Peter Hooge
><lpv### [at] gmxde>  wrote:
>
>> #version 3.5;
>> camera
>> {
>>  location <0,1,-4>
>>  look_at <0,0,0>
>> }
>> #declare f=function {1/x}
>> plane{z,0 inverse pigment{function{f(x,y,z)}}}
>
>Still getting an error message and no crash.

I get a crash here, on Linux:

Creating bounding slabs.
Scene contains 1 frame level objects; 1 infinite.

File: div0.pov  Line: 7
Fatal Error: Floating-point exception detected in function 'f'. Your function ei
ther attempted a division by zero, used a function outside its domain or called
an internal function with invalid parameters.

Possible Rendering Error: libpng: No IDATs written into file

Possible Rendering Error: Cannot write PNG file.

Segmentation fault

-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

From: Ron Parker
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:23:53
Message: <slrn9r9jic.639.ron.parker@fwi.com>
On 28 Sep 2001 15:20:13 -0400, Ron Parker wrote:
>On Fri, 28 Sep 2001 15:14:56 -0400, Thorsten Froehlich wrote:
>>In article <MPG.161ee9f9c07838c998968f@news.povray.org> , Lutz-Peter Hooge
>><lpv### [at] gmxde>  wrote:
>>
>>> #version 3.5;
>>> camera
>>> {
>>>  location <0,1,-4>
>>>  look_at <0,0,0>
>>> }
>>> #declare f=function {1/x}
>>> plane{z,0 inverse pigment{function{f(x,y,z)}}}
>>
>>Still getting an error message and no crash.
>
>I get a crash here, on Linux:

More details.  I don't have time to track this one down right now, but 
hopefully this stack trace will help.  I have a +fn in my default INI
file; it would help to know what parameters Lutz is rendering with.

#0  0x80bc1fd in PNG_Image::~PNG_Image (this=0x8174ac0, __in_chrg=3)
    at png_pov.cpp:816
#1  0x80cab10 in close_all () at povray.cpp:1885
#2  0x80c93b3 in povray_terminate () at povray.cpp:498
#3  0x80c9401 in povray_exit (i=1) at povray.cpp:543
#4  0x80f53b8 in ErrorAt (filename=0x8177598 "div0.pov", line=7,
    format=0x8117f20 "Floating-point exception detected in function '%s'. Your f
unction either attempted a division by zero, used a function outside its domain
or called an internal function with invalid parameters.") at userio.cpp:419
#5  0x806af4e in POVFPU_Exception (fn=0) at fnpovfpu.cpp:1062
#6  0x806ebc2 in POVFPU_RunDefault (fn=1) at fnpovfpu.cpp:1276
#7  0x80b25c8 in function_pattern (EPoint=0xbffff030, TPat=0x8177928)
    at pattern.cpp:1623
#8  0x80af5a7 in Evaluate_TPat (TPat=0x8177928, EPoint=0xbffff030,
    Intersection=0xbffff928) at pattern.cpp:202
#9  0x80ba413 in Compute_Pigment (Colour=0xbffff630, Pigment=0x8177928,
    EPoint=0xbffff7d0, Intersection=0xbffff928) at pigment.cpp:538
#10 0x8084d74 in compute_lighted_texture (ResCol=0xbffff804,
    Texture=0x8177878, IPoint=0xbffff7d0, Raw_Normal=0xbffff7e8,
    Ray=0x814b320, Weight=1, Intersection=0xbffff928) at lighting.cpp:3857
#11 0x8084872 in do_texture_map (Result_Colour=0xbffff804, Texture=0x8177878,
    IPoint=0xbffff7d0, Raw_Normal=0xbffff7e8, Ray=0x814b320, Weight=1,
    Ray_Intersection=0xbffff928, Shadow_Flag=0) at lighting.cpp:3617
#12 0x807f557 in Determine_Apparent_Colour (Ray_Intersection=0xbffff928,
    Colour=0x81bbc30, Ray=0x814b320, Weight=1) at lighting.cpp:600
#13 0x80d5b92 in Trace (Ray=0x814b320, Colour=0x81bbc30, Weight=1)
    at render.cpp:1903
#14 0x80d6f12 in trace_pixel (x=160, y=0, Colour=0x81bbc30) at render.cpp:2835
#15 0x80d4fc2 in Start_Non_Adaptive_Tracing () at render.cpp:1391
#16 0x80c9a65 in FrameRender () at povray.cpp:993
#17 0x80c9503 in FrameLoop () at povray.cpp:723
#18 0x80c9378 in povray_render (argc=3, argv=0x81698e8) at povray.cpp:455
#19 0x80c90bd in main (argc=3, argv=0xbffffc74) at povray.cpp:246
#20 0x4016db0f in __libc_start_main ()


-- 
#local R=<7084844682857967,0787982,826975826580>;#macro L(P)concat(#while(P)chr(
mod(P,100)),#local P=P/100;#end"")#end background{rgb 1}text{ttf L(R.x)L(R.y)0,0
translate<-.8,0,-1>}text{ttf L(R.x)L(R.z)0,0translate<-1.6,-.75,-1>}sphere{z/9e3
4/26/2001finish{reflection 1}}//ron.parker@povray.org My opinions, nobody else's


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:25:42
Message: <MPG.161eed77fc317236989691@news.povray.org>
In article <3bb4cc38@news.povray.org>, tho### [at] trfde says...
> Still getting an error message and no crash.

When rendering it maximises the preview windows (dond't know why), then 
it gives an "invalid page fault" (hope this is the correct translation, 
german Windows version).
I cust discovered the POV GUI itself is still functional until I close 
the error message.

So I could minimize the preview window and look at what Pov itself says:

--snip

Scene contains 1 frame level objects; 1 infinite.

File: C:\Eigene Dateien\test.pov  Line: 6
Fatal Error: Floating-point exception detected in function 'f'. Your 
function either attempted a division by zero, used a function outside its 
domain or called an internal function with invalid parameters.


Returned from renderer with error status
Possible Rendering Error: libpng: No IDATs written into file
Possible Rendering Error: Cannot write PNG file.
--snap-

Lutz-Peter


Post a reply to this message

From: Lutz-Peter Hooge
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:29:03
Message: <MPG.161eee4ab937df8c989692@news.povray.org>
In article <slr### [at] fwicom>, ron### [at] povrayorg 
says...

> More details.  I don't have time to track this one down right now, but 
> hopefully this stack trace will help.  I have a +fn in my default INI
> file; it would help to know what parameters Lutz is rendering with.

I had +fn in the command line too. Sorry I forgot to mention this.

AH!, when I remove it (reners to .bmp then), it doesn't crash


Post a reply to this message

From: Christoph Hormann
Subject: Re: division-by-zero-crash?
Date: 28 Sep 2001 15:29:51
Message: <3BB4D081.8E222799@gmx.de>
Lutz-Peter Hooge wrote:
> 
> In article <3bb4cc38@news.povray.org>, tho### [at] trfde says...
> > Still getting an error message and no crash.
> 
> When rendering it maximises the preview windows (dond't know why), then
> it gives an "invalid page fault" (hope this is the correct translation,
> german Windows version).
> I cust discovered the POV GUI itself is still functional until I close
> the error message.
> 
> So I could minimize the preview window and look at what Pov itself says:
> 
> [...]

Ok, i think i have it, crash only with png output here (WinNT, beta 4).  

Christoph

-- 
Christoph Hormann <chr### [at] gmxde>
IsoWood include, radiosity tutorial, TransSkin and other 
things on: http://www.schunter.etc.tu-bs.de/~chris/


Post a reply to this message

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