No, unfortunately not anything consistent. But I’ve noticed that it seems to happen more often if the the port number and name was also defined in code, and the name is changed in code before you change the name on the capsule.
Anyway, I defined the names, both on the capsule and in code, and then changed the name on the capsule only, from FormerName to FormerName2, but no error was reported (code quietly overrides the casule settings). I had not noticed that one before. Anyway:
Fig.1. Initial component:
Fig 2. The name was changed on the capsule, but the component keeps using the old name (code overrides capsule settings) :
Fig 3. On commenting out the hardcoded name and pressing the “Run script” button, only then the name conflict is discovered ;
Notice how the signature and the code body was not in sync in Fig.2, but still the compiler didn’t discover that. To fix this particular problem, the component needs to be marked as “dirty” when modifying the capsule, and it would then know to recompile itself nest time the code editor is openend.
That’s all I have for now, but I’ll try to catch the circumstances for deadlock next time it happens.
Edit: Perhaps Components could be modified so that coded property names and data would update the info shown on the capsule when closning the code editor (and when pressing the “Run Script” button, then attempts to cause async would be resolved before it can happen.