Bug 382403 - Markers are buggy after save
Summary: Markers are buggy after save
Status: RESOLVED FIXED
Alias: None
Product: kdenlive
Classification: Applications
Component: User Interface (show other bugs)
Version: 17.04.1
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-07-16 15:11 UTC by Martin Stolle
Modified: 2017-07-19 19:33 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Stolle 2017-07-16 15:11:28 UTC
When creating markers, I can navigate between nicely with Alt+{Left,Right} and, after navigating to a marker that way, remove it through Clip -> Markers -> Delete Marker

However, after saving, restarting and loading. Alt+{Left+Right} gets wonky: sometimes, it jumps to a marker location, but the marker name won't show up in the preview window.  At that point, I can also no longer delete the marker or jump to the next one (e.g., repeated Alt+Right do not go to the next marker but are stuck).  Depending on the marker, sometimes Alt+Right gets stuck, and sometimes Alt+Left gets stuck.

Hypothesis: the markers are saved as fractional times in the save file.  Round-tripping though the file causes rounding on the fractional time and none of the frames correspond exactly to the marker.  Hence, the marker becomes un-navigable.
Comment 1 Jean-Baptiste Mardelle 2017-07-17 11:57:16 UTC
Thanks for your report and detailled analysis. Could you attach or mail me a .kdenlive project file that has this isdue ? I could not reproduce from a blank project.
Comment 2 Martin Stolle 2017-07-17 19:41:16 UTC
Sure.

Project:
http://martin.stolle.name/files/buggy%20markers.kdenlive
Video:
http://martin.stolle.name/files/20170717-211845_P7170417.MOV

Looking at the clip in the clip monitor, I can jump from "In Point" to the first two markers with Alt+Right, each time showing the time as the marker's label.  When I hit Alt+Right for a third time, it jumps to the marker at 13:22, but no longer shows the marker's label.  Also, I cannot use Alt+Right another time to go to the fourth marker.  Doing <Right> to go to the next frame and then Alt+Right, I can go to the fourth marker.  The fourth marker also doesn't show any label, but I can still use Alt+Right to go to the fifth marker.  It also doesn't show a label and also doesn't let me skip to the end with Alt+Right.  Using Right to skip a frame, I can then use Alt+Right to go the end ("Out Point").

A similar but different story in reverse:
Starting from "Out Point", I can hit Alt+Left to go to the last marker (no label shown) and I can hit Alt+Left to go to the fourth marker.  However, then I can't go further - have to hit Left first to skip down a frame before I can use Alt+Left to go to the third marker marker. From the third marker (still no label shown), I can use Alt+Left to go to marker 2, marker 1 and the beginning.

In summary: a marker can be in one of three states:

1) working (label shown, I can navigate _from_ it in both direction)
2) not working, stuck when going right (no label shown, I can navigate _from_ it only when going left)
3) not working, suck when going left (no label show, I can naviate _from_ it only when going right).

I believe condition 2 is explained by a marker whose rounded time is slightly higher than the nearest frame.  When navigating to the time, the actual cursor gets rounded to a full frame, whose time is smaller than the marker.  Hence, when trying to go to the next higher marker, the "current" marker is still the next higher up marker by time.  Condition 3 is just the reverse.


Interestingly, navigating in the Project Monitor does not exhibit this behavior.
Comment 3 Jean-Baptiste Mardelle 2017-07-19 19:33:36 UTC
Git commit 832e699b52c0d094fee1f157772ca1d4154d7df1 by Jean-Baptiste Mardelle.
Committed on 19/07/2017 at 19:33.
Pushed by mardelle into branch 'Applications/17.08'.

Fix clip markers behavior broken on project opening

M  +3    -1    src/mltcontroller/clipcontroller.cpp

https://commits.kde.org/kdenlive/832e699b52c0d094fee1f157772ca1d4154d7df1