Skip to content

melt segfaults at end of program execution #1175

@andrewpillar

Description

@andrewpillar

Describe the bug

mlt segfaults at the end of the program execution, whether the command melt is executed itself, or is given additional parameters.

To Reproduce

Steps to reproduce the behavior:

  1. Run melt as a standalone command.

Expected behavior

When run without arguments, for it to print out usage information and exit cleanly. When run with arguments, for it to render the video as specified via the given script file.

Desktop (please complete the following information):

  • OS: Arch
  • OS Version 6.17.8-arch1-1
  • MLT/melt version: 7.34.1

Additional context

I first noticed this when trying to render a video in Kdenlive. From further investigation I found that mlt is segfaulting when run. The command that was being run from Kdenlive to render the video was,

$ melt -loglevel verbose -progress2 ~/Videos/kdenlive-renderqueue/export-1.mlt

Running this exact same command results in a segfault near the end of the program's execution,

[libx264 @ 0x7fe290201a00] i8c dc,h,v,p: 100%  0%  0%  0%
[libx264 @ 0x7fe290201a00] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x7fe290201a00] kb/s:223.17
[aac @ 0x7fe290202cc0] Qavg: 65536.000
[AVIOContext @ 0x7fe29038ba80] Statistics: 842396 bytes written, 4 seeks, 7 writeouts

[1]    37542 segmentation fault (core dumped)  melt -loglevel verbose -progress2 ~/Videos/kdenlive-renderqueue/export-1.mlt

Even running melt with no arguments results in a similar error,

$ melt
...
  -timings                                 Set the logging level to timings
  -version                                 Show the version and copyright
  -video-track | -hide-audio               Add a video-only track
For more help: <https://www.mltframework.org/>
[1]    46685 segmentation fault (core dumped)  melt

From running melt under GDB I was able to get the following backtrace,

[~]$ gdb melt
GNU gdb (GDB) 16.3
Copyright (C) 2024 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<https://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from melt...
(gdb) r
Starting program: /usr/bin/melt
Usage: melt [options] [producer [name=value]* ]+
Options:
  -attach filter[:arg] [name=value]*       Attach a filter to the output
  -attach-cut filter[:arg] [name=value]*   Attach a filter to a cut
  -attach-track filter[:arg] [name=value]* Attach a filter to a track
  -attach-clip filter[:arg] [name=value]*  Attach a filter to a producer
  -audio-track | -hide-video               Add an audio-only track
  -blank frames                            Add blank silence to a track
  -chain id[:arg] [name=value]*            Add a producer as a chain
  -consumer id[:arg] [name=value]*         Set the consumer (sink)
  -debug                                   Set the logging level to debug
  -filter filter[:arg] [name=value]*       Add a filter to the current track
  -getc                                    Get keyboard input using getc
  -group [name=value]*                     Apply properties repeatedly
  -help                                    Show this message
  -jack                                    Enable JACK transport synchronization
  -join clips                              Join multiple clips into one cut
  -link id[:arg] [name=value]*             Add a link to a chain
  -loglevel "quiet" | "panic" | "fatal" |  Set the logging level (least to most)
            "error" | "warning" | "info" | "verbose" | "debug" | "timings"
  -mix length                              Add a mix between the last two cuts
  -mixer transition                        Add a transition to the mix
  -null-track | -hide-track                Add a hidden track
  -profile name                            Set the processing settings
  -progress                                Display progress along with position
  -progress2                               Display progress along with position on a new line
  -query                                   List all of the registered services
  -query "consumers" | "consumer"=id       List consumers or show info about one
  -query "filters" | "filter"=id           List filters or show info about one
  -query "links" | "link"=id               List links or show info about one
  -query "producers" | "producer"=id       List producers or show info about one
  -query "transitions" | "transition"=id   List transitions, show info about one
  -query "profiles" | "profile"=id         List profiles, show info about one
  -query "presets" | "preset"=id           List presets, show info about one
  -query "formats"                         List audio/video formats
  -query "audio_codecs"                    List audio codecs
  -query "video_codecs"                    List video codecs
  -quiet                                   Set the logging level to quiet
  -remove                                  Remove the most recent cut
  -repeat times                            Repeat the last cut
  -repository path                         Set the directory of MLT modules
  -serialise [filename]                    Write the commands to a text file
  -setlocale                               Make numeric strings locale-sensitive
  -silent                                  Do not display position/transport
  -split relative-frame                    Split the last cut into two cuts
  -swap                                    Rearrange the last two cuts
  -track                                   Add a track
  -transition id[:arg] [name=value]*       Add a transition
  -verbose                                 Set the logging level to verbose
  -timings                                 Set the logging level to timings
  -version                                 Show the version and copyright
  -video-track | -hide-audio               Add a video-only track
For more help: <https://www.mltframework.org/>
[Thread 0x7fffd79ff6c0 (LWP 36593) exited]

Thread 1 "melt" received signal SIGSEGV, Segmentation fault.
0x00007ffff056a5f8 in QCoreApplication::notifyInternal2 (receiver=0x55555556f970, event=0x7fffffffdb50)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
1109	    return qApp->notify(receiver, event);
(gdb) 
(gdb) bt -full 16
#0  0x00007ffff056a5f8 in QCoreApplication::notifyInternal2 (receiver=0x55555556f970, event=0x7fffffffdb50)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1109
        d = <optimized out>
        threadData = 0x55555594bfe0
        selfRequired = <optimized out>
        result = false
        cbdata = {0x55555556f970, 0x7fffffffdb50, 0x7fffffffdaef}
        scopeLevelCounter = {threadData = 0x55555594bfe0}
#1  0x00007ffff05c532b in QCoreApplication::sendEvent (receiver=<optimized out>, event=0x7fffffffdb50)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qcoreapplication.cpp:1549
No locals.
#2  QObjectPrivate::setParent_helper (this=0x555555ab1140, o=0x0) at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:2255
        e = {<QEvent> = {_vptr.QEvent = 0x7ffff0a25f28 <vtable for QChildEvent+16>, static staticMetaObject = {d = {superdata = {direct = 0x0}, 
                stringdata = 0x7ffff08df568 <QEvent::qt_staticMetaObjectStaticContent<(anonymous namespace)::qt_meta_tag_ZN6QEventE_t>+1512>, 
                data = 0x7ffff08def80 <QEvent::qt_staticMetaObjectStaticContent<(anonymous namespace)::qt_meta_tag_ZN6QEventE_t>>, static_metacall = 0x0, 
                relatedMetaObjects = 0x0, 
                metaTypes = 0x7ffff0a26180 <QEvent::qt_staticMetaObjectRelocatingContent<(anonymous namespace)::qt_meta_tag_ZN6QEventE_t>>, 
                extradata = 0x0}}, t = 71, m_posted = false, m_spont = false, m_accept = true, m_unused = false, m_reserved = 0, m_inputEvent = 0, 
            m_pointerEvent = 0, m_singlePointEvent = 0}, c = 0x5555559599b0}
        index = <optimized out>
        parentD = 0x555555718730
        q = <optimized out>
        __PRETTY_FUNCTION__ = <optimized out>
#3  0x00007ffff05c316c in QObject::~QObject (this=<optimized out>, this=<optimized out>)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/kernel/qobject.cpp:1128
        d = <optimized out>
        sharedRefcount = <optimized out>
        cd = <optimized out>
        d = <optimized out>
        sharedRefcount = <optimized out>
        cd = <optimized out>
        ownThread = <optimized out>
        privThread = <optimized out>
        signalSlotMutex = <optimized out>
        locker = <optimized out>
        receiverCount = <optimized out>
        signal = <optimized out>
        connectionList = <optimized out>
        c = <optimized out>
        m = <optimized out>
        needToUnlock = <optimized out>
        node = <optimized out>
        sender = <optimized out>
        m = <optimized out>
        needToUnlock = <optimized out>
        senderData = <optimized out>
        slotObj = <optimized out>
        locksAreTheSame = <optimized out>
#4  0x00007fffd7e17385 in QtWaylandClient::QWaylandGlibEventDispatcher::~QWaylandGlibEventDispatcher (this=<optimized out>, this=<optimized out>)
    at /usr/src/debug/qt6-base/build/src/plugins/platforms/wayland/WaylandClient_autogen/EWIEGA46WW/../../../../../../../qtbase/src/plugins/platforms/wayland/qwaylandeventdispatcher_p.h:55
No locals.
#5  QtWaylandClient::QWaylandGlibEventDispatcher::~QWaylandGlibEventDispatcher (this=<optimized out>, this=<optimized out>)
    at /usr/src/debug/qt6-base/build/src/plugins/platforms/wayland/WaylandClient_autogen/EWIEGA46WW/../../../../../../../qtbase/src/plugins/platforms/wayland/qwaylandeventdispatcher_p.h:55
No locals.
#6  0x00007ffff072e13f in operator() (__closure=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:492
        d = 0x5555558f0e10
        locker = {m_mutex = <optimized out>, m_isLocked = false}
        eventDispatcher = 0x5555559599b0
        this = <optimized out>
#7  (anonymous namespace)::terminate_on_exception<QThreadPrivate::cleanup()::<lambda()> >(struct {...} &&) (t=...)
    at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:367
No locals.
#8  0x00007ffff07308d8 in QThreadPrivate::cleanup (this=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:475
No locals.
#9  destroy_current_thread_data (data=<optimized out>) at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:174
        thread_p = <optimized out>
        thread = <optimized out>
#10 (anonymous namespace)::QThreadDataDestroyer::EarlyMainThread::~EarlyMainThread (this=<optimized out>, this=<optimized out>)
--Type <RET> for more, q to quit, c to continue without paging--
    at /usr/src/debug/qt6-base/qtbase/src/corelib/thread/qthread_unix.cpp:232
        data = <optimized out>
        data = <optimized out>
#11 0x00007ffff7c40c71 in __run_exit_handlers (status=1, listp=0x7ffff7e08680 <__exit_funcs>, run_list_atexit=run_list_atexit@entry=true, 
    run_dtors=run_dtors@entry=true) at exit.c:118
        atfct = <optimized out>
        onfct = <optimized out>
        cxafct = <optimized out>
        arg = <optimized out>
        f = <optimized out>
        new_exitfn_called = 804
        cur = 0x555555718b30
        restart = <optimized out>
#12 0x00007ffff7c40d4e in __GI_exit (status=<optimized out>) at exit.c:148
No locals.
#13 0x00007ffff7c2763c in __libc_start_call_main (main=main@entry=0x555555556020 <main>, argc=argc@entry=1, argv=argv@entry=0x7fffffffde88)
    at ../sysdeps/nptl/libc_start_call_main.h:74
        result = <optimized out>
        unwind_buf = {cancel_jmp_buf = {{jmp_buf = {0, -326869677258909579, 140737488346760, 1, 140737354125312, 93824992262872, -326869677349087115, 
                -326887306860636043}, mask_was_saved = 0}}, priv = {pad = {0x0, 0x0, 0x0, 0x7fffffffde88}, data = {prev = 0x0, cleanup = 0x0, 
              canceltype = 0}}}
        not_first_call = <optimized out>
#14 0x00007ffff7c276e9 in __libc_start_main_impl (main=0x555555556020 <main>, argc=1, argv=0x7fffffffde88, init=<optimized out>, fini=<optimized out>, 
    rtld_fini=<optimized out>, stack_end=0x7fffffffde78) at ../csu/libc-start.c:360
No locals.
#15 0x0000555555557e45 in _start ()
No symbol table info available.

Below is the package details of mlt installed on my system,

[~]$ pacman -Qi mlt 
Name            : mlt
Version         : 7.34.1-1
Description     : An open source multimedia framework
Architecture    : x86_64
URL             : https://www.mltframework.org
Licenses        : LGPL-2.1-only
Groups          : None
Provides        : None
Depends On      : gcc-libs  glibc  libebur128
Optional Deps   : ffmpeg: ffmpeg plugin [installed]
                  fftw: plus plugin [installed]
                  fontconfig: gdk plugin [installed]
                  frei0r-plugins: for additional effects [installed]
                  gdk-pixbuf2: gdk plugin [installed]
                  glib2: gdk plugin [installed]
                  jack: JACK sound output plugin [installed]
                  ladspa: LADSPA plugins [installed]
                  libepoxy: opengl plugin [installed]
                  libexif: auto rotate plugin [installed]
                  libglvnd: opengl plugin [installed]
                  libsamplerate: libavresample plugin [installed]
                  libvorbis: vorbis plugin [installed]
                  libx11: SDL1 plugin [installed]
                  libxml2: XML plugin [installed]
                  movit: opengl plugin [installed]
                  opencv: openCV plugin [installed]
                  qt5-base: QT5 plugins [installed]
                  qt5-svg: Qt5 plugins [installed]
                  qt6-base: Qt6 plugin [installed]
                  qt6-5compat: Qt6 plugin [installed]
                  qt6-svg: Qt6 plugin [installed]
                  pango: gdk plugin [installed]
                  python: python bindings [installed]
                  rtaudio: rtaudio plugin [installed]
                  rubberband: audio pitch plugin [installed]
                  sdl2: SDL2 plugin [installed]
                  sdl_image: SDL1 plugin [installed]
                  sdl12-compat: SDL1 plugin [installed]
                  sox: SOX (Audio Swiss Army Knife) plugin [installed]
                  vid.stab: video stabilize plugin [installed]
                  zlib: glaxnimate plugin [installed]
Required By     : kdenlive  shotcut
Optional For    : None
Conflicts With  : None
Replaces        : None
Installed Size  : 9.68 MiB
Packager        : Antonio Rojas <arojas@archlinux.org>
Build Date      : Wed 05 Nov 2025 17:15:43 GMT
Install Date    : Tue 25 Nov 2025 09:21:29 GMT
Install Reason  : Explicitly installed
Install Script  : No
Validated By    : Signature

I've looked around the Internet and haven't come across anyone else experiencing a similar error, so I have a feeling the problem might be with my system and the libraries I have installed, though I don't know what. I first noticed this error after doing a system upgrade, so this only furthers my suspicions about the problem being with something on my end.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions