Limit on number of plugins
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 10/01/2011 at 01:46, xxxxxxxx wrote:
User Information:
Cinema 4D Version:
Platform:
Language(s) :---------
Is there a limit on the number of plugins C4D can have loaded? A user of one of my plugins is having a problem with it, and he can get it to work if he first removes some of his existing plugins (any of them, so it's not an incompatiblity with a particular plugin).I've also seen posts on other forums where people have not been able to use a plugin until they remove some others first. They often have 100+ plugins loaded, as my user does.
I was wondering therefore whether there is a limit on the total number of plugins that can be loaded. Also, does C4D set aside a block of memory to load plugins into (which can therefore be used up so that no more can be loaded)? The plugin causing problems is quite memory-hungry as it loads several external DLLs, so I'm just wondering if it's using up memory allocated by C4D for plugins.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/01/2011 at 23:54, xxxxxxxx wrote:
- deleted double post -
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 11/01/2011 at 23:58, xxxxxxxx wrote:
Hi,
i think i remember one of my customers had a similar problem once.
The solution i came up with was, to make subfolders in your plugins folder, like for example for each company.e.g.
plugins
DNS-Plugins
Remotion
Katachi
c4d-Jack
and so on..That was like 1 or 2 years ago and with a previous version of c4d, probably R10 or R11.
At that time it seemed to me that there was a limit to the number of folders one can have as direct children in the plugins folder.hth,
Daniel -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/01/2011 at 01:43, xxxxxxxx wrote:
Originally posted by xxxxxxxx
<ADDRESS>
User Information:
Cinema 4D Version:
Platform:
Language(s) :---------
</ADDRESS> Is there a limit on the number of plugins C4D can have loaded? A user of one of my plugins is having a problem with it, and he can get it to work if he first removes some of his existing plugins (any of them, so it's not an incompatiblity with a particular plugin).I've also seen posts on other forums where people have not been able to use a plugin until they remove some others first. They often have 100+ plugins loaded, as my user does.
I was wondering therefore whether there is a limit on the total number of plugins that can be loaded. Also, does C4D set aside a block of memory to load plugins into (which can therefore be used up so that no more can be loaded)? The plugin causing problems is quite memory-hungry as it loads several external DLLs, so I'm just wondering if it's using up memory allocated by C4D for plugins.
Basically there is no limit (in Cinema). Limits of the OS are:
- max. 2000 Threads per process on Windows
- max. 2560 Threads per process on OS XC++ Plugins are loaded like all other shared libs (DLLs) in the system. If a DLL is written in a way, that allocs all memory when starting, it could either prevent Cinema from allocating necessary memory - in a 32 bit system - or it could run into VM in a 64 bit system (and that would slow down the system extremly).
The most likely other reason for trouble is a memory trasher in one (or more) plugin(s); you could enable the C4D debug memory option to have at least a chance to catch some of them.
Best regards,
Wilfried Behne
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/01/2011 at 07:15, xxxxxxxx wrote:
Thanks Daniel and Wilfried, both very helpful answers. I'll investigate further on both suggestions. Interesting to see that there isn't a limit on plugins in C4D itself.
Clearly there is some problem somewhere - my user reports that the same issue occurs on his system with Vray failing to load (it gives a missing DLL error) which sounds so like the error he gets with my plugin that I'm reasonably confident it isn't my plugin itself that causes the problem. I have a couple of other users reporting the same error, both of whom seem to be plugin junkies with a zillion plugins installed.
Anyway, either explanation would fit what happens, so I'll try to test it to destruction and see what I get
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/01/2011 at 03:26, xxxxxxxx wrote:
I've investigated this further, and there's no doubt that by adding more and more plugins I can make my plugin fall over. The plugin itself loads without errors and the problem only occurs when it tries to load additional DLLs from disk (when it renders, including material previews, in other words).
It doesn't seem to matter which plugin is the one which causes the problem. I thought at first it might be a specific incompatiblity, but it seems there's a definite limit to the number of plugins. My guess is that this limit doesn't affect plugins which don't load external DLLs, but for the small minority which do, this can cause them to fail.
Not that it matters, to be honest. Realistically, I suspect that most users only use a small number of plugins with any frequency and use others very occasionally for specific purposes. So those users having the problem will have to learn to be more disciplined about the number of plugins they load
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/01/2011 at 06:04, xxxxxxxx wrote:
Originally posted by xxxxxxxx
I've investigated this further, and there's no doubt that by adding more and more plugins I can make my plugin fall over. The plugin itself loads without errors and the problem only occurs when it tries to load additional DLLs from disk (when it renders, including material previews, in other words).
It doesn't seem to matter which plugin is the one which causes the problem. I thought at first it might be a specific incompatiblity, but it seems there's a definite limit to the number of plugins. My guess is that this limit doesn't affect plugins which don't load external DLLs, but for the small minority which do, this can cause them to fail.
Not that it matters, to be honest. Realistically, I suspect that most users only use a small number of plugins with any frequency and use others very occasionally for specific purposes. So those users having the problem will have to learn to be more disciplined about the number of plugins they load
If you want to track that down, you'll should give us some more info:
- About which OS we're talking (Windows I guess?) and which incarnation (32/64 bit)
- What kind of external libs are used (STL, Boost,...)?
- What exactly does happen? Freezes, crashes (Stack overflow, DLL init crash, ...)?Best regards,
Wilfried Behne
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 13/01/2011 at 07:31, xxxxxxxx wrote:
Thanks for the offer Wilfried, but I really am not sure that it's worth the trouble. My main aim was to establish whether it's my plugin causing the problem or if (as I now believe) it's something outside my control.
That being the case, I don't have any problem telling users who run into this issue that the solution is to reduce the number of plugins they have loaded. That's probably not bad advice anyway! If this was a commercial plugin then it might be different, but it's a freebie so I'm happy to leave it at that. Also, the DLLs are proprietary and I don't have the source for them, so it would be tricky to see what was happening with them.
I was curious to know if Cinema did have a limit on plugin numbers, but it appears that isn't so, and that this is a special case. As I said, it seems to happen with other plugins (e.g. Vray) that load external DLLs, so I'm not alone here. But thanks for your help, it's much appreciated.