Diagnose Plug-in Load Issues on Clean Install

All:

We are having trouble when we install our product Matrix and run Rhino for the first time. We have 6-8 plugins that are “newly registered” and so Rhino begins loading them all for the first time.

At some point we get a “Cannot Load Plugin, while Plugin is loading…” error.

I’m wondering if there is any flag that can be set to show which plugin is loading while another plugin is already loading?

Or is there a way to enable ShowTestDotNetMessages on startup so we can see any extra error messages?

Thanks,

Jake

I’m not sure what your set-up is, but we have a similar configuration of numerous plug-ins and I have never seen this. Are you loading another plug-in inside the OnLoad, to ensure that a certain plug-in is loaded before another loads?

Definitely not doing that… It seems we may have isolated it to the T-Splines plugin. When that loads along with our plug-ins on a first time startup, whatever loads after it gives us that error…

We are testing loading that plugin manually after our last plugin loads…

The plug-in manager doesn’t lie. :wink:

The message is generated by Rhino’s plug-in manager when it loads a plug-in. The plug-in manager cannot load a plug-in if it is already in the middle of loading (another) plug-in.

Not sure my comment helps diagnose your situation. Look to see if plug-ins reference other plug-ins, or of the startup code for a plug-in reference something in another plug-in.

We may have code calling into a function which is dependent upon another plugin. Which is then implicitly loading that other plugin.

My problem is in determining which plugin.

Can you at least say the Plugin which is Loading, and the Plugin which is attempting to be loaded in your error message?

Also can you add an event that we can handle to see when a plugin (Any Plugin) loads in Rhino?

I would hope I could write a handler for RhinoApp.PluginLoaded(object sender, PluginLoadEventArgs args) event (which doesn’t yet exist).

Then view the args.PluginName or args.PluginId to know which plugin is loading.

This would be immensely helpful since Matrix consists of over 7 plug-ins now.

I hope you guys can add some logic there.

Thanks,

Jason

From the tools, options, plugins dialog you can block plugins from loading. By first disabling all plugins and enabling them one by one you may be able to glean some more info on what is going on.

1 Like

Yes, but that won’t help in our scenario. The problem arises on a clean install of Rhino and our software. Rhino auto-loads the plug-ins in some order outside of our control.

We have a work around by no longer “registering” the plugins in the registry, and instead doing a dynamic load at runtime of each of our plugins.

I just think there should be more events available to us from the RhinoCommon core such as PluginLoading and PluginLoaded. And error messages that say you “cant load a plugin while plugin is loading”, should at least tell you what is loading and what cant be loaded.

This is because your plug-in only partially registers your plug-ins. Compare the Windows Registry after running your installer and then after running Rhino for the first time. If you provide all of the registration information, then what you describe won’t happen.

We thought we had been following your advice doing the partial registration.

What is the recommended way to register multiple plugins so that on the first load of Rhino everything is smooth?

Do you have any samples showing how to handle a scenario where a 3rd party developer can register multiple plugins and then on first run Rhino is ready to go?

Thanks for any help you can provide.

Jason

Partial registration is fine. But you shouldn’t have one plug-in dependent on another (in regards to loading).

Do you know which plug-ins is loading another plug-in? You should be able to tell because some error pops up or is displayed on the command line. What is this plug-in doing in it’s constructor or in its OnLoad member that is causing another plug-in to load? Can whatever its doing be moved some place else? The lazy way is best. Have command check to see if what they need is available and, if not, load it on demand.

Dale,

Thanks for the suggestions. Our main plugin that coordinates all of the rest of our application does in fact need to make use of several other 3rd party plugins such as VRay and TSplines.

We have of course mitigated most of the issues, but it can be very frustrating and time consuming trying to isolate root causes of this issue, when it should be a matter of viewing a plugin loading log, or responding to an event, or something similar from Rhino.

Being that we are an entire application and not simply a single plugin, it would be very helpful to simply expose some of this debugging information.

I guess I had hoped you would say, “Sure we can add those events, or a plugin loading log to the next SR”.

Either way, we are making do for now.

Thanks,

Jason