Open pgervais opened 11 months ago
thanks, any chance you could build score with debug symbols? (-DCMAKE_BUILD_TYPE=Debug and no stripping). Here on ArchLinux the window correctly closes when deleting the device from the device explorer :|
Here's what GDB prints (I think it's the code at version v3.1.11).
The code in WindowDevice.cpp doesn't seem to have changed since v3.1.11 so far. The faulty line is
if(const auto& w = m_screen->window())
and gdb does not seem to be able to print the value of m_screen, which is consistent with something going wrong with the pointer.
#0 Gfx::window_device::window_device(std::unique_ptr<ossia::net::protocol_base, std::default_delete<ossia::net::protocol_base> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(QPointF, QPointF)#3}::operator()(QPointF, QPointF) const (__closure=0x55555b785120, screen=..., win=...)
at /onyx/home/pgervais/prog/ossia-score/src/plugins/score-plugin-gfx/Gfx/WindowDevice.cpp:137
#1 0x0000555556f57c2f in std::__invoke_impl<void, Gfx::window_device::window_device(std::unique_ptr<ossia::net::protocol_base, std::default_delete<ossia::net::protocol_base> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(QPointF, QPointF)#3}&, QPointF, QPointF>(std::__invoke_other, Gfx::window_device::window_device(std::unique_ptr<ossia::net::protocol_base, std::default_delete<ossia::net::protocol_base> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(QPointF, QPointF)#3}&, QPointF&&, QPointF&&) (__f=...) at /usr/include/c++/12/bits/invoke.h:61
#2 0x0000555556f3864f in std::__invoke_r<void, Gfx::window_device::window_device(std::unique_ptr<ossia::net::protocol_base, std::default_delete<ossia::net::protocol_base> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(QPointF, QPointF)#3}&, QPointF, QPointF>(Gfx::window_device::window_device(std::unique_ptr<ossia::net::protocol_base, std::default_delete<ossia::net::protocol_base> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(QPointF, QPointF)#3}&, QPointF&&, QPointF&&) (__fn=...) at /usr/include/c++/12/bits/invoke.h:111
#3 0x0000555556f14ae5 in std::_Function_handler<void (QPointF, QPointF), Gfx::window_device::window_device(std::unique_ptr<ossia::net::protocol_base, std::default_delete<ossia::net::protocol_base> >, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >)::{lambda(QPointF, QPointF)#3}>::_M_invoke(std::_Any_data const&, QPointF&&, QPointF&&)
(__functor=..., __args#0=..., __args#1=...) at /usr/include/c++/12/bits/std_function.h:290
#4 0x0000555556ecb466 in std::function<void (QPointF, QPointF)>::operator()(QPointF, QPointF) const (this=0x55555bae56c0, __args#0=..., __args#1=...)
at /usr/include/c++/12/bits/std_function.h:591
#5 0x0000555556e67363 in operator()(QPointF, QPointF) const (__closure=0x55555b915a70, s=..., w=...)
at /onyx/home/pgervais/prog/ossia-score/src/plugins/score-plugin-gfx/Gfx/Graph/ScreenNode.cpp:308
#6 0x0000555556e97142 in QtPrivate::FunctorCall<QtPrivate::IndexesList<0, 1>, QtPrivate::List<QPointF, QPointF>, void, score::gfx::ScreenNode::createOutput(score::gfx::GraphicsApi, std::function<void()>, std::function<void()>, std::function<void()>)::<lambda(QPointF, QPointF)> >::call(struct {...} &, void **) (f=..., arg=0x7fffffffda20)
at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:127
#7 0x0000555556e9616f in QtPrivate::Functor<score::gfx::ScreenNode::createOutput(score::gfx::GraphicsApi, std::function<void()>, std::function<void()>, std::function<void()>)::<lambda(QPointF, QPointF)>, 2>::call<QtPrivate::List<QPointF, QPointF>, void>(struct {...} &, void *, void **) (f=..., arg=0x7fffffffda20)
at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:241
#8 0x0000555556e93af0 in QtPrivate::QFunctorSlotObject<score::gfx::ScreenNode::createOutput(score::gfx::GraphicsApi, std::function<void()>, std::function<void()>, std::function<void()>)::<lambda(QPointF, QPointF)>, 2, QtPrivate::List<QPointF, QPointF>, void>::impl(int, QtPrivate::QSlotObjectBase *, QObject *, void **, bool *)
(which=1, this_=0x55555b915a60, r=0x55555bb0db20, a=0x7fffffffda20, ret=0x0) at /usr/include/x86_64-linux-gnu/qt6/QtCore/qobjectdefs_impl.h:408
#9 0x00007ffff318db36 in () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#10 0x0000555556ebec41 in w_internal::SignalImplementation<void (score::gfx::Window::*)(QPointF, QPointF), 1>::operator()(QPointF, QPointF, int)
(this=0x7fffffffda88, args#0=..., args#1=...) at /onyx/home/pgervais/prog/ossia-score/3rdparty/libossia/3rdparty/verdigris/src/wobjectdefs.h:531
#11 0x0000555556e9c24e in score::gfx::Window::mouseMove(QPointF, QPointF) (this=0x55555bb0db20, screen=..., win=...)
at /onyx/home/pgervais/prog/ossia-score/src/plugins/score-plugin-gfx/Gfx/Graph/Window.hpp:47
#12 0x0000555556e6cf02 in score::gfx::Window::event(QEvent*) (this=0x55555bb0db20, e=0x7fffffffdd30)
at /onyx/home/pgervais/prog/ossia-score/src/plugins/score-plugin-gfx/Gfx/Graph/Window.cpp:217
#13 0x00007ffff3ddea53 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Widgets.so.6
#14 0x00007ffff31448b8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#15 0x00007ffff36c728b in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#16 0x00007ffff370f53c in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Gui.so.6
#17 0x00007fffd9ac42fa in () at /lib/x86_64-linux-gnu/libQt6XcbQpa.so.6
#18 0x00007fffef4e97a9 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#19 0x00007fffef4e9a38 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#20 0x00007fffef4e9acc in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0
#21 0x00007ffff3328f7c in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#22 0x00007ffff314e57a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#23 0x00007ffff31476a8 in QCoreApplication::exec() () at /lib/x86_64-linux-gnu/libQt6Core.so.6
#24 0x0000555555b78ff9 in Application::exec() (this=0x7fffffffe190) at /onyx/home/pgervais/prog/ossia-score/src/app/Application.cpp:493
#25 0x0000555555b7a750 in main(int, char**) (argc=1, argv=0x7fffffffe3a8) at /onyx/home/pgervais/prog/ossia-score/src/app/main.cpp:615
In case that's useful, on Linux I'm running the "nouveau" video driver, and my window manager is Openbox.
Given the fact that the issue also happens on MacOS, I doubt the problem is with the video driver or the window manager, but you never know.
this should have been fixed since 3.1.12, can you check on the latest release ? https://github.com/ossia/score/releases/v3.1.13
To reproduce the crash:
The bug is reproducible on
Linux stacktrace: