[Gridflow-dev] #transpose crashes

Mathieu Bouchard matju at artengine.ca
Thu Jul 13 12:16:57 EDT 2006


On Thu, 6 Jul 2006, Claude Heiland-Allen wrote:

> the attached patch crashes Pd+Gridflow very reliably
>
> "grid[3,400,600,2]"
> |
> [#transpose 0 -1]
> |
> [#transpose 0 -1]
> |
> {segfault}

Doesn't segfault here, I then tried with a grid[3,800,1200,2] and then 
with a grid[3,1600,2400,2]. It's slow but it doesn't crash.

What do you think it is?

#transpose uses a stack-allocated temporary buffer. If maximum size of 
stack is a problem, you may want to change that line:

   T res[na*nb*nc*nd];

to:

   T *res = new T[na*nb*nc*nd];

and then don't forget to insert this at the end of the GRID_FLOW block:

   delete res;

Does it solve your problem?

  _ _ __ ___ _____ ________ _____________ _____________________ ...
| Mathieu Bouchard - tél:+1.514.383.3801 - http://artengine.ca/matju
| Freelance Digital Arts Engineer, Montréal QC Canada


More information about the Gridflow-dev mailing list