View Full Version : Too many CommRing subscribers bug

12-07-2011, 09:02 AM
hi there,

i am using the commring to get data to a lot of channel plugins. the problem is that lightwave start to behave buggy (saving the scene and loading objects does not work anymore) when too many instances subscribe to the commring (about 10 - 50. i need around 500).

the question is if there are any alternatives or solutions to commring, like tcp/ip to exchange data between different architextures (channel/displacement).


12-07-2011, 11:06 AM
Unfortunately, comring is a fail for anything serious. It can't even handle a ping-pong (in lscript; sdk I don't know; calls to comringmsg are ignored within comring event function; it's a broadcaster, not a communications system!). I think what you might be seeing is each of your instances event functions are called up within the same thread and hitting a limit or it's just too slow and LW decides lscript has had enough time executing and moves on. LW won't wait forever. I think this behaviour is documented aswell.

Other options...

There's always globalstore... which for windows stores data in the registry (mac I dont know). There's no way to clean it up(!) from lscript so don't go bananas. It will overwrite as long as you use the same key.

There's IPC, supposedly superseded and "obsolete". But you never know. New doesn't always mean better.

There's the file approach, but that's likely very taxing at 500 writer/readers.

You could always write a custom lscript class in C/C++ (need to be recompiled for all platforms) or just move development over to sdk completely.

12-07-2011, 11:21 AM
About the save and load. Are you detaching from the comring in destroy() callback (or earlier for certain)? And only attaching once per instance?

12-08-2011, 07:00 AM
thanks, evenflcw. yes, i am attaching each instance only once to comring. and would detach in destroy if the instances were removed. but the comring makes lightwave (mac) behave odd anyway. it's easy to reproduce. just write a channel script. attach to comring in the create function. and clone the object with the script attached 100 times. lightwave will fail.

were can i get IPC documentation? if this doesn't work the file approach would be my last hope.

12-08-2011, 08:20 AM
IPC docs!