Weird bug with "Open MLT XML As Clip..." importing prior Source material - and workaround

What is your operating system? Win10 x64 v21H1
What is your Shotcut version 21.08.29 x64

I have several two to four second clips that I routinely use in my videos and while working on my newest one I successfully added two or three of them using the “Open MLT XML As Clip” as I had always done in the past. But then I attempted to add another - it previewed the external clip appropriately as a Source object but when I attempted to drag it into the Timeline it actually added what had been the Source previously (a long video file segment and not the short MLT clip I was trying to add).

I tried a few more times unsuccessfully with the same MLT file, then tried a different MLT file I had already added to the current project - and it failed again. Just to try to get it working I then copied a random clip from the Timeline to Source then tried to add the MLT file. Failed again - preview still worked but when I went to drag into the Timeline it instead added the random clip I had copied to the Source prior to importing the MLT clip. Then I opened the external MLT file and re-saved it with v21.08.29 after verifying that everything looked ok but it still wouldn’t work properly with “Open MLT XML AS Clip”; even after a system reboot.

I then had the thought to once again import the external MLT file with the “Open MLT XML AS Clip” dialog but before I dragged the clip into the Timeline I added a filter to it (Color Grading unaltered) and since then everything has been working as it should.

Weird bug that might be excessively rare but just in case anyone else has the same issue hopefully this workaround will see you suitably importing your stock MLT clips once again.

Super Thank You to the Shotcut team and all the contributors here! :film_strip:

I believe this only happens when you have previously copied something, and it is a duplicate of

It is difficult to say for certain because you did not provide the steps, and I doubt you were able to retrace the steps. This was the only way I could reproduce it - by first copying something inside MLT.
There will be a new version very soon with a fix.

Very likely a dupe as the behavior is identical - or incredibly similar as I did copy a random clip from the timeline and it still failed afterwards (I know it wasn’t the same clip that had previously been copied as what did make it into the Timeline was definitely different from before).

I was unaware that Shotcut utilizes the system’s clipboard so although I had noticed the title of MusicalBox’s post I didn’t think it applied to the problem I was having since I wasn’t copying or pasting from anything outside of Shotcut. Of course if I would have read the body of his post beforehand I should have figured that tidbit out :grinning_face_with_smiling_eyes:

Knowledge is power! :brain: = :muscle: I’ll be paying more attention to any copying I perform in my workflow from here on out and knowing that I can analyze/modify the system clipboard in case of any similar future issues is useful regardless.

Thanks again for everything!