Server busy with web request methods

Hello everyone!

I work at Woods Bagot where we develop our own internal plugin called Wombat, mostly developed in C#.
Lately I’ve tried to add a couple of features that get some information from the web. One of those for example, is a functionality to get some images from Airtable and display them while Rhino is loading (in the OnLoad method of the class that inherits from Plugin) as splash screen. The splash screen per se is just a simple WinForm with a background image. Very similar to this that also works for Revit: Create a Splash Window in C# for Revit Addins - RevitNetAddinWizard & NavisworksNetAddinWizard
I also have tried a couple of other similar features that get data from an http request and I always get the same issue.

For some reason, every time I use one of these methods that get info from a web request I get this Server Busy pop up:
image

Then I click Retry a couple of times and I get my image to pop up.

I’ve seen a few posts here in the forum with a similar topic, but nothing that really helped in my case as they were not implementing http requests.

The method is synchronous as I initially tried with async but it wasn’t working.

Any idea why this is happening?

Thanks!

Andrea

Plug-ins are loaded on the main thread. If you need to do actions that would block you should do them on a separate thread. If you need to do stuff to your GUI from that separate thread you need to invoke on the ui thread.

Anyway here is a splash screen example using Eto (which would be the preferred way to develop GUI for plug-ins in Rhino):

1 Like

That was it! Thanks @nathanletwory I learnt something new today (I wasn’t too familiar with the creation of threads)