Re: [Swingosc-devel] "failed to start" message
Brought to you by:
sciss
From: Sciss <co...@sc...> - 2010-06-27 10:02:10
|
well spotted! i removed Model now as a superclass Am 27.06.2010 um 08:20 schrieb James Harkins: >> >> 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 > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by Sprint > What will you do first with EVO, the first 4G phone? > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first > _______________________________________________ > Swingosc-devel mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swingosc-devel |