reateMoveAction bugs: invisible same-source clip after move, and AV link breaks on backward audio move

Summary

createMoveAction has two distinct bugs when executed via lockedAccess + executeTransaction:

  1. Clip becomes invisible when the move path crosses a same-source clip on the same track
  2. Audio-video link breaks when moving an audio clip with a negative offset (backward in timeline)

Both issues do not occur with manual drag-and-drop. The code pattern follows the documented best practice.


Bug 1: Clip Becomes Invisible After Move

Steps to Reproduce

  1. Create a sequence with multiple clips from the same source media on a single video track (e.g., 4 cuts from the same file on V1)
  2. Use createMoveAction to move one clip past another clip from the same source on the same track
  3. Execute via the standard pattern (see minimal code below)
  4. Observe the timeline

Expected: The moved clip is visible at the new position.
Actual: The moved clip disappears from the timeline UI. Video plays correctly at the target position, but the clip bar is not rendered.

Severity

  • The corrupted state persists after saving and restarting Premiere Pro
  • The only recovery is to manually drag one of the invisible clips, which triggers a redraw of all same-source clips

Verification

The API reports correct positions after the move:

const postStart = await clip.getStartTime();
const postEnd = await clip.getEndTime();
// Both match the expected target position exactly

Key Observations

  • Same track + same source + move past = bug. Moving past a different-source clip, or past a same-source clip on a different track, does NOT trigger the issue

  • Manual drag works fine β€” only createMoveAction is affected

  • Persists after save and restart β€” the project file retains the corrupted rendering state

Workaround

Moving all clips on the target track at once (so no same-source clip remains stationary on the path) avoids the issue.


Bug 2: Audio-Video Link Breaks on Negative Offset Move

Steps to Reproduce

  1. Have a linked video + audio clip on the timeline

  2. Use createMoveAction to move only the audio clip with a negative offset (earlier in timeline)

  3. Observe the link state

Expected: Audio-video link remains intact (as it does with manual drag).
Actual: The audio-video link is broken.

Key Observations

  • Negative offset (move earlier): link breaks β€” 10/10 reproducible

  • Positive offset (move later): link preserved β€” 10/10 reproducible

  • Video-only move: link preserved in both directions

  • Manual drag: link preserved in both directions

  • After the link breaks, performing a trim or moving the video clip and undoing can sometimes restore the link β€” suggesting the internal state may be inconsistent rather than truly unlinked


Minimal Reproduction Code

const premierepro = require("premierepro");

const project = await premierepro.Project.getActiveProject();
const sequence = await project.getActiveSequence();
const track = await sequence.getVideoTrack(0);
const clipType = premierepro.Constants.TrackItemType.CLIP;
const clips = await track.getTrackItems(clipType, false);

const clip = clips[0];
const offset = premierepro.TickTime.createWithTicks("254016000000"); // ~1 second

project.lockedAccess(() => {
  project.executeTransaction((compoundAction) => {
    compoundAction.addAction(clip.createMoveAction(offset));
  }, "Move clip");
});

Nice finds, well-reported!

We’re tracking these as DVAPR-4264156, and DVAPR-4264157, respectively.

1 Like