Bug 483777 - Enabling Proxies Corrupts Timeline
Summary: Enabling Proxies Corrupts Timeline
Status: RESOLVED WORKSFORME
Alias: None
Product: kdenlive
Classification: Applications
Component: Video Display & Export (show other bugs)
Version: 24.02.0
Platform: Microsoft Windows Microsoft Windows
: VHI normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-16 17:21 UTC by Bob Wetzelheimer
Modified: 2024-04-25 03:46 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 Bob Wetzelheimer 2024-03-16 17:21:11 UTC
SUMMARY
When enabling proxies and saving again, the timing of edits I've made is lost, audio and video is desynchronized. It seems like it restarts subsequent cuts from the beginning sometimes.

 I can reproduce this using `big_buck_bunny_1080p_h264.mov`.

STEPS TO REPRODUCE
1. Add a clip to project
2. Cut it up using the razor and adjust the in and out timing by grabbing the edges of the clip
2. Save and exit
3. Open again. Loads correctly
4. Enable proxies for video clips
5. Save
6. Open. Timeline has been messed up, edits are lost, audio and video are de-synchronized

Sometimes after enabling proxies and before saving I have to make further changes to the project to get the corruption to occur.

OBSERVED RESULT
Edits to project are corrupted and lost

EXPECTED RESULT
Saving and opening a file should not change edits and timings

FILES
https://drive.google.com/drive/folders/1pWx7BG11qbjqFyKGocLsohcr7WYtrEcc?usp=sharing

- Screen recording reproducing issue
- Screenshots of timeline before/after (https://imgur.com/a/pMiR1L4)
- Project files before/after

SOFTWARE/OS VERSIONS

Edition	Windows 10 Pro
Version	22H2
Installed on	‎11/‎2/‎2020
OS build	19045.4170
Experience	Windows Feature Experience Pack 1000.19054.1000.0

ADDITIONAL INFORMATION
Comment 1 Bob Wetzelheimer 2024-03-16 18:49:22 UTC
I've been playing around with it and I can't reproduce it in 23.08.5
Comment 2 Jean-Baptiste Mardelle 2024-03-20 12:28:41 UTC
I can confirm the bug, thanks for your report! I am investigating...
Comment 3 Jean-Baptiste Mardelle 2024-03-22 10:50:10 UTC
Git commit 75be42a77c94b84ce0621122c5ee0923b0729b54 by Jean-Baptiste Mardelle.
Committed on 22/03/2024 at 10:47.
Pushed by mardelle into branch 'master'.

Ensure we never reset the locale while an MLT XML Consumer is running (it caused data corruption)

M  +2    -0    src/bin/bin.cpp
M  +1    -1    src/bin/binplaylist.cpp
M  +1    -0    src/bin/generators/generators.cpp
M  +6    -1    src/bin/projectclip.cpp
M  +0    -1    src/bin/projectfolder.cpp
M  +7    -2    src/bin/projectitemmodel.cpp
M  +1    -0    src/core.h
M  +1    -0    src/dialogs/timeremap.cpp
M  +2    -0    src/dialogs/wizard.cpp
M  +1    -0    src/doc/kdenlivedoc.cpp
M  +1    -0    src/mltcontroller/clipcontroller.cpp
M  +2    -1    src/project/projectmanager.cpp
M  +1    -0    src/timeline2/model/timelinefunctions.cpp
M  +1    -0    src/timeline2/model/timelinemodel.cpp

https://invent.kde.org/multimedia/kdenlive/-/commit/75be42a77c94b84ce0621122c5ee0923b0729b54
Comment 4 Jean-Baptiste Mardelle 2024-03-22 11:42:50 UTC
I think I might have found the root cause - a concurrency issue in our use of MLT that caused corruption when exporting to xml. However as this bug was not always reproducible for me, It would be very helpful if you could try out the latest devel build here to confirm if it also fixes the issue for you:
https://cdn.kde.org/ci-builds/multimedia/kdenlive/master/windows/
Comment 5 Jean-Baptiste Mardelle 2024-03-24 14:02:01 UTC
Git commit ac078f004298f42807e2a8beed476486ab96067a by Jean-Baptiste Mardelle.
Committed on 24/03/2024 at 13:51.
Pushed by mardelle into branch 'release/24.02'.

Ensure we never reset the locale while an MLT XML Consumer is running (it caused data corruption)

M  +2    -0    src/bin/bin.cpp
M  +1    -1    src/bin/binplaylist.cpp
M  +1    -0    src/bin/generators/generators.cpp
M  +6    -1    src/bin/projectclip.cpp
M  +0    -1    src/bin/projectfolder.cpp
M  +7    -2    src/bin/projectitemmodel.cpp
M  +1    -0    src/core.h
M  +1    -0    src/dialogs/timeremap.cpp
M  +2    -0    src/dialogs/wizard.cpp
M  +1    -0    src/doc/kdenlivedoc.cpp
M  +1    -0    src/mltcontroller/clipcontroller.cpp
M  +2    -1    src/project/projectmanager.cpp
M  +1    -0    src/timeline2/model/timelinefunctions.cpp
M  +1    -0    src/timeline2/model/timelinemodel.cpp

https://invent.kde.org/multimedia/kdenlive/-/commit/ac078f004298f42807e2a8beed476486ab96067a
Comment 6 Bob Wetzelheimer 2024-03-25 02:18:43 UTC
Thanks for the quick fix! 

I messed around with it for a bit and couldn't reproduce the issue with build 7748 / 2024-03-25 01:21
Comment 7 Bob Wetzelheimer 2024-03-25 02:39:26 UTC
However (and if you want me to open a new bug, let me know), I'm getting a crash every time I try and open any project file from Explorer. If I open them via File -> Open, they load fine. 

I uploaded a new video showing the issue to that folder I linked "opening_bug.mkv"
Comment 8 Bob Wetzelheimer 2024-03-25 02:43:37 UTC
To double check, I re-installed 24.02.0 and it doesn't crash on startup
Comment 9 Jean-Baptiste Mardelle 2024-03-26 05:23:41 UTC
Thanks for reporting the crash on project file opening, this should now also be fixed in the daily builds. Could you please check the daily builds to confirm?
Comment 10 Bug Janitor Service 2024-04-10 03:47:44 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 11 Bug Janitor Service 2024-04-25 03:46:27 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

Thank you for helping us make KDE software even better for everyone!