POV-Ray : Newsgroups : povray.beta-test : crash inside two #while Server Time
30 Jul 2024 06:18:37 EDT (-0400)
  crash inside two #while (Message 1 to 7 of 7)  
From: Gleb
Subject: crash inside two #while
Date: 11 Jan 2002 12:21:45
Message: <3c3f1f29$1@news.povray.org>
This simplified code causes a stable crash (POV 3.5 b9 PIII-1000 512 Mb
Win2000):
It's OK if one of #while blocks or sphere is removed.
//-------8<----------
#declare n=1;
#declare i=-1;
#while(i<=n)
  #declare j=-1;
  #while(j<=n)
    #declare tt=((-0.1)^(0.1));
    sphere{<0,0,tt> 1 }
    #declare j=j+1;
  #end
  #declare i=i+1;
#end
//-------8<----------

gleb


Post a reply to this message

From:
Subject: Re: crash inside two #while
Date: 11 Jan 2002 12:30:35
Message: <r58u3usv9lpmh92phvar6sj5sd4rbtampu@4ax.com>
On Fri, 11 Jan 2002 17:21:45 -0000, "Gleb" <gk1### [at] sotonacuk> wrote:

> This simplified code causes a stable crash (POV 3.5 b9 PIII-1000 512 Mb
> Win2000):
> It's OK if one of #while blocks or sphere is removed.

I can't confirm. Works properly on my machine.

POV 3.5 b 9.icl on PII 233 128 MB with NT 4 Sp 6

ABX


Post a reply to this message

From: Tom Melly
Subject: Re: crash inside two #while
Date: 11 Jan 2002 12:42:18
Message: <3c3f23fa$1@news.povray.org>
"Gleb" <gk1### [at] sotonacuk> wrote in message news:3c3f1f29$1@news.povray.org...
> This simplified code causes a stable crash (POV 3.5 b9 PIII-1000 512 Mb
> Win2000):

Crashes for me too (after 99% of render). 3.5 beta9.icl.win32  p3 733 W2K

Here's an oddity. The modified code below outputs this to #debug:

-1.#J
-1.#J
-1.#J
-1.#J
-1.#J
-1.#J
-1.#J
-1.#J
-1.#J

Huh?

Here's the modified code

#declare n=1;
#declare i=-1;
#while(i<=n)
  #declare j=-1;
  #while(j<=n)
    #declare tt=((-0.1)^(0.1));
    #debug concat(str(tt,2,2),"\n")
    //sphere{<0,0,0> 1 }
    #declare j=j+1;
  #end
  #declare i=i+1;
#end

(no crash with sphere commented out).

Thinking about it, aren't you trying to find the root of a negative number here?


Post a reply to this message

From: Mike Williams
Subject: Re: crash inside two #while
Date: 11 Jan 2002 14:48:49
Message: <5fppYDATF0P8EwXi@econym.demon.co.uk>
Wasn't it Tom Melly who wrote:
>Here's an oddity. The modified code below outputs this to #debug:
>
>-1.#J
>-1.#J
>-1.#J
>-1.#J
>-1.#J
>-1.#J
>-1.#J
>-1.#J
>-1.#J
>
>Huh?

I think it's trying to say "-1.#IND", indicating an invalid number.
Because you only allowed it to display 2 places of decimals, it has
rounded up the "I" to "J". In the same way, if you allow 1 or 3 places
of decimals it will round the "#" up to "$" or the "N" up to "O"
respectively.

-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Tom Melly
Subject: Re: crash inside two #while
Date: 11 Jan 2002 16:10:18
Message: <3c3f54ba@news.povray.org>
"Mike Williams" <mik### [at] nospamplease> wrote in message
news:5fp### [at] econymdemoncouk...

> I think it's trying to say "-1.#IND", indicating an invalid number.

<snip>

Wow! Thanks Sherlock. YNYHBUCTL when the idea of rounding ind to j seems
aesthetically pleasing....

Presumably that's the -0.1^0.1 ?


Post a reply to this message

From: Slime
Subject: Re: crash inside two #while
Date: 11 Jan 2002 16:16:20
Message: <3c3f5624@news.povray.org>
> Presumably that's the -0.1^0.1 ?

Yeah... probably. Negative numbers to fractional powers are undefined, I
believe.

- Slime
[ http://www.slimeland.com/ ]
[ http://www.slimeland.com/images/ ]


Post a reply to this message

From: Gleb
Subject: Re: crash inside two #while
Date: 12 Jan 2002 15:47:06
Message: <3c40a0ca$1@news.povray.org>
Of course, the result of this operation is undefined.
The strange part is that the crash takes place only inside at least two
#while blocks.
Maybe it's about stack memory releases when handling an error event?

gleb

----- Original Message -----
From: "Slime" <noo### [at] hotmailcom>
Newsgroups: povray.beta-test
Sent: Friday, January 11, 2002 9:14 PM

> Yeah... probably. Negative numbers to fractional powers are undefined, I
> believe.


Post a reply to this message

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