Re: [Swingosc-devel] "failed to start" message
Brought to you by:
sciss
From: James H. <jam...@gm...> - 2010-06-27 07:20:27
|
> > hmmm, > > updatelistener per se is very robust and first 100% correct, i have it all over the place in my live instrument. so if there is a bug it must be somewhere outside of it, maybe a missed registration or a race condition, or....? > > at the moment i don't have time to look into it (also since i never witnessed this problem), but will keep it in my mind. if you have a startup sequence that reproduces the problem (without relying on extra quarks), i could see if i find the issue. > > Arghhh... I think I found it. SwingOSC is a subclass of Model, which doesn't include the fix that was made to Object:changed to avoid iterating over a collection from which items might be removed. changed { arg what ... moreArgs; dependants.do({ arg item; item.update(this, what, *moreArgs); }); } The only thing about my startup sequence that I can find is that I use SwingOSC.default.waitForBoot in my startup file, which calls doWhenBooted. SwingOSC:boot also calls doWhenBooted -- so there's a pair of UpdateListeners. I'm almost certain what's happening is that one of these listeners fires and removes itself from the dependents collection, which then modifies the collection so that the iterator never touches the other listener. I'll do some more testing by changing the method to read dependants.copy.do (to match Object:changed). CC: sc-dev, so I can rant about the continued existence of Model. I can see that it's there to improve performance of dependent notifications over Object's dependantsDictionary -- but, because supercollider doesn't have multiple inheritance, subclassing Model means that you can't subclass anything else at the same time. So nobody uses Model, with the side effect here that an important fix to the dependency protocol in Object never made it over to Model, and it wasn't discovered for probably a couple of years. Mental note -- SC4 cleanup -- remove Model. hjh -- James Harkins /// dewdrop world jam...@de... http://www.dewdrop-world.net "Come said the Muse, Sing me a song no poet has yet chanted, Sing me the universal." -- Whitman blog: http://www.dewdrop-world.net/words audio clips: http://www.dewdrop-world.net/audio more audio: http://soundcloud.com/dewdrop_world/tracks |