https://bugs.kde.org/show_bug.cgi?id=520081

--- Comment #4 from Jean-Baptiste Mardelle <[email protected]> ---
Git commit 51703a809c80076f2fc4883d0d1a788d509ac032 by Jean-Baptiste Mardelle,
on behalf of Erich Seifert.
Committed on 19/10/2026 at 11:33.
Pushed by mardelle into branch 'master'.

Fix render jobs staying "running" when their messages are split

Render jobs (kdenlive_render) send their progress and their result to Kdenlive
as JSON messages over a QLocalSocket. A local socket is a byte stream, so a
readyRead() signal can deliver only part of a message. RenderServer::jobSent()
collected the lines of a message in a local variable, so when the available
data ended inside a message, the part already read from the socket was dropped
and the rest caused a JSON parse error on the next readyRead().

This happens with the message sent when a render fails, which contains
everything the render process printed: on Linux, messages larger than about 200
KB arrive in several parts. The job then stayed in the running state, no error
was shown and the next queued job was never started.

Keep the received data per job until a message is complete, read what is left
when the job disconnects and delete the sockets of finished jobs, which were
never freed.

M  +47   -14   src/render/renderserver.cpp
M  +6    -0    src/render/renderserver.h
M  +1    -0    tests/CMakeLists.txt
A  +50   -0    tests/renderservertest.cpp     [License: GPL(3+eV) GPL(v3.0)]

https://invent.kde.org/multimedia/kdenlive/-/commit/51703a809c80076f2fc4883d0d1a788d509ac032

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to