|
|
Le 14.03.2009 14:03, Carlo C. nous fit lire :
> Le_Forgeron <jgr### [at] freefr> wrote:
>> Le 14.03.2009 08:04, Edouard Poor nous fit lire :
>>> I was creating some scenes to test my 35mm Camera macros, but when I ran the
>>> autofocus test on a Julia fractal, I got a crash.
>
> Confirmed, 3.7b31 on Windows Xp SP3.
Proposal of at least a workaround (I find it ugly but it works), based on beta 32:
Updating the parser-thread Stack at the same time as the limit of stack is updated.
For rendering threads, they will use, as previously, the stack allocated from the
limit.
Why it's ugly: the fractal object need to know about the parser!
diff -r 562a27c89044 source/backend/parser/parse.cpp
--- a/source/backend/parser/parse.cpp Mon Apr 13 14:05:24 2009 +0200
+++ b/source/backend/parser/parse.cpp Mon Apr 13 14:13:17 2009 +0200
@@ -2691,5 +2691,5 @@
Parse_Object_Mods((ObjectPtr )Object);
- Object->SetUp_Fractal(&sceneData->Fractal_Iteration_Stack_Length);
+ Object->SetUp_Fractal(&sceneData->Fractal_Iteration_Stack_Length,this);
return((ObjectPtr)Object);
diff -r 562a27c89044 source/backend/shape/fractal.cpp
--- a/source/backend/shape/fractal.cpp Mon Apr 13 14:05:24 2009 +0200
+++ b/source/backend/shape/fractal.cpp Mon Apr 13 14:13:17 2009 +0200
@@ -105,4 +105,5 @@
#include "backend/scene/threaddata.h"
#include "base/pov_err.h"
+#include "backend/parser/parse.h"
// this must be the last file included
@@ -822,5 +823,5 @@
******************************************************************************/
-void Fractal::SetUp_Fractal(int *MaxIterStackLength)
+void Fractal::SetUp_Fractal(int *MaxIterStackLength, Parser *caller)
{
switch (Algebra)
@@ -911,5 +912,9 @@
if (Num_Iterations > *MaxIterStackLength)
+ {
*MaxIterStackLength = Num_Iterations;
+ TraceThreadData* updated= caller->GetParserDataPtr();
+ Allocate_Iteration_Stack(updated->Fractal_IStack, Num_Iterations);
+ }
Compute_BBox();
diff -r 562a27c89044 source/backend/shape/fractal.h
--- a/source/backend/shape/fractal.h Mon Apr 13 14:05:24 2009 +0200
+++ b/source/backend/shape/fractal.h Mon Apr 13 14:13:17 2009 +0200
@@ -97,4 +97,5 @@
{
+class Parser;
using namespace std;
@@ -186,5 +187,5 @@
static void Allocate_Iteration_Stack(DBL **IStack, int Len);
- void SetUp_Fractal(int *MaxIterStackLength);
+ void SetUp_Fractal(int *MaxIterStackLength, Parser *caller);
};
Post a reply to this message
|
|