POV-Ray : Newsgroups : povray.beta-test : Beta5 nested loop crash Server Time
4 Nov 2024 13:01:46 EST (-0500)
  Beta5 nested loop crash (Message 1 to 3 of 3)  
From: Mike Williams
Subject: Beta5 nested loop crash
Date: 8 Oct 2001 04:22:33
Message: <LEOJcCA8HWw7EwVH@econym.demon.co.uk>
Nested loops crash if the iteration count is high enough. This crashes
when looping to A<2, B<762, but processes correctly when looping to A<2
B<761. Similarly A<38,B<38 crashes but A<38,B<37 succeeds.

This is a complete scene file which provokes the crash. The crash occurs
during parsing, so I've not bothered to put any lights, cameras or
objects in the scene - they don't affect the results.

POV 3.5b5, AMD k6-s 500, 128 Mb, W98se

#declare A=0;
  #while (A<2)
  #declare B=0;
    #while (B<762)
    
    #declare B=B+1;
  #end
  #declare A=A+1; 
#end


-- 
Mike Williams
Gentleman of Leisure


Post a reply to this message

From: Fabien Mosen
Subject: Re: Beta5 nested loop crash
Date: 8 Oct 2001 12:38:10
Message: <3BC1D5F7.F2759B16@skynet.be>
I got the same problem with the following loop :

#declare size_x = 20;
#declare size_y = 20;

#declare py = 0;
#while (py < size_y)

 #declare px = 0;
  #while (px < size_x)
  
    #declare Value = px*py;
    #declare px = px + 1;
    
  #end
  
  #declare py = py + 1;
  
#end

But noticed that it doesn't crash if nothing is done within the loop
(comment out the Value declaration).

POV-Ray 3.5 beta5, WinME, Celeron633, 128Mb.

Fabien.


Post a reply to this message

From: Ron Parker
Subject: Re: Beta5 nested loop crash
Date: 8 Oct 2001 23:06:39
Message: <slrn9s4qeb.3el.ron.parker@fwi.com>
On Mon, 8 Oct 2001 09:21:16 +0100, Mike Williams wrote:
>Nested loops crash if the iteration count is high enough. This crashes
>when looping to A<2, B<762, but processes correctly when looping to A<2
>B<761. Similarly A<38,B<38 crashes but A<38,B<37 succeeds.

This is the bug o' the week.  See other posts from this evening for the
gory details.

--
#macro R(L P)sphere{L __}cylinder{L P __}#end#macro P(_1)union{R(z+_ z)R(-z _-z)
R(_-z*3_+z)torus{1__ clipped_by{plane{_ 0}}}translate z+_1}#end#macro S(_)9-(_1-
_)*(_1-_)#end#macro Z(_1 _ __)union{P(_)P(-_)R(y-z-1_)translate.1*_1-y*8pigment{
rgb<S(7)S(5)S(3)>}}#if(_1)Z(_1-__,_,__)#end#end Z(10x*-2,.2)camera{rotate x*90}


Post a reply to this message

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