Error: "Server busy" on custom component


I’m getting this error on a custom component, and never witnessed this behaviour before. I suppose Rhino is the one deploying the message and not Grasshopper.

Server is busy: This action cannot be completed because the other program is busy. Choose ‘Switch To’ to activate the busy program and correct the problem

The box pops up when the component is processing for 10 seconds or more. Everything is normal if processing time is under 10 seconds. Once I close the box calculation results are displayed correctly.

Could this be my Task.Run implementation?


(jesterKing) #2

It is a message popped up by the operating system.

Most likely. This sounds like a task running on the main thread without messages being pumped.

(David Rutten) #3

Possibly, can you post some more code that shows what this Task is and how it fits in the context of the application UI thread?


It was the Task.Run implementation.
One thing I noticed was that the Task methods were getting top performance with GH_Structure and without this error, but with Lists I had to manually subdivide the iterations in 8 tasks (1 per each CPU thread) to get 100% CPU usage.
I have already deleted that part of the code and replaced with Parallel looping but in the version that had the best performance (Task.Factory did not produce better performance), it looked something like this:

    List<Mesh[]> meshList = new List<Mesh[]>();

    //Queue up tasks ----------------------------------------------
    Task<List<Mesh[]>> t0 = Task.Run(() => DrawGeometryT0());
    Task<List<Mesh[]>> t1 = Task.Run(() => DrawGeometryT1());

    //Halt until all geometry has been created  -------------------
    List<Task> taskList = new List<Task>{t0, t1, ... };

    //Results assembly --------------------------------------------
    foreach (Mesh[] mshA in t0.Result) meshList.Add(mshA);
    foreach (Mesh[] mshA in t1.Result) meshList.Add(mshA);

    //Define methods ----------------------------------------------

    List<Mesh[]> DrawGeometryT0() {
        for (iteration logic - segment1) {
            Mesh geometry creation;
    return meshArrayList0;

    List<Mesh[]> DrawGeometryT1() {
        for (iteration logic - segment2) {
            Mesh geometry creation;
        return meshArrayList1;


Is there any progress on this? I am also getting this message when running DIVA and in custom Python components. Would love to be able to suppress/avoid this.


(Dale Fugier) #6

HostUtils.DisplayOleAlerts should work again in the SR12 RC.

– Dale