POV-Ray : Newsgroups : povray.beta-test : long function with crash Server Time
1 Nov 2024 23:15:56 EDT (-0400)
  long function with crash (Message 1 to 10 of 11)  
Goto Latest 10 Messages Next 1 Messages >>>
From:
Subject: long function with crash
Date: 7 Feb 2002 12:40:31
Message: <8pe56usuudisacgrocav0l0ovqvetsno83@4ax.com>
POV 3.5 b 10 icl on WinNT Sp 6 PII 233 with 128 MB

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 ?

ABX


Post a reply to this message

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

Goto Latest 10 Messages Next 1 Messages >>>

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