Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skin; crash on adding tracks while using a custom parallel_waveforms.xml #12580

Closed
mxmilkiib opened this issue Jan 15, 2024 · 8 comments
Closed

Comments

@mxmilkiib
Copy link
Contributor

mxmilkiib commented Jan 15, 2024

Bug Description

I have a custom Deere parallel_waveforms.xml that hides the waveforms of empty decks.

When I drag a track to deck 1, and then drag a track to deck 3 whilst the waveform for deck 1 is still being rendered out, it crashes.

trace;

[New Thread 0x7fff11ffb6c0 (LWP 195053)]
[New Thread 0x7fff117fa6c0 (LWP 195054)]
warning [Main] QPainter::begin: Paint device returned engine == 0, type: 3
warning [Main] QPainter::setRenderHint: Painter must be active to set rendering hints
warning [Main] QPainter::setMatrixEnabled: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::setOpacity: Painter not active
warning [Main] QPainter::setOpacity: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::fillPath: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::setOpacity: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::fillPath: Painter not active
warning [Main] QPainter::end: Painter not active, aborted
warning [Main] QPainter::begin: Paint device returned engine == 0, type: 3
warning [Main] QPainter::setMatrixEnabled: Painter not active
warning [Main] QPainter::setPen: Painter not active
warning [Main] QPainter::setRenderHint: Painter must be active to set rendering hints
warning [Main] QPainter::fillPath: Painter not active
warning [Main] QPainter::drawPath: Painter not active
warning [Main] QPainter::end: Painter not active, aborted

Thread 1 "mixxx" received signal SIGSEGV, Segmentation fault.
QOpenGLTexture::width (this=0x0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/opengl/qopengltexture.cpp:2958
Downloading source file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/opengl/qopengltexture.cpp

backtrace;

(gdb) backtrace
#0  QOpenGLTexture::width() const (this=0x0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/opengl/qopengltexture.cpp:2958
#1  0x0000555556483375 in  ()
#2  0x000055555649b3eb in  ()
#3  0x000055555649c24e in  ()
#4  0x00007ffff60097fe in QWindow::event(QEvent*) (this=0x5555912dfc90, ev=0x7fffffffd100) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/gui/kernel/qwindow.cpp:2495
#5  0x000055555649c50a in  ()
#6  0x00007ffff717319b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x5555912dfc90, e=0x7fffffffd100) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/widgets/kernel/qapplication.cpp:3296
#7  0x00007ffff1762a78 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x5555912dfc90, event=0x7fffffffd100) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qcoreapplication.cpp:1121
#8  0x00007ffff1762acd in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qcoreapplication.cpp:1553
#9  0x00007ffff5fa4104 in QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) (e=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/gui/kernel/qguiapplication.cpp:2707
#10 0x00007ffff6010c3c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/gui/kernel/qwindowsysteminterface.cpp:1109
#11 0x00007fffdc1b199f in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:57
#12 0x00007ffff521df69 in g_main_dispatch (context=0x7fffd4000ef0) at ../glib/glib/gmain.c:3476
#13 0x00007ffff527c367 in g_main_context_dispatch_unlocked (context=0x7fffd4000ef0) at ../glib/glib/gmain.c:4284
#14 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffd4000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#15 0x00007ffff521c162 in g_main_context_iteration (context=0x7fffd4000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#16 0x00007ffff199d074 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x55555699d300, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#17 0x00007ffff176cf5e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=..., this=0x7fffffffd430) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qeventloop.cpp:100
#18 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffffffd430, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qeventloop.cpp:182
#19 0x00007ffff1765518 in QCoreApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/global/qflags.h:74
#20 0x000055555595401a in  ()
#21 0x00007ffff0f4ccd0 in __libc_start_call_main (main=main@entry=0x5555559537d0, argc=argc@entry=1, argv=argv@entry=0x7fffffffd748) at ../sysdeps/nptl/libc_start_call_main.h:58
#22 0x00007ffff0f4cd8a in __libc_start_main_impl (main=0x5555559537d0, argc=1, argv=0x7fffffffd748, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffd738) at ../csu/libc-start.c:360
#23 0x0000555555952e95 in  ()

I had to kill gdb because that desktop totally froze up.

Version

2.5-alpha

OS

Arch btw

@mxmilkiib mxmilkiib added the bug label Jan 15, 2024
@mxmilkiib mxmilkiib changed the title Skin; crash while using a custom deck formatting and adding tracks Skin; crash on adding tracks while using a custom parallel_waveforms.xml Jan 15, 2024
@daschuer
Copy link
Member

It looks like you use a stripped version of Mixxx.
Can you install the mixxx symbols and repeat the crash? The alternative is to run Mixxx from the build directory using Debug or RelWithDebInfo build type.

@mxmilkiib
Copy link
Contributor Author

mxmilkiib commented Jan 16, 2024

Oops, I missed a PKGBUILD option even tough I had the build debug flags on.

Reproduced, with that theme file, by dragging a track to deck 2 then another to deck4.

Edit: or when I have tracks in 1 and 2 then drag one into 3, doh.

QOpenGLTexture::width (this=0x0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/opengl/qopengltexture.cpp:2958
2958	    return d->dimensions[0];                                                                                                                                                                                                                                           
(gdb) trace 
Tracepoint 1 at 0x7ffff77fc874: file /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/opengl/qopengltexture.cpp, line 2958.
(gdb) backtrace 
#0  QOpenGLTexture::width() const (this=0x0) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/opengl/qopengltexture.cpp:2958
#1  0x0000555556484d65 in allshader::WaveformRenderMark::paintGL() (this=0x5555978e6990) at /usr/include/c++/13.2.1/bits/unique_ptr.h:199
#2  0x000055555649cddb in allshader::WaveformWidget::paintGL() (this=<optimized out>) at /home/milk/pkgs/mixxx-git-debug/src/mixxx/src/waveform/widgets/allshader/waveformwidget.cpp:43
#3  0x000055555649dc3e in OpenGLWindow::resizeGL(int, int) (this=0x555590b85290, w=1, h=1) at /home/milk/pkgs/mixxx-git-debug/src/mixxx/src/widget/openglwindow.cpp:41
#4  0x00007ffff60097fe in QWindow::event(QEvent*) (this=0x555590b85290, ev=0x7fffffffd100) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/gui/kernel/qwindow.cpp:2495
#5  0x000055555649defa in OpenGLWindow::event(QEvent*) (this=0x555590b85290, pEv=0x7fffffffd100) at /home/milk/pkgs/mixxx-git-debug/src/mixxx/src/widget/openglwindow.cpp:61
#6  0x00007ffff717319b in QApplicationPrivate::notify_helper(QObject*, QEvent*) (this=<optimized out>, receiver=0x555590b85290, e=0x7fffffffd100) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/widgets/kernel/qapplication.cpp:3296
#7  0x00007ffff1762a78 in QCoreApplication::notifyInternal2(QObject*, QEvent*) (receiver=0x555590b85290, event=0x7fffffffd100) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qcoreapplication.cpp:1121
#8  0x00007ffff1762acd in QCoreApplication::sendSpontaneousEvent(QObject*, QEvent*) (receiver=<optimized out>, event=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qcoreapplication.cpp:1553
#9  0x00007ffff5fa4104 in QGuiApplicationPrivate::processGeometryChangeEvent(QWindowSystemInterfacePrivate::GeometryChangeEvent*) (e=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/gui/kernel/qguiapplication.cpp:2707
#10 0x00007ffff6010c3c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=flags@entry=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/gui/kernel/qwindowsysteminterface.cpp:1109
#11 0x00007fffdc1b199f in xcbSourceDispatch(GSource*, GSourceFunc, gpointer) (source=<optimized out>) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/plugins/platforms/xcb/qxcbeventdispatcher.cpp:57
#12 0x00007ffff521df69 in g_main_dispatch (context=0x7fffd4000ef0) at ../glib/glib/gmain.c:3476
#13 0x00007ffff527c367 in g_main_context_dispatch_unlocked (context=0x7fffd4000ef0) at ../glib/glib/gmain.c:4284
#14 g_main_context_iterate_unlocked.isra.0 (context=context@entry=0x7fffd4000ef0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../glib/glib/gmain.c:4349
#15 0x00007ffff521c162 in g_main_context_iteration (context=0x7fffd4000ef0, may_block=1) at ../glib/glib/gmain.c:4414
#16 0x00007ffff199d074 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x5555569aeb80, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qeventdispatcher_glib.cpp:393
#17 0x00007ffff176cf5e in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) (flags=..., this=0x7fffffffd430) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qeventloop.cpp:100
#18 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) (this=0x7fffffffd430, flags=...) at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/kernel/qeventloop.cpp:182
#19 0x00007ffff1765518 in QCoreApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/corelib/global/qflags.h:74
#20 0x00007ffff716fd1a in QApplication::exec() () at /usr/src/debug/qt6-base/qtbase-everywhere-src-6.6.1/src/widgets/kernel/qapplication.cpp:2574
#21 0x000055555595467a in (anonymous namespace)::runMixxx (args=<optimized out>, pApp=0x7fffffffd500) at /home/milk/pkgs/mixxx-git-debug/src/mixxx/src/main.cpp:107
#22 main(int, char**) (argc=<optimized out>, argv=<optimized out>) at /home/milk/pkgs/mixxx-git-debug/src/mixxx/src/main.cpp:237

@mxmilkiib
Copy link
Contributor Author

I redid the parallel waveforms file from scratch, no deck swapping, no attempt to hide deck 2, properly indented the XML, but still getting a crash on dragging or menu loading to deck 3 after dragging or menu loading to deck 1 n 2.

@ronso0
Copy link
Member

ronso0 commented Mar 31, 2024

I'll try to reproduce.

@ronso0
Copy link
Member

ronso0 commented Mar 31, 2024

I still can't reproduce it.

Which Qt version are you using?
Whic waveform type?
@m0dB Could you take a look please?

@mxmilkiib
Copy link
Contributor Author

mxmilkiib commented Mar 31, 2024

Latest release, 6.7. Three-band GLSL (haven't actually tried another, afk atm). Sometimes it works fine, sometimes (I think that's more with dragging to all decks though). Other times, the third waveform comes in but only 2/3, or 3/4 of it, or I can't see any of it (then ~5 second pause then crash). I tried making all the sizes 55 but no diff (think iirc I realised then it doesn't logically touch that part anyway).

@daschuer
Copy link
Member

daschuer commented Apr 2, 2024

It is crashing because allshader::WaveformRenderMark::m_pPlayPosMarkTexture; is null. This happens if paintGL() is called before initializeGL().
I don't know how it happens, but you gave the evidence that it happens. So let's add a guard for that.

@daschuer
Copy link
Member

daschuer commented Apr 3, 2024

the fix is here: #13043

@daschuer daschuer added this to the 2.4.1 milestone Apr 14, 2024
@ronso0 ronso0 closed this as completed Apr 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants