Broken procedure

Status
Resolved
Issue description

While trying to edit a procedure (the CollectorElfRightClickedOnMob), there either are no procedure blocks, messy procedure blocks (numbers and variables that are separated from the blocks they belong to for example) or all of them are in a little space. Basically, I can't edit it.

This happens both if I edit the procedure directly and if I edit it by editing the Collector first.

I tried exporting it, but it said the operation failed because the procedure is corrupted. I also tried reloading MCreator many times, checking if it works after a recompilation, but the issue persists after days.

It only happens with the Collector's procedure, and only after I added a few new blocks to it (I only copied the existing ones and changed the inputs and outputs).

I attached the workspace here, could you remove it when you'll make it public? Thanks.

image

Issue comments

I can reproduce this bug, but I am not sure why it is happening. I would suggest you to try to rebuild the procedure, or even better, try splitting it and using call procedure block.

The error in the terminal is:

netscape.javascript.JSException: JavaScript execution terminated.
java.util.concurrent.ExecutionException: netscape.javascript.JSException: JavaScript execution terminated.

so my main suspect is that the procedure is too large and JavaScript engine we use for procedure system crashes, but this is unfortunately not really under our control.

So this means I should recreate it (using call procedure blocks to make it littler)? Could rebuilding the code recover the procedure?

And I think I made larger procedures in Raolcraft and Pyromancy, could it be that I didn't collapse blocks in Hodge-Podge?

This is my guess based on the crash log. But it could be a rare case of procdure getting corrupted too if you think you had larger procedures before.

I think next time I will create a large procedure I will backup it then XD

Does call procedure store entity dependencies? Because I don't think I can use them in that procedure then :(

Call procedure links all dependencies required by the second procedure, but if you add new dependencies to the calling procedure, you need to resave the procedure calling it to refresh the depencencies.

This means I can link it using call procedures as it only uses entity dependencies :D