crash instantiating synths #1192
Replies: 31 comments
-
So, I pressed on for a bit but attached qtcreator incase it happened again. It crashes below at the arrow
because a->id() is 24 but toolShortcuts only contain 15 items. |
Beta Was this translation helpful? Give feedback.
-
Hey I wonder if it might possibly have to do with my hotkeys issue 940 from yesterday. |
Beta Was this translation helpful? Give feedback.
-
It looks more like I caused this problem with my patch yesterday... No idea why, will have a look. |
Beta Was this translation helpful? Give feedback.
-
I removed the edit toolbar shortcuts update for the time being. |
Beta Was this translation helpful? Give feedback.
-
Oh sorry @spamatica , I didn't notice your analysis, the lines were closed... |
Beta Was this translation helpful? Give feedback.
-
Alright, cool, hoppfully l will try it tonight!
Den tors 7 jan. 2021 12:02kybos <[email protected]> skrev:
… Oh sorry @spamatica <https://github.com/spamatica> , I didn't notice your
analysis, the lines were closed...
That makes it clearer, must have been my misunderstanding of the code.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/orgs/muse-sequencer/teams/musedevteam/discussions/66/comments/5>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABCFANZ7ODMBRT6P22JSHYTSYWIEBANCNFSM4VYEDCYA>
.
|
Beta Was this translation helpful? Give feedback.
-
No fix so far... I thought it was some stupid mistake of mine, but no, the code looks ok.
When printing out the values in the configChanged function, they always look right in my tests with various toolbars:
So I guess I need some more hints on how it's happening and if possible how I can reproduce it. |
Beta Was this translation helpful? Give feedback.
-
It shouldn't crash any more now, but there should be error output in the console with the wrong id. |
Beta Was this translation helpful? Give feedback.
-
Not sure I have run with the proper fix but I did run with the disabled function and have not seen any more crashes. Plugins can due to their nature cause all kinds of havoc but have so far not seen any such evidence so it looks safe. |
Beta Was this translation helpful? Give feedback.
-
New information. I'm lazy so haven't tried on multiple systems yet, but I can reproduce a similar crash with both debug and release.
Since it involves plugin loading I fear it might be memory leaks involved but I don't know, Here's a snip from the backtrace.
|
Beta Was this translation helpful? Give feedback.
-
I still can't reproduce it here. |
Beta Was this translation helpful? Give feedback.
-
Tried on two different computers now and it happens every time on these (both have Kubuntu 20.04.1 LTS) Inspecting a core dump I see the actions
MusE printed And crashed on the next one with id = 64 |
Beta Was this translation helpful? Give feedback.
-
No matter what I do, I still can't reproduce the crash. Tried even KDE (I have no Kubuntu, though). It definitely looks like an external corruption of the memory, as the Action vector is filled once in the constructor and not changed anymore. |
Beta Was this translation helpful? Give feedback.
-
Yes looks very much like memory corruption, will do more tests but it is very repeatable here. Just to remove any possibility that the steps are unclear I attached a small video where I do the steps to make it crash. |
Beta Was this translation helpful? Give feedback.
-
I checked the video - yes, that's exactly what I did too. Quite a standard procedure, so it's surprising nobody else is complaining. |
Beta Was this translation helpful? Give feedback.
-
With pre1 appimage I don't see anything bad. |
Beta Was this translation helpful? Give feedback.
-
If you mean this one: [ Edit: ] Oh wait, sorry, maybe that's not the one, it's that newer post from him, eh? |
Beta Was this translation helpful? Give feedback.
-
No, it was the one discussed here that in the end was not repeatable |
Beta Was this translation helpful? Give feedback.
-
Woops didn't see the edit :P I'm pretty sure that it started failing rather recently but if it IS memory corruption it could just as well be very old and changed memory layout is what started triggering it. I will keep trying |
Beta Was this translation helpful? Give feedback.
-
My last attempt at cleaning up the EditToolBar code, removing the mix of different scopes involved etc. |
Beta Was this translation helpful? Give feedback.
-
Good with cleanups but unfortunately it did not help. I have some new information though. It turns out I don't have to load a plugin, I can just as easily trigger it by clicking on some of the other toolbar buttons, so far I tried the Visible Track Types toolbar. I recall having used a debugger for an embedded system where you could trigger a breakpoint when a memory area was accessed, I wonder if it's possible to do that with gdb? It must be possible to catch this somehow. I can repeat this crash on three computers, all with the same Kubuntu 20.04, tried with a VM that had debian 10 and it does not crash. So I guess it is possible the problem is in the OS. |
Beta Was this translation helpful? Give feedback.
-
And it looks like gdb does support that so I will check it out |
Beta Was this translation helpful? Give feedback.
-
I might have found the actual problem. But that is isn't it, though it is similar... The toolbar has a destructor but it is never called, infact the pianoroll has no destructor so nothing new:ed is deleted when the pianoroll goes. This did however leave me a bit scared, assuming this is close to the truth, there might be many more similar cases coming. |
Beta Was this translation helpful? Give feedback.
-
Still, we've been pretty stable for a long time so I shouldn't sound too fearful :D |
Beta Was this translation helpful? Give feedback.
-
That's a very important hint. Apparently the EditToolBar is not properly deleted when the Pianoroll is destroyed. |
Beta Was this translation helpful? Give feedback.
-
That sounds very reasonable. Not been able to test stuff now but I see this in the code, which looks like it is the problem. |
Beta Was this translation helpful? Give feedback.
-
I think these comments have no effect, the variables are there in the definition. |
Beta Was this translation helpful? Give feedback.
-
Tried lot of things but there seems to be no other way than to delete all the toolbars manually. They disappear from the parent tree of Pianoroll in the ctor already. I traced it - it happens exactly at canvas->setFocus(), which makes no sense, there must be some other reason. |
Beta Was this translation helpful? Give feedback.
-
Tried it now and my test scenario works fine now, thanks :) Do you see any drawback to your solution? Or rather what I'm asking, should we put a comment with the reason for the explicit delete, in case it later causes problems? |
Beta Was this translation helpful? Give feedback.
-
I did some more tests and debugging and it seems ok. Still a good idea to put a comment in there, I will do it. |
Beta Was this translation helpful? Give feedback.
-
Hi guys,
had some inspiration for music and started a very synth heavy piece. Had synths crashing sometimes on instantiating synths, from experience I know there are sometimes issues so I just restarted. But it happened a bit too frequent, then I remembered I was running debug and had enabled core dumping so I have a back trace.
Wasn't really in a mood to hunt right now but maybe one of you has any idea if anything has changed in recent master?
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/home/ddskrjo/muse_debug/bin/muse4 -j -len'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f95d2dabf07 in QKeySequence::operator==(QKeySequence const&) const () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
[Current thread is 1 (Thread 0x7f95cb2ded00 (LWP 301322))]
(gdb) bt
#0 0x00007f95d2dabf07 in QKeySequence::operator==(QKeySequence const&) const () at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#1 0x00007f95d33b7fd6 in QAction::setShortcut(QKeySequence const&) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#2 0x00007f95d1c7e4a4 in MusEGui::EditToolBar::configChanged() (this=0x5614dbe33290)
at /home/ddskrjo/dev/muse/muse3/muse/components/tools.cpp:178
#3 0x00007f95d1c7ee3b in QtPrivate::FunctorCall<QtPrivate::IndexesList<>, QtPrivate::List<>, void, void (MusEGui::EditToolBar::)()>::call(void (MusEGui::EditToolBar::)(), MusEGui::EditToolBar*, void**)
(f=(void (MusEGui::EditToolBar::)(MusEGui::EditToolBar * const)) 0x7f95d1c7e37e MusEGui::EditToolBar::configChanged(), o=0x5614dbe33290, arg=0x7ffe7cf54d80) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:152
#4 0x00007f95d1c7edba in QtPrivate::FunctionPointer<void (MusEGui::EditToolBar::)()>::call<QtPrivate::List<>, void>(void (MusEGui::EditToolBar::)(), MusEGui::EditToolBar, void**)
(f=(void (MusEGui::EditToolBar::)(MusEGui::EditToolBar * const)) 0x7f95d1c7e37e MusEGui::EditToolBar::configChanged(), o=0x5614dbe33290, arg=0x7ffe7cf54d80) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:185
#5 0x00007f95d1c7ed20 in QtPrivate::QSlotObject<void (MusEGui::EditToolBar::)(), QtPrivate::List<>, void>::impl(int, QtPrivate::QSlotObjectBase*, QObject*, void**, bool*) (which=1, this_=0x5614dbe3c1d0, r=0x5614dbe33290, a=0x7ffe7cf54d80, ret=0x0)
at /usr/include/x86_64-linux-gnu/qt5/QtCore/qobjectdefs_impl.h:414
#6 0x00007f95d29ce458 in QMetaObject::activate(QObject*, int, int, void**) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#7 0x00007f95d3e5d5ab in MusEGui::MusE::configChanged() (this=0x5614cdff3d00)
at /home/ddskrjo/dev/muse-build_debug/muse/moc_app.cpp:776
#8 0x00007f95d3e80499 in MusEGui::MusE::changeConfig(bool) (this=0x5614cdff3d00, writeFlag=true)
at /home/ddskrjo/dev/muse/muse3/muse/app.cpp:3063
#9 0x00007f95d4009941 in MusECore::Song::addNewTrack(QAction*, MusECore::Track*) (this=
0x5614ce2eda10, action=0x5614d1cd75a0, insertAt=0x0) at /home/ddskrjo/dev/muse/muse3/muse/song.cpp:274
#10 0x00007f95d22de130 in MusEGui::TList::mousePressEvent(QMouseEvent*) (this=0x5614ce3dd8c0, ev=0x7ffe7cf55a90)
at /home/ddskrjo/dev/muse/muse3/muse/arranger/tlist.cpp:1873
#11 0x00007f95d33ff2d1 in QWidget::event(QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007f95d22d4fe7 in MusEGui::TList::event(QEvent*) (this=0x5614ce3dd8c0, event=0x7ffe7cf55a90)
at /home/ddskrjo/dev/muse/muse3/muse/arranger/tlist.cpp:231
#13 0x00007f95d33bca66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007f95d33c6343 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00005614cbf37730 in MuseApplication::notify(QObject*, QEvent*)
(this=0x7ffe7cf564f0, receiver=0x5614ce3dd8c0, event=0x7ffe7cf55a90) at /home/ddskrjo/dev/muse/muse3/muse/main.cpp:164
#16 0x00007f95d29a293a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007f95d33c5457 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer&, bool, bool) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f95d341b35d in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f95d341e1ec in () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f95d33bca66 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f95d33c60f0 in QApplication::notify(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00005614cbf37730 in MuseApplication::notify(QObject*, QEvent*)
(this=0x7ffe7cf564f0, receiver=0x5614d212beb0, event=0x7ffe7cf55f80) at /home/ddskrjo/dev/muse/muse3/muse/main.cpp:164
#23 0x00007f95d29a293a in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /lib/x86_64-linux-gnu/libQt5Core.so.5
#24 0x00007f95d2d8d7d3 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) ()
at /lib/x86_64-linux-gnu/libQt5Gui.so.5
#25 0x00007f95d2d8f10b in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) ()
Beta Was this translation helpful? Give feedback.
All reactions