Rhino popup window

Hi guys,

We have a client who uses our plugin in the batch mode. Sometimes, there is a popup window which stops the program running.

How can we stop this dialog?

Thank you.


Here is the dialog:

This type of error typically happens when you do something in a thread that pumps messages, for instance trying to update the UI from that thread instead if the main thread.

Or a problem with a long running thread that doesn’t join properly.

Or just code on the main thread that runs in a tight loop that runs for very long, or even never ends, not giving time to the UI.

Hard to say without code what the real problem is.

thank you for your reply.

Our plugin is just a c++ plugin. I have seen this message before. We don’t have any update on the UI inside our plugin, there are several print commands in the end of the plugin execution, but our plugin sometimes has every heavy calculation. Is this a reason? How can we avoid this?


A C++ plug-in can use threads too. But if you are not using threads at the moment then

This very well may cause that.

How to avoid this is to make sure your calculation can be easily cancelable, then move the calculation to separate thread and ensure you make updates to the UI or call the command-line Print commands only on the main thread.

If we have a main thread and a separate thread to do the calculation, then the main thread will still have to wait for the calculation, so why does it make any difference?

The plugin is very simple and straight forward: a. user select the surfaces, b. plugin does the calculation, c. add the curves to the model (m_doc inside context). So the Rhino will still have to wait for the calculation, right? Is there any way to let the plugin suppress the dialog from rhino? It doesn’t make any sense for rhino to pop up such dialog.

Sure, but the idea is that the main thread can still be alive. You could make your calculation cancelable, which is probably a good thing.

There may be a way, I tried searching the forum, but failed to put in the right words. I do know it was talked about and some solution was suggested. Maybe @dale remembers better.

Hey @smartunfold,

Before starting your process, try calling HostUtils.DisplayOleAlerts.

Does this help?

– Dale