You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
On Manjaro (unstable branch) and apparently Archlinux in general, the update to mlt 6.8.0 (and also python2 to 2.7.15 seems to have broken flowblade.
More details on the segfault here
Reacted by Daniel Canelhas, Jacob Kauffmann, benrob0329, Alexandre F., kuboosoft, Irtaza and Anтo
The first clue is near the beginning of the file flowblade-f28-backtrace.txt:
=====
Thread 1 "python" received signal SIGSEGV, Segmentation fault.
__GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:65
65 unsigned int type = PTHREAD_MUTEX_TYPE_ELISION (mutex);
=====
so the immediate problem is that 'mutex' is a null pointer ("mutex=0x0"), which pthread_mutex_lock() tried to de-reference.
A more-complete clue is in the last portion of the file where "Thread 1" is examined more thoroughly:
=====
Thread 1 (Thread 0x7ffff7fbf4c0 (LWP 63747)):
#0 0x00007ffff776fca0 in __GI___pthread_mutex_lock (mutex=0x0) at ../nptl/pthread_mutex_lock.c:65
#1 0x00007fffe1ebaf7e in XrmQGetResource (db=0x55555601a1f0, names=names@entry=0x7fffffff8ab0, classes=classes@entry=0x7fffffff8abc, pType=pType@entry=0x7fffffff8a9c, pValue=pValue@entry=0x7fffffff8aa0) at Xrm.c:2549
#2 0x00007fffe1e96d5a in XGetDefault (dpy=dpy@entry=0x555555a08c00, prog=prog@entry=0x7fffe1a28281 "Xft", name=name@entry=0x7fffe1a298d4 "antialias") at GetDflt.c:231
#3 0x00007fffe19dbb36 in get_boolean_default (value=<synthetic pointer>, option=0x7fffe1a298d4 "antialias", dpy=0x555555a08c00) at cairo-xlib-screen.c:146
#4 0x00007fffe19dbb36 in _cairo_xlib_init_screen_font_options (info=0x5555561a0160, dpy=0x555555a08c00) at cairo-xlib-screen.c:146 <<snip>>
=====
which shows a call chain with source files and line numbers.
Some environment parameter to the locking protocol for Resources (perhaps specifically: screen fonts) was left unspecified.
If that is not enough of a hint, then you might try running under 'rr' ( https://rr-project.org )
which enables "executing backwards" from the point of the SIGSEGV, and even re-running the *EXACT* same execution many times under control of gdb.
This removes variability due to timing, and supports reliable debugging using repeated divide-and-conquer (guess-and-verify).
If it isn't the naive "no SDL 1.2" thing we need to bisect MLT to find the offending commit and do/request changes. I've been through this dance 4-5 times already, and it usually takes several weeks to get done.
With the Archlinux mlt at least there hasn't been any change about the way it is compiled at least. They only bumped version from 6.6.0 to 6.8.0 and their build options where identical with the previous (flowblade compatibel) version:
Archlinux lists as optional dependency: optdepends=('sdl_image: SDL1 plugin'
which gives the impression that sdl 1 should be supported. I also have that package installed.
This is not probably a MLT build issue, but more likely a threading issue in SDL audio caused by a patch in MLT. There are some patches that work on this area, so the cause is probably in one on them. I'll get back in this in next few weeks after I have completed my current workflow update work. The probable patches causing this:
No luck. Reverting both the May commits doesn't help. Even the git-snapshot before the March 25 commit has the same problem.
So the relevant change happened before mltframework/mlt@4796172
Maybe I'll find time in the next days to do a proper bisect...
I reproduced the crash. Removing the call to XInitThreads in the MLT qt module did not fix it.
Changing mlt/share/core/loader.dict to "*.png=pixbuf,qimage" allows Flowblade to start, but it will crash when trying to open a JPEG image (due to using qimage). Likewise, a .txt file rendered by qtext producer instead of pango makes it crash. Removing libmltqt.so lets it all work. It seems Qt 5 may be fundamentally unusable in a GTK app (at least within MLT or failing to create QApplication on the main thread). Do you use any qt-based filters in Flowblade such as audiospectrum, lightshow, or qtblend? I think the safest solution may be a way for an app to ban MLT modules at runtime. Reverting the change to loader.dict is more superficial and still allows an incompatible module to somehow get used (e.g. pixbuf or pango fails to load a corrupt file).
No, (to my knowledge) Flowblade does not use any Qt filters and MLT providing API to ban loading QT modules would be acceptable solution for Flowblade.
We should then also make sure that all Qt dependent functionality is well contained in as few modules as possible so that maximum amount of functionality continues to be available to Flowblade, e.g. "plus" and "plusgpl" modules should not contain any Qt dependent code.
The following change to Flowblade works for me to ban all Qt producers. The only way that a Qt-based filter or transition would be introduced is by loading a MLT XML, which I see Flowblade prevents.
diff --git a/flowblade-trunk/Flowblade/app.py b/flowblade-trunk/Flowblade/app.py
index e7b9fb33..5c2b3630 100644
--- a/flowblade-trunk/Flowblade/app.py
+++ b/flowblade-trunk/Flowblade/app.py
@@ -250,6 +250,9 @@ def main(root_path):
# Init MLT framework
repo = mlt.Factory().init()
+ repo.producers().set('qimage', None, 0)
+ repo.producers().set('qtext', None, 0)
+ repo.producers().set('kdenlivetitle', None, 0)
# Set numeric locale to use "." as radix, MLT initilizes this to OS locale and this causes bugs
locale.setlocale(locale.LC_NUMERIC, 'C')
If you want a new API added to MLT to alter the module preference and revert the above-mentioned loader.dict change, I can do that. This change would leave pixbuf and pango as preferred and require Shotcut to call the new API to prefer Qt services. However, as I said, that is less safe than the banning change above.
@oberon-manjaro Great, since KDEnlive people probably do not like downgrading MLT and next Flowblade version is coming in September the intermediate solution is to patch Flowblade in affedcted distros by adding these three lines 495a10c Dan's diff above may work on 1.16 too, not sure.
@ddennedy Thanks for input and patch, this is good enough now. I probably do not even want to make Flowblade itself depend on Qt, even if MLT does.
I'm leaving this open for info for the time being.
That's what I actually did. I applied the patch to the latest stable tarball.
So that's what I am going to do now. Add the patch in the AUR and remove the mlt patch in Manjaro 😄
Activity
martinkg commentedon May 19, 2018
same here on Fedora 28 with mlt-6.8.0
MLT found, version: 6.8.0
numpy version: 1.14.3
OS: Fedora 28 (Workstation Edition)
Python 2.7.15 (default, May 2 2018, 14:12:52)
[GCC 8.0.1 20180324 (Red Hat 8.0.1-0.20)]
GTK+ version: 3.22.30
eszlari commentedon May 19, 2018
I see no crash with flatpak. The flatpak version uses:
iskarf commentedon May 20, 2018
I have Flowblade running on two machines:
I can run without problem Flowblade on my server, using X11 Forwarding:
But I get a segmentation fault on my desktop:
Bot use the same versions of libraries:
I didn't know that a Flatpak was available for Flowblade. I just installed it, and everything works like a charm 😃
criztovyl commentedon May 20, 2018
Not sure if a backtrace would help, but could you provide one?
Start
flowbladeusinggdb flowblade, then typerunto start flowblade. After segfault typebtto get a backtrace.Attaching it via a Gist might be better, reduces scrolling around in the issue. ^^
martinkg commentedon May 20, 2018
backtrace information of Fedora 28 with mlt-6.8.0:
flowblade-f28-backtrace.txt
freemanfromgodotengine commentedon May 21, 2018
The same (or similar) here. I updated Manjaro stable - so mlt 6.8.0 is here and this happened to Flowblade:
martinkg commentedon May 29, 2018
the feedback i got from fedora mailinglist regarding the posted flowblade backtrace (backtrace information of Fedora 28 with mlt-6.8.0:):
flowblade-f28-backtrace.txt
jliljebl commentedon Jun 1, 2018
Its the SDL thing again probably, will try to look this soon.
Has MLT been compiled with SDL1.2 support, see here: https://github.com/jliljebl/flowblade/blob/master/flowblade-trunk/docs/SDL_2_AND_MLT_6_6_0.md
jliljebl commentedon Jun 2, 2018
If it isn't the naive "no SDL 1.2" thing we need to bisect MLT to find the offending commit and do/request changes. I've been through this dance 4-5 times already, and it usually takes several weeks to get done.
oberon-manjaro commentedon Jun 2, 2018
With the Archlinux mlt at least there hasn't been any change about the way it is compiled at least. They only bumped version from 6.6.0 to 6.8.0 and their build options where identical with the previous (flowblade compatibel) version:
oberon-manjaro commentedon Jun 2, 2018
Archlinux lists as optional dependency:
optdepends=('sdl_image: SDL1 plugin'which gives the impression that sdl 1 should be supported. I also have that package installed.
martinkg commentedon Jun 14, 2018
on Fedora mlt was compiled against SDL1 and SDL2
installed versions:
how far is the status with the troubleshooting ?
jliljebl commentedon Jun 15, 2018
This is not probably a MLT build issue, but more likely a threading issue in SDL audio caused by a patch in MLT. There are some patches that work on this area, so the cause is probably in one on them. I'll get back in this in next few weeks after I have completed my current workflow update work. The probable patches causing this:
mltframework/mlt@b199c89
mltframework/mlt@f06a6df
mltframework/mlt@e647ae3
oberon-manjaro commentedon Jun 15, 2018
I will try reverting these patches and see if that helps.
oberon-manjaro commentedon Jun 15, 2018
No luck. Reverting both the May commits doesn't help. Even the git-snapshot before the March 25 commit has the same problem.
So the relevant change happened before mltframework/mlt@4796172
Maybe I'll find time in the next days to do a proper bisect...
7 remaining items
ddennedy commentedon Jul 11, 2018
Should Flowblade call XiniThreads()? Shotcut does.
EDIT: I see now that
Qt::AA_X11InitThreadsis "This value is obsolete and has no effect."jliljebl commentedon Jul 11, 2018
So calling XinitThreads from Flowblade will not fix this because it was noop in Shotcut?
ddennedy commentedon Jul 11, 2018
I reproduced the crash. Removing the call to
XInitThreadsin the MLT qt module did not fix it.Changing mlt/share/core/loader.dict to "*.png=pixbuf,qimage" allows Flowblade to start, but it will crash when trying to open a JPEG image (due to using qimage). Likewise, a
.txtfile rendered by qtext producer instead of pango makes it crash. Removing libmltqt.so lets it all work. It seems Qt 5 may be fundamentally unusable in a GTK app (at least within MLT or failing to create QApplication on the main thread). Do you use any qt-based filters in Flowblade such as audiospectrum, lightshow, or qtblend? I think the safest solution may be a way for an app to ban MLT modules at runtime. Reverting the change to loader.dict is more superficial and still allows an incompatible module to somehow get used (e.g. pixbuf or pango fails to load a corrupt file).jliljebl commentedon Jul 11, 2018
No, (to my knowledge) Flowblade does not use any Qt filters and MLT providing API to ban loading QT modules would be acceptable solution for Flowblade.
We should then also make sure that all Qt dependent functionality is well contained in as few modules as possible so that maximum amount of functionality continues to be available to Flowblade, e.g. "plus" and "plusgpl" modules should not contain any Qt dependent code.
ddennedy commentedon Jul 11, 2018
The following change to Flowblade works for me to ban all Qt producers. The only way that a Qt-based filter or transition would be introduced is by loading a MLT XML, which I see Flowblade prevents.
If you want a new API added to MLT to alter the module preference and revert the above-mentioned loader.dict change, I can do that. This change would leave pixbuf and pango as preferred and require Shotcut to call the new API to prefer Qt services. However, as I said, that is less safe than the banning change above.
jliljebl commentedon Jul 11, 2018
I applied the patch.
To @oberon-manjaro et. al, does repository Flowblade work with your system MLT?
oberon-manjaro commentedon Jul 12, 2018
It's working, indeed with the standard upstream MLT!
jliljebl commentedon Jul 12, 2018
@oberon-manjaro Great, since KDEnlive people probably do not like downgrading MLT and next Flowblade version is coming in September the intermediate solution is to patch Flowblade in affedcted distros by adding these three lines 495a10c Dan's diff above may work on 1.16 too, not sure.
@ddennedy Thanks for input and patch, this is good enough now. I probably do not even want to make Flowblade itself depend on Qt, even if MLT does.
I'm leaving this open for info for the time being.
oberon-manjaro commentedon Jul 12, 2018
That's what I actually did. I applied the patch to the latest stable tarball.
So that's what I am going to do now. Add the patch in the AUR and remove the mlt patch in Manjaro 😄
binli commentedon Jul 27, 2018
The patch worked for me in latest Debian buster/sid.
kuboosoft commentedon Jul 28, 2018
Patch works in Fedora. Thanks
fenio commentedon Aug 15, 2018
I've just uploaded patched version to Debian unstable aka sid.
jliljebl commentedon Aug 30, 2018
I'm labeling this fixed but leaving open for the time being to see of there are further developments.