Bug 461957 - Subtitle UI can corrupt project file and cause Melt to crash
Summary: Subtitle UI can corrupt project file and cause Melt to crash
Status: RESOLVED NOT A BUG
Alias: None
Product: kdenlive
Classification: Applications
Component: Rendering & Export (other bugs)
Version First Reported In: 22.08.3
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Jean-Baptiste Mardelle
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-17 17:35 UTC by Lukas Winkler
Modified: 2022-11-17 18:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Winkler 2022-11-17 17:35:25 UTC
SUMMARY

(This was discussed in the Kdenlive Telegram channel and is summarized here)

One project (that coincidentally was right after updating Melt to 7.10.0) didn't export any more when parallel processing was enabled. The log didn't show any more details, but running melt on the .mlt file manually showed that it crashed with a segmentation fault. While debugging, I realized that a newer version of the project worked fine.
It turns out that some UI actions can get Kdenlive into a state where it stores 
```
<property name="kdenlive:docproperties.activeTrack">-2</property>
```
in the project and the .mlt file which causes melt to crash.

STEPS TO REPRODUCE

(This mostly happens when randomly doing some actions with the subtitle track, but I found one method that reproduces this reliably)

1. create an empty project
2. drag an srt file into the tracks and confirm the import
3. select the subtitle track
4. save (the project file is fine)
5. undo the import
6. select the subtitle track
7. save (now `activeTrack` is set to `-2` in the project file)

SOFTWARE/OS VERSIONS

Linux: Debian Testing
KDE Frameworks Version: 5.98.0
Qt Version: 5.56.6
Melt: 7.10.0 (with a patch for https://github.com/mltframework/mlt/issues/839 applied)

ADDITIONAL INFORMATION
Comment 1 Lukas Winkler 2022-11-17 17:48:50 UTC
This might be working as intended and something else is crashing melt:
https://t.me/kdenlive/60531
Comment 2 Lukas Winkler 2022-11-17 18:01:11 UTC
Indeed the actual issue is 
https://sourceforge.net/p/mlt/mailman/mlt-devel/thread/4783636.31r3eYUQgx%40six-yoga/