-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JSON deserialization fails for collapsed procedure call blocks containing at least one input variable #6091
Comments
Hi! I just finished the fix for #6076 and can confirm, that it doesn't fix this problem. I am into it and can provide a fix within a few days, stay tuned 😄 |
Thanks very much, that would be fantastic. I am currently working around both problems by pre-processing the JSON to expand collapsed blocks prior to deserialization, and then collapsing them again after the workspace is rendered. It will be nice to be able to remove my hack once this is fixed. |
Hi @cmjcharlton bug is identified, fix follows. If you have some time, maybe you can do some manual test for my provided fix for #6076? Maybe you can find edge cases I haven't think of. |
Thank you both for reporting and investigating this! I can repro the behavior you described. |
Both types (i.e. "procedures_callnoreturn" and procedures_callreturn" ) are affected. The Precondition is: Call block contains at least one input variable |
Thanks @tweini for pointing out my off-by-one error in the title/description (now corrected). I'm not sure how I managed to do that given my replication example only included one input. |
…tests (collapsed procedure call blocks)
fixed ✅ @BeksOmega, @cmjcharlton, who wants to close the issue? |
I just tested the develop branch of Blockly with my application and can confirm that this appears to fix the problem that I was seeing. I would therefore be happy to see the issue closed. Thanks very much for finding the cause, and fixing it. |
Closed by #6103 |
…e call… (google#6103) * fix: JSON deserialization fails (bug google#6091) (collapsed procedure call blocks) * fix: JSON deserialization fails (bug google#6091) changed fix, added tests (collapsed procedure call blocks)
…e call… (google#6103) * fix: JSON deserialization fails (bug google#6091) (collapsed procedure call blocks) * fix: JSON deserialization fails (bug google#6091) changed fix, added tests (collapsed procedure call blocks)
…e call… (google#6103) * fix: JSON deserialization fails (bug google#6091) (collapsed procedure call blocks) * fix: JSON deserialization fails (bug google#6091) changed fix, added tests (collapsed procedure call blocks)
@cmjcharlton We've released patches for v7 and v8 containing this fix (and the fix to #6076) if you want to give them a try =) |
Thanks @BeksOmega for the new update. I updated to the new patched version and removed the workarounds that I previously had in my application. I am no longer seeing the errors that I did before and everything seems to be working so far. I also checked the v7 backport version and that seems to be fixed for me too. |
That's awesome!!! Thank you so much for giving them a test for me :D Really appreciate your time 🌻 |
Describe the bug
If I attempt to load a workspace from JSON containing a collapsed procedure call block with at least one input variable then this block is missing from the loaded workspace.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Both the procedure definition and call procedure blocks should be present in the loaded workspace.
Screenshots
Workspace to be saved:
Workspace after load:
Desktop (please complete the following information):
Stack Traces
Additional context
Although it involves collapsed blocks I don't believe that this is the exactly the same as issue #6076 as it appears to be related to extraState rather than icon visibility, however again the error does not appear to occur if saving/loading via XML. It also does not occur for either deserialization method if the procedure call block contains no input variables.
The text was updated successfully, but these errors were encountered: