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

Undo after a copy and paste operation fails #2406

Open
AtlaStar opened this issue Sep 18, 2024 · 0 comments
Open

Undo after a copy and paste operation fails #2406

AtlaStar opened this issue Sep 18, 2024 · 0 comments

Comments

@AtlaStar
Copy link

Copy and pasting a visual block to another timeline, then attempting an undo causes an immediate failure with the following errors

scene/main/node.cpp:1694 - Index p_index = 138 is out of bounds ((int)data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache = 138).
  core/variant/variant_op.h:1495 - Parameter "l" is null.
  scene/main/node.cpp:1694 - Index p_index = 138 is out of bounds ((int)data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache = 138).

Works for any block copied in the visual editor, and does not allow that initial undo operation to succeed. Future undo operations work correctly, but corrupts the redo state due to the failed undo. This causes a slew of other odd issues like in memory timeline corruption, the inability to change timelines, and other weird errors to be emitted such as the following

res://addons/dialogic/Editor/TimelineEditor/VisualEditor/timeline_editor_visual.gd:139 - Invalid type in function 'create_end_branch_event' in base 'MarginContainer (timeline_editor_visual.gd)'. The Object-derived class of argument 2 (previously freed) is not a subclass of the expected argument class.
  scene/main/node.cpp:1694 - Index p_index = 138 is out of bounds ((int)data.children_cache.size() - data.internal_children_front_count_cache - data.internal_children_back_count_cache = 137).
  res://addons/dialogic/Editor/TimelineEditor/VisualEditor/TimelineArea.gd:182 - Invalid access to property or key 'global_position' on a base object of type 'null instance'.

Steps to reproduce the behavior:

  1. Go to the visual editor
  2. Copy a block from timeline A
  3. Paste that block to timeline B
  4. undo the operation using keyboard shortcut
  5. See the error

This obviously shouldn't happen, as it is expected undo/redo operations will just work

  • OS: Windows 10
  • Godot Version: 4.3.stable
  • Dialogic Version: 2.0 Alpha 15

Solutions:
Do not copy/paste and use redo

One weird visual quirk I did notice especially with copying block statements is that they visually do not appear correctly, and doing an undo here will cause everything but the node that didn't correctly have a "tail" to undo but then emit the first type of error with this appended as well

res://addons/dialogic/Editor/TimelineEditor/VisualEditor/timeline_editor_visual.gd:500 - Invalid access to property or key 'end_node' on a base object of type 'null instance'

image

Behavior sounds as if it is similar to #2381, and possibly related as the "everything being copied over" could be solely a visual bug, and may be caused by some other out of bounds access

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant