Skip to content
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

Insertion previews become real blocks in v10.1.x #7383

Closed
1 task done
HollowMan6 opened this issue Aug 12, 2023 · 1 comment · Fixed by #7384
Closed
1 task done

Insertion previews become real blocks in v10.1.x #7383

HollowMan6 opened this issue Aug 12, 2023 · 1 comment · Fixed by #7384
Labels
issue: bug Describes why the code or behaviour is wrong

Comments

@HollowMan6
Copy link
Contributor

HollowMan6 commented Aug 12, 2023

Check for duplicates

  • I have searched for similar issues before opening a new one.

Description

As indicated in the title. A user also report this here: mit-cml/workspace-multiselect#20

As I made a Blockly version bump to my multi-select plugin yesterday. At first, I was assuming it to be some kind of issue that is specific to multi-select until I find that it also exists in the Blockly upstream just now 😅.

I also attach the reproduction steps as well as some screenshots below.

Reproduction steps

  1. Get some blocks created on the workspace.
  2. Drag and hold some sets of blocks, move them around another set of blocks quickly.
  3. You will have some chances to see the insertion markers become real blocks.
  4. You will also have chances to see 2 kinds of stack trace as indicated below.

Stack trace

  1. happens first:
Failed to execute 'appendChild' on 'Node': The new child element contains the parent.
    at BlockSvg$$module$build$src$core$block_svg.setParent (webpack-internal:///./node_modules/blockly/blockly_compressed.js:896:57)
    at RenderedConnection$$module$build$src$core$rendered_connection.connect_ (webpack-internal:///./node_modules/blockly/blockly_compressed.js:564:299)
    at RenderedConnection$$module$build$src$core$rendered_connection.connect_ (webpack-internal:///./node_modules/blockly/blockly_compressed.js:883:321)
    at RenderedConnection$$module$build$src$core$rendered_connection.connect (webpack-internal:///./node_modules/blockly/blockly_compressed.js:566:214)
    at InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.showInsertionMarker (webpack-internal:///./node_modules/blockly/blockly_compressed.js:820:227)
    at InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.showPreview (webpack-internal:///./node_modules/blockly/blockly_compressed.js:817:118)
    at InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.maybeShowPreview (webpack-internal:///./node_modules/blockly/blockly_compressed.js:816:282)
    at InsertionMarkerManager$$module$build$src$core$insertion_marker_manager.update (webpack-internal:///./node_modules/blockly/blockly_compressed.js:812:426)
    at BlockDragger$$module$build$src$core$block_dragger.drag (webpack-internal:///./node_modules/blockly/blockly_compressed.js:828:367)
    at Gesture$$module$build$src$core$gesture.handleMove (webpack-internal:///./node_modules/blockly/blockly_compressed.js:1299:19)
  1. Then
ERROR
Maximum call stack size exceeded
RangeError: Maximum call stack size exceeded
    at Set.add (<anonymous>)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:118)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)
    at queueBlock$$module$build$src$core$render_management (webpack-internal:///./node_modules/blockly/blockly_compressed.js:147:149)

Screenshots

Screencast.from.2023-08-12.20-03-21.webm

Screenshot from 2023-08-12 20-02-04
Screenshot from 2023-08-12 20-02-12

Browsers

No response

@HollowMan6 HollowMan6 added issue: bug Describes why the code or behaviour is wrong issue: triage Issues awaiting triage by a Blockly team member labels Aug 12, 2023
@HollowMan6
Copy link
Contributor Author

I have submitted the PR at #7384, ignore the reasoning here, as I had no idea what caused this at the time when I opened this issue, and this doesn't happen randomly at all.

@HollowMan6 HollowMan6 changed the title Insertion previews become real blocks randomly in v10.1.x Insertion previews become real blocks in v10.1.x Aug 12, 2023
BeksOmega pushed a commit that referenced this issue Aug 14, 2023
Don't add next block to the insertion marker when we do
an insertion marker json serialization.

Also, to keep consistent with the old behavior, we don't
need to add input blocks for the insertion marker.

And we don't need to do a full serialization here as it
will just become an insertion marker.

Resolves #7383

Address issues in PR #7364

Signed-off-by: Hollow Man <[email protected]>
ericblackmonGoogle pushed a commit that referenced this issue Aug 14, 2023
Don't add next block to the insertion marker when we do
an insertion marker json serialization.

Also, to keep consistent with the old behavior, we don't
need to add input blocks for the insertion marker.

And we don't need to do a full serialization here as it
will just become an insertion marker.

Resolves #7383

Address issues in PR #7364

Signed-off-by: Hollow Man <[email protected]>
(cherry picked from commit 18ee0ec)
@cpcallen cpcallen removed the issue: triage Issues awaiting triage by a Blockly team member label Jun 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Describes why the code or behaviour is wrong
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants