ahlstromcj / sequencer64

A major reboot of Seq24. Current release 0.97.0 (2021-05-13), native JACK MIDI, Song recording, playlists, and a Windows/Qt version. For fresher code, see the Seq66 project. Note that trigger and mute-group-in-MIDI-file formats have evolved! Back up your work!
GNU Affero General Public License v3.0
235 stars 29 forks source link

Closing "Pattern Editor" window crashes whole application #190

Open zelyev opened 4 years ago

zelyev commented 4 years ago

Hello,

I am on Ubuntu Studio 19.10 with KX Studio repo added and sequencer64 package installed.

Starting sequencer64 it uses the qseq64 version. I open a pattern editor and when I close it, the whole application crashes:

$ qseq64 qt5ct: using qt5ct plugin [JACK server already started] [Initialized, running without JACK sync] qt5ct: D-Bus global menu: no Speicherzugriffsfehler (Speicherabzug geschrieben)

Build Information:

Sequencer64 0.96.6

Build features: C++ version 201402 Native JACK/ALSA (rtmidi) on Event editor on Follow progress bar on Highlight edit pattern on Highlight empty patterns on JACK session on JACK support on MIDI vector (vs list) on Seq32 chord generator on Seq32 LFO window on Seq32 menu buttons on Seq32 transpose on BPM Tap button on Solid piano-roll grid on Optional pattern coloring on Multiple main windows on Song performance recording on Pause support on Save time-sig/tempo on 64-bit support enabled

Options are enabled/disabled via the configure script, libseq64/include/seq64_features.h, or the build-specific seq64-config.h file in include or in include/qt/portmidi

I would appreciate your advice. Thanks.

falkTX commented 4 years ago

I can reproduce this too, it is quite annoying :(

Is this fixed on the new midi_control branch?

ahlstromcj commented 4 years ago

I have never been able to reproduce that behavior. If you don't mind, can you check out the midi_control branch, build for debug, run it under gdb, a post the backtrace? Thanks!

On Sat, Feb 1, 2020, 08:41 Filipe Coelho notifications@github.com wrote:

I can reproduce this too, it is quite annoying :(

Is this fixed on the new midi_control branch?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ahlstromcj/sequencer64/issues/190?email_source=notifications&email_token=AB45LKC7JDQPIRHYMR7QXTLRAV3XNA5CNFSM4KCX5UW2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEKQ5MMI#issuecomment-581031473, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB45LKB6WJNBPZM6B42WQ2DRAV3XNANCNFSM4KCX5UWQ .

falkTX commented 4 years ago

I have a trace for when I was running the application regularly, there is nothing about seq64 in there, only qt stuff.

Thread 1 "qseq64" received signal SIGSEGV, Segmentation fault.
0x00007ffff53b7324 in QWindow::isTopLevel() const () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
(gdb) bt
#0  0x00007ffff53b7324 in QWindow::isTopLevel() const () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#1  0x00007ffff53ba164 in QWindowPrivate::maybeQuitOnLastWindowClosed() () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#2  0x00007ffff53be604 in QWindow::event(QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#3  0x00007ffff6f996ff in ?? () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#4  0x00007ffff6f3aeac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#5  0x00007ffff6f424b0 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5
#6  0x00007ffff691fe38 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff53b0615 in QGuiApplicationPrivate::processCloseEvent(QWindowSystemInterfacePrivate::CloseEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#8  0x00007ffff53b4615 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#9  0x00007ffff538e79b in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5
#10 0x00007fffedff1dda in ?? () from /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#11 0x00007ffff35e6417 in g_main_context_dispatch () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#12 0x00007ffff35e6650 in ?? () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#13 0x00007ffff35e66dc in g_main_context_iteration () from /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
#14 0x00007ffff697daaf in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#15 0x00007ffff691df9a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#16 0x00007ffff6927310 in QCoreApplication::exec() () from /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x0000555555555d67 in ?? ()
#18 0x00007ffff5aa9b97 in __libc_start_main (main=0x555555555aa0, argc=1, argv=0x7fffffffdc78, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fffffffdc68) at ../csu/libc-start.c:310
#19 0x000055555555626a in ?? ()

so I think a full debug trace won't be that much more useful

my guess is this is qt trying to do some operation on a deleted widget. which happens due to the codebase deleting and creating new widgets a lot. (qt widgets have a method called deleteLater() maybe that could be used instead of manually deleting them?)

wundermusiker commented 4 years ago

Can confirm this issue under Ubuntu Studio 19.10

ahlstromcj commented 4 years ago

I finally duplicated some form of the bug in the Qt version, but the bug is in the sequence class and could potentially affect all versions. To duplicate it (I think) I had to add some notes, select 1, and then hit quantize. That function was trying to calculates ticks % 0. I will follow up with more research on mod operations, but the current fix is in place in the midi_control branch.