Grasshopper

algorithmic modeling for Rhino

Using the latest GH, 0.7.0037, I am slowly trying to build up a custom component, and i get this error out of the blue...
Something's definitively wrong, probably in what I'm doing:


etc...

protected override void RegisterOutputParams(GH_Component.GH_OutputParamManager pManager)
{
pManager.Register_StringParam("out2", "out2", "pumping stuff in here");

}

protected override void SolveInstance(IGH_DataAccess DA)
{
bool toggle = false;
string output = "starting \n ending as well.";
DA.SetData(0, output);
}
Cheers,
d

Views: 782

Replies to This Discussion

hah you can't see much in that image....

Hi Dimitrie,

not sure what's wrong here, but it definitely looks like my mistake. I'll dig a bit deeper.

--
David Rutten
david@mcneel.com
Poprad, Slovakia
hey david,

thanks for the reply. It's strange as well since some other, more simple components (aka your tutorial) worked fine (not anymore). reinstalling gh fixes this though.
i was just going to post this today. i am getting the same exact thing happen. i loaded a custom component and then the tool tips went crazy and not just for my component
if it's any help,


pManager.Register_BooleanParam("TOGGLE", "ON/OFF", "Toggle a definition restart.", false);

pManager.Register_DoubleParam("Maximum Speed", "MAXS", "Maximum speed the boid can reach.", 1.5);
pManager.Register_DoubleParam("Maximum Force", "MAXF", "Maximum force w/h which the boid can turn.", 3);
pManager.Register_DoubleParam("Separation Factor", "SEPF", "Flock separation factor.", (double) 0);
pManager.Register_DoubleParam("Alignement Factor", "ALNF", "Flock speed alignement factor.", (double) 0);
pManager.Register_DoubleParam("Cohesion Factor", "COHF", "Flock cohesion factor.", (double) 0);

pManager.Register_IntegerParam("Number of Boids", "NBDS", "Number of boids to be spawned in the system.", 50);

pManager.Register_IntegerParam("Tail Size", "TSZ", "Size of the tail the boids leave behind.", 50);

//pManager.Register_BRepParam("Obstacles", "OBS", "Environment obstacles.", GH_ParamAccess.list);
pManager.Register_DoubleParam("Obstacles power", "OBSP", "How hard should a boid steer away from obstacles", 2);

//pManager.Register_PointParam("Start points", "SPTS", "Start points - where the boids will spawn from.", GH_ParamAccess.list);

//pManager.Register_PointParam("Attractors", "ATTS", "Attractors - boids will converge towards these targets.", GH_ParamAccess.list);
pManager.Register_DoubleParam("Attractor power", "ATTP", "How hard should a boid steer towards an attarctor.", 3);

//pManager.Register_IntervalParam("World boundaries", "BNDS", "World boundaries. If a boid gets out of the cube defined by this interval it will be killed.");


commenting out the GH_ParamAccess.list inputs takes care of everything - i mean no more errors, and no more lists as well.
awesome...boids right in GH! There are a few people working on this...it will be nice to have a formalized component set to work with them...
yeah, i know :) i'm basically transporting code in a custom component from an scripting comp i did some time ago http://improved.ro/blog/2009/10/grasshopper-boidsagents/
it proves to be, just as expected, a nice exercise... let's hope the tool tip bug isn't going to prove such a big problem...
i have my locust plugin working with all of the boyds implemented including collision detection (there are 10 steering behaiviors). i will probably release it in a few weeks. boids are a lot of fun.

ps the tool tip thing only happened after i recompiled a plugin. so it seams to have something to do with the latest release of GH
right more dead reckoning:
Adding this brings down the crash:


List obstacles = new List();
if (DA.GetDataList("OBS", obstacles)) DA.SetData(0, 30);
else DA.SetData(0, 10);


crash is persistent, even after commenting the lines above out, rebuilding and reloading grasshopper. restarting rhino resolves the tooltip errors though.

So i guess somewhere in the GetDataList something's fucked up... or around...
hope it helps.
When you say "crash", what exactly do you mean? If you check the "do not show this message again" box on the error dialog, does the program continue to work? Or do you get Rhino+GH crash? Do tooltips work at all after that?

--
David Rutten
david@mcneel.com
Poprad, Slovakia
it works ok after checking the do not show this message again - i mean it does what it's supposed to do :)

if i "restart" grasshopper (unload + load) tooltips won't work as long as the custom comp calls out for DA.GetDataList.

if i restart rhino + gh i get the same error again.

if i rebuild the custom comp without the DA.GetDataList call, restart rhino and gh, then tooltips will work .

hope it helps,
d.
this is still happening in 0.7.0045 but more sporadically now.

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