Component Param "Deadlock" On Renaming Revisited [False Alarm]

unhandled

#1

@DavidRutten,
So it just happened again (horray!) - but this time I tried to catch some status. I just got that mysterious error caused by renaming an output Param.

As you know, any mishaps when renaming Params usually goes away if adding yet another Param and then immediately remove it again. But not this extra fancy exclusive error .

Nothing I do makes it go away, except for one thing: Reverting the Param name to its former name. Which is interesting (cache problem?).

This time I saved the definition, in .ghx format though, before and after the definition failed.

How to reproduce: I could rename the Param back to its former name - and add an extra Param and remove it again - and so make it work again. Renaming back to VSGUID will provoke the error back again.

Q: If you’re interested in the files I can send them to… some email address? (I was about to start refactoring the code since it’s the kind of component that evolves day for day, which is also why I started renaming Params, so the code is too messy to share here)

Fig 1. Param name “VSGUID” had former name “VSGuid” (if reverting to former name it will work again)

Of course I ran a compare on the “original” and “failing” .ghx files, but I couldn’t see any relevant differences there. Perhaps the .gh format would? (that can be reconstructed from the respective .ghx files if it need be)

Which mail adress? (if you want the files)

// Rolf


(Michael Pryor) #2

This happens to me quite often. I was usually doing the add param delete param trick also. I found that deleting out and then reinstating out usually fixes those cases where the make/delete param trick won’t work. Another thing I found that seems to work for those cases is select all the code in the component and cut (ctrl+x) it, exit the script editor, recompute the gh solver, then paste the code back in.


#3

OK, thank you for the hints! I’ll try the “out” trick first… (hold it).

Edit: Yeah, removing “out” made it compile again. But, if I reinstate “out” the error came back again. :slight_smile: It’s a problem with the Param indexes (one off, and when removing “out” the indexes shifts one step “left” and starts working, but adding “out” shifts it one step right, and so it goes bananas again).

I had hoped to see a diff in the source files when saving do disk (“Export source”), but it seems the indexes are correct there. Perhaps a redundant list somewhere in the GH kernel code which isn’t synced well…

// Rolf


(Michael Pryor) #4

What about the destroy caches option?


#5

I always try that too, but that seems to have no effect.

But embarrassingly enough, this time it seems I had caused the error myself. I just noticed that I had a bit of code, reading the output Params by name, and that very name wasn’t renamed… Ahum.

OUT_VSGUID = Component.Params.IndexOfOutputParam(“VSGuid”);

So, false alarm this time.

< looking blushed >

// Rolf