Grasshopper

algorithmic modeling for Rhino

Hi,

Does anyone know how to reset and "clear" a custom component's inputs? Randomly, I seem to be getting input "failing to collect data" errors. After a few solution->recomputes, the component collects its inputs and runs fine.  However, this is very random and I'm not understanding what the inherent cause of the error is. 

Does it have anything to do with declaring variables at the class level as private or at the function level with "dim"?

Closing and restarting Rhino seems to be a cure all which suggests to me something about GH holding things in memory or something along those lines.

Does anyone have any suggestions to fix these random misbehaving components?

Thanks.

Kermin

Views: 3525

Replies to This Discussion

Hi Kermin,

I'm not sure exactly what's going on here. Are you running VB/C# script component, or a GHA component?

What sort of parameters are failing to collect data?

Does it have anything to do with declaring variables at the class level as private or at the function level with "dim"?

Whatever the problem is, I sincerely doubt it could possibly be associated with field declarations.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

Thanks for the reply. 

The components which have this issue are GHA custom components.

The parameters which "fail to collect the data" have been lists and trees.

Is there a function to "reset" or re-initialize the component after it's been dropped onto the workspace? For example, I usually have a boolean to activate the component which just starts the associated computation but the reading of inputs (e.g. da.getdata etc) is done regardless of whether the boolean is set to be true. 

Don't know if this information sheds any light of a possible issue.

Thanks.


Kermin

Well even if you could 'reset' your inputs (which is possible), I think it makes more sense to try and figure out why it is happening. If this is the manifestation of a bug in Grasshopper core I need to fix it there.

The "Input parameter X failed to collect data" message is posted during the solution, just after the parameter is asked to collect its data. It is only posted when the VolatileData of the parameter is empty and the parameter is not optional.

What parameters are these? Integer, Point, Brep, your own type? Do you have any special post-operations defined (Flatten, Graft, Simplify)? 

We're not talking about output parameters here are we, just inputs?

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

Ok. Now this gets interesting. "is only posted when the VolatileData of the parameter is empty and the parameter is not optional." The volatile data coming being fed into the component is usually text or sometimes points. I usually verify that the input is valid by using a panel component to see what is being fed in. This panel is always nicely populated . This panel is then used to input to the custom component. 

 

When I mouse over the input variable, this is where the problem happens, it sometimes appears blank as if the panel just "dropped" all the information along the way to the component. Sometimes the "input parameter failed to collect data" is shown.

 

I usually flatten the incoming tree if I'm dealing with trees.

 

The problem just appears to be with the inputs. Outputs are fine. 

Ok, so these are standard String or Point parameters? 

There was a bug with post-process effects on output parameters a while ago. It would not recompute by itself, but this was always fixed by pressing F5 a single time. But that bug should have been fixed in 0.8.0066 and it only pertained to outputs.

Also, does this failure happen sometimes, or is there something you can do to make it fail consistently? If so, that will be the easiest way to track down the problem.

--

David Rutten

david@mcneel.com

Poprad, Slovakia

Hi David,

These are standard point and string inputs. However, sometimes these inputs are outputs from other custom components.

F5 sometimes works to fix this. However, for a component with a few inputs (say 3), F5 would enable some of the inputs to work again but it wouldn't fix all the misbehaving inputs at the same time. A re-start of rhino is usually required.

Unfortunately, these errors happens randomly. However, a shut down of Rhino and a reloading of Rhino + Grasshopper usually does the trick of getting the inputs and outputs to work correctly again. 

I'm not sure if this helps in any way to chase down the bug.

Meanwhile, is there a function to  simulate a restart of GH to reset all the components? That will at least make my work a little easier in the meantime.

Thanks.

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service