COFFEE | limited amount of memory?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  08 August 2006
COFFEE | limited amount of memory?

I need to ask because I get a mysterious COFFEE error (14) Stack overflow.

In principe I have a coffee code in three blocks in one cof file (or COFFEE TAG, no difference).
One that gets information from the scene , works fine.
Second that use that information to stear an object, works fine
And a third block that stears about 25 other objects.

The problem is, all work fine using any two of the blocks.
I can activate any few lines in the third block and it also works.

I need block one, but can use either block 2 or 3 as well and there are no errors.

What I wonder, is there a limit of lines that COFFEE can use?
The complete code is 2100 lines.

MSA | OSX | xfiles ...Cinema4D Tools
  08 August 2006
Hi Lennart,
are you using a recursive function, is it possible that there is infinite recursion happening , or are you using very large arrays, it is possible that this could cause this sort of error. Basically the stack is a region of memory on which local automatic variables (the variables in the scope of your functions) are created and function arguments are passed. The stack is allocated a certain size in memory and if your function needs more space on the stack than it has been allocated it will overflow causing errors. Have a read of this to understand how the call stack works Sorry I can't tell you what the limit would be, best to ask at plugin cafe.

  08 August 2006
Hi JDP. Thanks for the link. I've put the question at Plugin Cafe as well.
The code is a "one way flow" pretty much except for a regular searchmy Tag class at the top before execute(or Main in a coffe tag).
There is however loads of variables and 100+ userdata sliders (on the tags)
It's only the first tag that has the running code, the rest only carries userdata sliders.

I do suspect that the stack gets filled.
By only using the first two code "blocks" (those are the main plugin function and work fine)and then adding "unrelated" code such as;

var obj1 = doc->FindObject("object1");
var obj2 = doc->FindObject("object2") etc
I get the Stack overflow after some 8 extra lines.

println("hey there"); several times is no problem.

We'll see what the response at the Cafe might be.

MSA | OSX | xfiles ...Cinema4D Tools
  08 August 2006
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 04:34 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.