On Oct 6, 2011, at 11:10 AM, Mathieu Bouchard wrote:

Le 2011-10-06 à 10:31:00, Mathieu Bouchard a écrit :

Well, it's not like it's a super-obvious fix. I think both bugs take more than a few minutes of reading.

If it's obvious to anyone else - please let me know.

I'm emailing the authors... I don't know them, but anyway...

It really looks like two copies of the same bug, or almost. It's not a copy-paste, but both happen when doing

 final_gs[ls[something]-1]=stuff;

.......

duh. here's the fix for one bug. but the other one would take more investigation.

Index: vbap.c
===================================================================
--- vbap.c      (révision 15520)
+++ vbap.c      (copie de travail)
@@ -77,6 +77,7 @@
#ifdef PD
void vbap_setup(void)
{
+       post("%s: matju was here",__FUNCTION__);
vbap_class = class_new(gensym("vbap"), (t_newmethod)vbap_new, 0, (short)sizeof(t_vbap), 0,
                           A_DEFFLOAT, A_DEFFLOAT, A_DEFFLOAT, 0);

@@ -415,7 +416,7 @@

                final_gs[ls[0]-1] += g[0];
                final_gs[ls[1]-1] += g[1];
-               final_gs[ls[2]-1] += g[2];
+               if (dim==3) final_gs[ls[2]-1] += g[2];
        }
}


Thanks for digging that up, matju, I committed it. The sad thing is that I fixed that bug back in 2006, then rvbap was forked off of that version of vbap. Then I ported the newest version of vbap to Pd from scratch, but forgot to include that bug fix.

/* BUG FIX: this was causing negative indices with 2 dimensions so I
         * made it only try when using 3 dimensions.
         * 2006-08-13 <[email protected]> */

I guess that still leaves the rvbap bug tho. Perhaps the thing to do is to take the rvbap changes to vbap, and then make a new rvbap based on the new vbap.

.hc

----------------------------------------------------------------------------

“We must become the change we want to see. - Mahatma Gandhi


_______________________________________________
[email protected] mailing list
UNSUBSCRIBE and account-management -> 
http://lists.puredata.info/listinfo/pd-list

Reply via email to