POV-Ray : Newsgroups : povray.beta-test : long function with crash Server Time
30 Jul 2024 04:23:20 EDT (-0400)
  long function with crash (Message 2 to 11 of 11)  
<<< Previous 1 Messages Goto Initial 10 Messages
From: ingo
Subject: Re: long function with crash
Date: 7 Feb 2002 16:10:07
Message: <Xns91AEE1CB8AC02seed7@povray.org>

Skiba wrote: 

> I have created macro which creates veery long function. It is
> available at 
> http://news.povray.org/vce56usomp3amfshtgqmhnffmrtekri5a2%404ax.com 
> With 1000 instead of 100 at macro call povray crashes.
> Any confirmation ?

I can confirm that the scene crashes when Count is bigger that 441.

Ingo


Post a reply to this message

From:
Subject: Re: long function with crash
Date: 8 Feb 2002 05:57:06
Message: <5bb76ucbrgq3c34spn7lfs2mks7k87g7gq@4ax.com>
On 7 Feb 2002 16:10:07 -0500, ingo <ing### [at] homenl> wrote:
> I can confirm that the scene crashes when Count is bigger that 441.

At begining of macro I have added function:
#local N=function{2*f_noise_generator(x,y,z,2)-1};
Then I have changed body of loop to:
      P(
        x+X*N(x+C,y,z),
        y+Y*N(x,y+C,z),
        z+Z*N(x,y,z+C)
      )
With such changes this scene crashes when Count is bigger than 598.
Looks like crash is connected with number of tokens in expression.

ABX


Post a reply to this message

From: Gleb
Subject: Re: long function with crash
Date: 8 Feb 2002 07:18:45
Message: <3c63c225$1@news.povray.org>
"ingo" <ing### [at] homenl> wrote in message
news:Xns### [at] povrayorg...

> Skiba wrote:
>
> > I have created macro which creates veery long function. It is
> > available at
> > http://news.povray.org/vce56usomp3amfshtgqmhnffmrtekri5a2%404ax.com
> > With 1000 instead of 100 at macro call povray crashes.
> > Any confirmation ?
>
> I can confirm that the scene crashes when Count is bigger that 441.

Confirm  >441 (PIII 1000 512 MB with Win 2000)
Gleb


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: long function with crash
Date: 8 Feb 2002 11:14:31
Message: <3c63f967$1@news.povray.org>

news:5bb76ucbrgq3c34spn7lfs2mks7k87g7gq@4ax.com...
> On 7 Feb 2002 16:10:07 -0500, ingo <ing### [at] homenl> wrote:
> > I can confirm that the scene crashes when Count is bigger that 441.
>
> At begining of macro I have added function:
> #local N=function{2*f_noise_generator(x,y,z,2)-1};
> Then I have changed body of loop to:
>       P(
>         x+X*N(x+C,y,z),
>         y+Y*N(x,y+C,z),
>         z+Z*N(x,y,z+C)
>       )
> With such changes this scene crashes when Count is bigger than 598.
> Looks like crash is connected with number of tokens in expression.

Functions still have a size limit (the size of the function VM code is
limited to 2^16 instructions).  The function compiler does test if the
functions runs over this limit, but for some reason this test seems to fail.
At least this explains the problem (I have not looked into it yet)...

It should be noted that when this problem is fixed (maybe beta 12), POV-Ray
will issue an error message and refuse to continue parsing.  For this reason
I would suggest you add some kind of automatic splitting into several
functions, i.e. doing some kind of recursion when the count is more than say
500.  As you can have up to 2^16 functions per scene, this should be
sufficient for a count of about 2 million (or about 500000 on a 32 bit
system). Unfortunately, then you have reached the absolute size limit. BTW,
you need to do this on a 64 bit system - the functions will consume about 16
GB of memory! ;-)

    Thorsten


Post a reply to this message

From:
Subject: Re: long function with crash
Date: 1 Mar 2002 10:08:53
Message: <gp5v7u4bfvadeckgreqfkvuvdbecudb6fe@4ax.com>
On Fri, 8 Feb 2002 17:16:17 +0100, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> As you can have up to 2^16 functions per scene, this should be
> sufficient for a count of about 2 million (or about 500000 on a 32 bit
> system). Unfortunately, then you have reached the absolute size limit. BTW,
> you need to do this on a 64 bit system - the functions will consume about 16
> GB of memory! ;-)

I have only PII 233 with 128 MB of RAM and even with this "cheap" box I have
reached another limit:

Parse Error: More than 65535 constants in all functions are not supported.

and I think it should be mentioned in documentation and warn anybody before
long coding process. Note different limit is mentioned in 6.1.6.2 : "There is
a limit of 65535 function blocks per scene".

ABX


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: long function with crash
Date: 2 Mar 2002 22:19:59
Message: <3c81965f@news.povray.org>

Skiba <abx### [at] babilonorg>  wrote:

> I have only PII 233 with 128 MB of RAM and even with this "cheap" box I have
> reached another limit:
>
> Parse Error: More than 65535 constants in all functions are not supported.

What the hell are you doing???

> and I think it should be mentioned in documentation and warn anybody before
> long coding process. Note different limit is mentioned in 6.1.6.2 : "There is
> a limit of 65535 function blocks per scene".

Indeed, it should be.  I actually thought it was...

    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:
Subject: Re: long function with crash
Date: 4 Mar 2002 03:00:47
Message: <86a68ugm13ugus6h9df0u3skeh3h6evn03@4ax.com>
On Sun, 03 Mar 2002 04:19:57 +0100, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> > Parse Error: More than 65535 constants in all functions are not supported.
>
> What the hell are you doing???

Nothing important, just universal ... something. I will show results some day
in p.b.i. Actually I passed this limitation changing loop into smart
recursion.

> > and I think it should be mentioned in documentation and warn anybody before
> > long coding process.
>
> Indeed, it should be.  I actually thought it was...

Great.

ABX


Post a reply to this message

From: ingo
Subject: Re: long function with crash
Date: 4 Mar 2002 09:46:15
Message: <Xns91C7A0C459B9seed7@povray.org>
in news:3c81965f@news.povray.org Thorsten Froehlich wrote:

> Indeed, it should be.  I actually thought it was...
> 

Limits:
* The minimum number of parameters per function is 1.
* The maximum number of allowed parameters per function is 20.
* The maximum number of function blocks per scene is 65535.
* The maximum number of operators per function is about 10000.
  Individual limits will be different depending on the types
  of operators used in the function.
* The maximum number of constants in all functions 65535.

If this is right, I'll put it in the docs (6.1.6.2)

Ingo


Post a reply to this message

From: Thorsten Froehlich
Subject: Re: long function with crash
Date: 4 Mar 2002 11:27:02
Message: <3c83a056@news.povray.org>
In article <Xns### [at] povrayorg> , ingo <ing### [at] homenl>  wrote:

> Limits:
> * The minimum number of parameters per function is 1.
> * The maximum number of allowed parameters per function is 20.
> * The maximum number of function blocks per scene is 65535.
> * The maximum number of operators per function is about 10000.
>   Individual limits will be different depending on the types
>   of operators used in the function.
> * The maximum number of constants in all functions 65535.

Yes, this is still correct except the number of parameters - it is the same
number as the maximum parameters for macros, which was increased a few month
ago (to 40 or more I think)

    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:
Subject: Re: long function with crash
Date: 7 Mar 2002 07:46:44
Message: <g1oe8ugb5r7mj4eju9gf5ao3s9m2knn25u@4ax.com>
On Fri, 8 Feb 2002 17:16:17 +0100, "Thorsten Froehlich" <tho### [at] trfde>
wrote:
> It should be noted that when this problem is fixed (maybe beta 12)

Just for clarity I want to mention it is not fixed in beta 12.

ABX
--
disc{z,-z 5#macro O()asc(substr("-+((1*(,1,/.-,*/(,&.323/'1"e,1))*.1-4#declare
e=e-1;#end#local e=26;pigment{#local g=function(_){ceil(_)-_}function#local//X
k=function{pattern{object{sphere_sweep{linear_spline 13#while(e>0)<O(),O()//AB
>.01#end}}}}{k(g(atan2(x,y)),g(ln((y+x)^2+1e-5)),0)}}finish{ambient 1}}//POV35


Post a reply to this message

<<< Previous 1 Messages Goto Initial 10 Messages

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