Hi.
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.
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, ... };
Task.WaitAll(taskList.ToArray());
//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.