Detaching Timeline Crashes Shotcut (Ubuntu 18.04)

Hi!

I just installed Ubuntu 18.04 and Shotcut (in all forms: snap, AppImage, Tar) and when I detach the timeline the program crashes.

This is the command line output:

[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:86:20: Unable to assign [undefined] to double
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:85:19: Unable to assign [undefined] to QString
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:84:22: Unable to assign [undefined] to int
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:83:21: Unable to assign [undefined] to int
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:87:25: Unable to assign [undefined] to QString
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:78:27: Unable to assign [undefined] to bool
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:76:22: Unable to assign [undefined] to bool
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:75:23: Unable to assign [undefined] to int
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:74:22: Unable to assign [undefined] to int
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:73:25: Unable to assign [undefined] to QString
[Warning] <> file:///opt/Shotcut/Shotcut.app/share/shotcut/qml/timeline/Track.qml:71:27: Unable to assign [undefined] to QString
Segmentation fault (core dumped)

And this is the “strace” output:

[{WIFSIGNALED(s) && WTERMSIG(s) == SIGSEGV && WCOREDUMP(s)}], 0, NULL) = 25775
— SIGCHLD {si_signo=SIGCHLD, si_code=CLD_DUMPED, si_pid=25775, si_uid=1000, si_status=SIGSEGV, si_utime=96, si_stime=39} —
rt_sigreturn({mask=[]}) = 25775
write(2, “Segmentation fault (core dumped)”…, 33Segmentation fault (core dumped)
) = 33
read(10, “”, 8192) = 0
exit_group(139) = ?
+++ exited with 139 +++

Let’s see how can we solve it! :smiley:

Edit: More info.

-Trying to move the Timeline to another location on the layout also crashes the program.

-I’ve tried changing from OpenGL to Software rendering with the same results.

-I’ve changed the theme with the same results.

-I’ve changed the layout testing all the combinations with the same results.

I do not reproduce it on Ubuntu 19.10 even while the timeline is playing. strace output will not help, but a gdb backtrace might.

Ok! I just used GDB with shotcut and this is what it throws when I detach the timeline and crashes:

Thread 1 “shotcut” received signal SIGSEGV, Segmentation fault.
0x00007ffff705bc74 in QSGDefaultDistanceFieldGlyphCache::~QSGDefaultDistanceFieldGlyphCache() () from /opt/Shotcut/Shotcut.app/lib/libQt5Quick.so.5
(gdb)

That is what I was suspected. It is somewhere deep in the Qt’s OpenGL scene graph. I am surprised that it did not go away when choosing software OpenGL although that I suppose that could fail depending on the Mesa llvmpipe library installed on your system since on Linux all that does is set an environment variable. To confirm, after you choose this mode, choose View > Application Log… and look for all messages related to OpenGL. You should find something like this:

[Info   ] <Mlt::GLWidget::initializeGL> OpenGL vendor "VMware, Inc." 
[Info   ] <Mlt::GLWidget::initializeGL> OpenGL renderer "llvmpipe (LLVM 9.0, 256 bits)" 

I found this related unresolved bug report. It has a workaround. After the 20.02 release, I will try to apply the workaround it mentions and give you a nightly build to test.

https://bugreports.qt.io/browse/QTBUG-62443

1 Like

Thanks for the future workaround.

I copy here the pieces of code that reference OpenGL when I change the display Method to “Software (Mesa)”:

[Info ] GLTestWidget::GLTestWidget OpenGL context version 4 6
[…]
[Info ] Mlt::GLWidget::initializeGL OpenGL vendor “NVIDIA Corporation”
[Info ] Mlt::GLWidget::initializeGL OpenGL renderer “GeForce GTX 1060 3GB/PCIe/SSE2”
[Info ] Mlt::GLWidget::initializeGL OpenGL threaded? true
[Info ] Mlt::GLWidget::initializeGL OpenGL ES? false

And this when I set this back to OpenGL:

[Info ] GLTestWidget::GLTestWidget OpenGL context version 4 6
[…]
[Info ] Mlt::GLWidget::initializeGL OpenGL vendor “NVIDIA Corporation”
[Info ] Mlt::GLWidget::initializeGL OpenGL renderer “GeForce GTX 1060 3GB/PCIe/SSE2”
[Info ] Mlt::GLWidget::initializeGL OpenGL threaded? true
[Info ] Mlt::GLWidget::initializeGL OpenGL ES? false

They are both the same :hushed:

I attach both logs here:

shotcutlog_opengl.txt (27.9 KB) shotcutlog_software.txt (27.8 KB)

It seems the nvidia driver does not respect the environment variable LIBGL_ALWAYS_SOFTWARE that Shotcut uses. If you try to install Mesa OpenGL through a package, it will most likely remove your nvidia driver or at least break it. You can do a web search on “linux nvidia LIBGL_ALWAYS_SOFTWARE” to read more.

Also, I am surprised to see you have this problem with the nvidia driver. For the first 5 years of Shotcut development, I primarily used Linux with the nvidia binary driver, and I did not have this issue.

I applied the workaround suggested in the Qt bug. Can you please test the build here? This is in portable tar format only.

It Works!!! Thanks!!! At least I can detach the Timeline. I will test it during this afternoon. Thank you!!!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.