Oct 10, 2007 at 6:29am
MacBookPro, 2.4 GHz Core 2 Duo, OS 10.4.10, Max 4.6.3
The code is too convoluted to post, but basically I’m assigning the bpatcher’s object name to an index of an array when it is created. To delete all, I am trying to iterate through the Array.
The delete function looks like this:
///”Obj_MaxName” is the name of my array
For some reason this function crashes every time. Admittedly, the bpatchers are pretty hefty DSP patches themselves, but this is happening even with DSP turned off.
Any help would be greatly appreciated. I have attached the log from the crashed thread below.
Date/Time: 2007-10-09 23:19:55.586 -0700
Version: ??? (4.6.3)
Exception: EXC_BAD_ACCESS (0×0001)
Thread 0 Crashed:
Oct 10, 2007 at 6:25pm
Just an update…
I was able to use this same algorithm to successfully create and delete a bunch of buttons, so I know that it *should* work in theory.
Is the problem related specifically to deleting patchers? Or is it just trying to do too much too quickly? Any ideas?
Quote: doctor op wrote on Wed, 10 October 2007 00:29
Oct 10, 2007 at 8:11pm
Hi Dan, mostly it is hard for people to get involved when there is no patch to save, open and press a button on to reproduce your problem.
It could take quite some time to create the patch that is needed to confirm your problem, let alone say something useful about it. That is mostly a reason for people not to reply.
Posting a small patch that clearly demonstrates the problem will dramatically increase the chance for a useful answer.
Oct 10, 2007 at 8:50pm
Yes, I’m well aware that a thorough example patch is helpful, but I was hoping to avoid it because the patch I’m working in is pretty complicated and I wasn’t able to repro the result in a more controlled patch. I was kind of hoping that with my basic description and crash log someone might have some insight. Ah well, pipe dream I suppose…
I’m not at my personal computer right now, but I’ll do some more investigating tonight and see if I can narrow it down and post a complete example patch.
Quote: Mattijs wrote on Wed, 10 October 2007 14:11
Oct 11, 2007 at 2:56am
OK… after some snooping on my own I think I’ve found a fix/workaround for my problem.
For what it’s worth, I believe that at least part of my problem was not recognizing the difference between the scripted name of an object (i.e. what you see when you right-click and select “Name…”) and the js reference name of an object (which I believe, after some well-placed post() messages, is something like “js 120983″). Is it possible that using this.patcher.remove() and passing the scripted name as an argument would cause a crash?
In any event… problem solved. I’m a relative newbie with js but getting better all the time. Next time I post with a problem I’ll be sure to include a concise example.
You must be logged in to reply to this topic.