Segmentation fault during new 'loop play'
FYI....
I was experimenting with the new "loop playback feature". MuseScore rev -> 9219ebd
From the Play Panel I had selected notes for "In" and 'Out' and set the 'Playback will continuously restart' button.
The loop feature works nicely - a welcome addition and I can certainly use this a lot.
However, by accident, I clicked the 'Playback will continuously restart' button instead of the 'Start or Stop Playback button. This results in a segmentation fault.
Here is the output from starting mscore in a terminal window:
/home/turtle$ mscore
read shortcuts from
Fontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
QWidget::setMinimumSize: (inspector/Ms::Inspector) Negative sizes (-325,0) are not possible
QQmlComponent: Component is not ready
creating component failed
line 16: module "QtQuick" version 1.1 is not installed
QQmlComponent: Component is not ready
creating component failed
line 14: module "QtQuick" version 1.0 is not installed
loopAction = 1
==== Show loop in tick = 1920
==== Show loop in tick = 1920
seek : utick=1920
event.type() == ME_LOOP loopOutPos = 3840 | getCurTick() = 3840
seek : utick=1920
event.type() == ME_LOOP loopOutPos = 3840 | getCurTick() = 3840
seek : utick=1920
event.type() == ME_LOOP loopOutPos = 3840 | getCurTick() = 3840
seek : utick=1920
loopAction = 0
Segmentation fault
/home/turtle$
I would rather have expected that the 'loop' feature would have been turned off.
Comments
I may have fixed it in fe87c1b6a3
lasconic. I am afraid not. There is still something very strange happening.
I downloaded and compiled from Git this morning. Rev: d5964f81
I have and have not the same problem as well as a new one.
Sometimes I can start and stop the loop with no problem. Then I can start it but on stopping (pressing the 'play' button) I get segmentation fault. Additionally, if I let the loop play multiple times, I also get a segmentation fault without doing anything.
Here is the output of a loop that just failed without pressing anything.
/home/turtle$ mscore
read shortcuts from
Fontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
QWidget::setMinimumSize: (inspector/Ms::Inspector) Negative sizes (-325,0) are not possible
QQmlComponent: Component is not ready
creating component failed
line 16: module "QtQuick" version 1.1 is not installed
QQmlComponent: Component is not ready
creating component failed
line 14: module "QtQuick" version 1.0 is not installed
QXcbConnection: XCB error: 3 (BadWindow), sequence: 756, resource id: 0, major code: 2 (ChangeWindowAttributes), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 758, resource id: 0, major code: 20 (GetProperty), minor code: 0
loopAction = 1
==== Show loop in tick = 1440
==== Show loop in tick = 1440
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
Segmentation fault
/home/turtle$
And this one from pressing the 'set/unset' repeat button while playing.
/home/turtle$ mscore
read shortcuts from
Fontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
QWidget::setMinimumSize: (inspector/Ms::Inspector) Negative sizes (-325,0) are not possible
QQmlComponent: Component is not ready
creating component failed
line 16: module "QtQuick" version 1.1 is not installed
QQmlComponent: Component is not ready
creating component failed
line 14: module "QtQuick" version 1.0 is not installed
loopAction = 1
==== Show loop in tick = 1440
==== Show loop in tick = 1440
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
seek : utick=1440
seek : utick=1440
seek : utick=1440
loopAction = 0
loopAction = 1
==== Show loop in tick = 1440
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360
seek : utick=1440
Segmentation fault
/home/turtle$
Whatever is causing the problem it is not consistent, at least not predictably, except that the segmentation fault causes a crash.
I have attached the score I am experimenting with. The loop is set between the fourth and seventh note (inclusive).
I don't have a crashlog (where would it be?) but if I play the supplied sample file under Windows (8, 64bit) using the almost latest self-compiled nightly, and using the in/out markers where the OP specified, MS crashed after _many_ loops.
same for mint15 d5964f8
Strange, I have Mint15 too, but I can't reproduce this problem. What are the steps you do to reproduce it? Does it happens with any score?
Under Windows it crashed on the sample score, but I can't make it crash on a simple piano score I created, repeating only 4 notes. I will keep changing conditions of the test so hopefully I can find something.
I also managed to make ttxyz.mscz crash both on Windows 8 and Mac OS X with d5964f8 self-compiled.
Unfortunately, under Windows gdb is not able to give me a sensible backtrace.
In attachment the logs I retrieved with Mac. I don't know if they are related to this very same bug but it may be tightly related: I had to stop and restart playback a few times before the crash happened, with loop button on.
"crash_report_mac.txt" is what Mac crash report gives: it seems that the problem lies inside Ms::Seq::heartBeatTimeout function.
"crash_mac_gdb.txt" is the backtrace of gdb under Mac: it confirms heartBeatTimeout as the trigger for the bug I am seeing.
In particular, the crash seems to happen at line 1195 of mscore/seq.cpp
for (;guiPos != events.cend(); ++guiPos) {
I only checked the given file
Steps were
View play panel >select begin note in score>check [ in play panel >select end note in score>check ] in play panel>check play in play panel
The terminal display was
leleu@portable-leleu ~ $ mscore
read shortcuts from
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
Alsa_driver: stat = 00, xrun of at least 4088.839 ms
loopAction = 1
==== Show loop in tick = 1440
==== Show loop in tick = 1440
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360 seek : utick=1440
__________________________
10 such 2 lines
________________________________________
seek : utick=1440
event.type() == ME_LOOP loopOutPos = 3360 | getCurTick() = 3360 seek : utick=1440
Erreur de segmentation
if anyone can reproduce while running in a debugger, with a usable trace, that would be great. If you are compiling in debug mode on linux, gdb mscore should work.
Even better maybe, someone using valgrind?
After my reported crash, I tried two different scores (the OP and my own) running on a very tight loop and neither crashed, so it is elusive. I even tried starting/stopping, moving the in/out positions, nothing.
Ok, here's what I've got.
After a few crash in QT in debug mode, Qt always points me to this function in the file stl_tree.h
_Self&
operator++()
{
_M_node = _Rb_tree_increment(_M_node);
return *this;
}
And some log. Qt is stopped at #1:
0 std::_Rb_tree_increment(std::_Rb_tree_node_base const*) /usr/lib/i386-linux-gnu/libstdc++.so.6 0xb4341e52
1 std::_Rb_tree_const_iterator >::operator++ stl_tree.h 269 0x85ec7c5
2 Ms::Seq::heartBeatTimeout seq.cpp 1196 0x85eb501
3 Ms::Seq::qt_static_metacall moc_seq.cpp 121 0x8444f00
4 QMetaObject::activate(QObject*, int, int, void**) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c449cd
5 QMetaObject::activate(QObject*, QMetaObject const*, int, void**) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c453eb
6 QTimer::timeout(QTimer::QPrivateSignal) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7cb98c5
7 QTimer::timerEvent(QTimerEvent*) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c5244b
8 QObject::event(QEvent*) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c45e64
9 QApplicationPrivate::notify_helper(QObject*, QEvent*) /home/stef/Qt/5.1.0/gcc/lib/libQt5Widgets.so.5 0xb6a2ee24
10 QApplication::notify(QObject*, QEvent*) /home/stef/Qt/5.1.0/gcc/lib/libQt5Widgets.so.5 0xb6a328b2
11 QCoreApplication::notifyInternal(QObject*, QEvent*) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c19c5e
12 QTimerInfoList::activateTimers() /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c68ec2
13 ?? /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c69778
14 ?? /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c697b2
15 g_main_context_dispatch /lib/i386-linux-gnu/libglib-2.0.so.0 0xb3ab23b3
16 ?? /lib/i386-linux-gnu/libglib-2.0.so.0 0xb3ab2750
17 g_main_context_iteration /lib/i386-linux-gnu/libglib-2.0.so.0 0xb3ab2831
18 QEventDispatcherGlib::processEvents(QFlags) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c69f68
19 ?? /home/stef/Qt/5.1.0/gcc/plugins/platforms/libqxcb.so 0xb13151b6
20 QEventLoop::processEvents(QFlags) /home/stef/Qt/5.1.0/gcc/lib/libQt5Core.so.5 0xb7c18356
...
So it is link with the line #1196 in seq.cpp
Maybe it's in relation with to the line #295 in seq.cpp where we remove the Out loop event
it = events.erase(it);
Could it be that when we remove that ME_LOOP event, we mix up the events map ?
The way I reproduce this crash (segmentation fault) is :
1. Using the default score Bilder aus....
2. Set In loop position on second note. And set the Out loop position on the 6th note.
3. Start the loop.
4. While playing remove the In loop position with the playpanel.
5. Still playing, remove the Out position in the playpanel
Here is the address sanitizer log, under Linux Mint 13, commit d86da1712 (self-compiled)
By following vgStef steps, address sanitizer confirms that the access violation is at line 1196 of mscore/seq.cpp, of an address freed at line 295 of mscore/seq.cpp, which was previously allocated at line 342 of mscore/seq.cpp.
Hope this helps.
I found that by using the lower_bound function to set the loop Out event, it causes the segmentation fault. So I removed it and I don't have problem anymore.
I've submitted the change (with many others loop playback updates) in //github.com/musescore/MuseScore/pull/451
I have not seen your pull (451) merged into github.com. Has it been missed or have I missed it myself?
No, it hasn't been merged yet. The Travis build failed, so there may be an unresolved issue with the code.
No, the fail wasn't link to my commit! It was the previous commit that had a fail, That previous fail repercuted in my commit, as I understand it. Especially because it was the same fails, and because I didn't touch the file linked to the problem.
I downloaded from Github this morning, rev: 025f37c36, compiled.
Using the same test score I found the code to be much more resilient. I could stop/start without problem.
However, continuing to play with it, letting a loop play over and over, I am still getting a segmentation fault.
Run 1. :-
/home/turtle$ mscore
read shortcuts from
Fontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
QWidget::setMinimumSize: (inspector/Ms::Inspector) Negative sizes (-325,0) are not possible
QWidget::setMinimumSize: (inspector/Ms::Inspector) Negative sizes (-325,0) are not possible
QQmlComponent: Component is not ready
creating component failed
line 16: module "QtQuick" version 1.1 is not installed
QQmlComponent: Component is not ready
creating component failed
line 14: module "QtQuick" version 1.0 is not installed
QXcbConnection: XCB error: 3 (BadWindow), sequence: 550, resource id: 0, major code: 2 (ChangeWindowAttributes), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 552, resource id: 0, major code: 20 (GetProperty), minor code: 0
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
setLoopInTick : tick = -1
setLoopCursor : tick=0, isInPos=1
setLoopOutTick : tick = -1
setLoopCursor : tick=61439, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopInTick : tick = 960
loopAction = 1
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopOutTick : tick = 3840
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
Add loop event at tick 3840 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
loopAction = 0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopInTick : tick = 0
loopAction = 1
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=3840, isInPos=0
Add loop event at tick 3840 (loopInTick = 0)
seek : utick=0
event.type() == ME_LOOP in/out tick = 0/3840 loop | getCurTick() = 3840
seek : utick=0
event.type() == ME_LOOP in/out tick = 0/3840 loop | getCurTick() = 3840
seek : utick=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopOutTick : tick = 2400
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
Add loop event at tick 2400 (loopInTick = 0)
seek : utick=0
event.type() == ME_LOOP in/out tick = 0/2400 loop | getCurTick() = 2400
seek : utick=0
event.type() == ME_LOOP in/out tick = 0/2400 loop | getCurTick() = 2400
seek : utick=0
loopAction = 0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
seek : utick=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
seek : utick=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
seek : utick=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
loopAction = 1
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
Add loop event at tick 2400 (loopInTick = 0)
seek : utick=0
event.type() == ME_LOOP in/out tick = 0/2400 loop | getCurTick() = 2400
seek : utick=0
event.type() == ME_LOOP in/out tick = 0/2400 loop | getCurTick() = 2400
seek : utick=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopInTick : tick = 960
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopOutTick : tick = 2880
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
Add loop event at tick 2880 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
loopAction = 0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
seek : utick=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
seek : utick=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
loopAction = 1
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
Add loop event at tick 2880 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
loopAction = 0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
seek : utick=1357
loopAction = 1
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
seek : utick=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
Add loop event at tick 2880 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2880 loop | getCurTick() = 2880
seek : utick=960
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2880, isInPos=0
setLoopOutTick : tick = 3840
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
Add loop event at tick 3840 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopInTick : tick = 3360
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
Add loop event at tick 3840 (loopInTick = 3360)
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
Segmentation fault
RUN 2. :-
/home/turtle$ mscore
read shortcuts from
Fontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
setLoopInTick : tick = -1
setLoopCursor : tick=0, isInPos=1
setLoopOutTick : tick = -1
setLoopCursor : tick=61439, isInPos=0
QWidget::setMinimumSize: (inspector/Ms::Inspector) Negative sizes (-325,0) are not possible
QQmlComponent: Component is not ready
creating component failed
line 16: module "QtQuick" version 1.1 is not installed
QQmlComponent: Component is not ready
creating component failed
line 14: module "QtQuick" version 1.0 is not installed
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=61439, isInPos=0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 727, resource id: 0, major code: 2 (ChangeWindowAttributes), minor code: 0
QXcbConnection: XCB error: 3 (BadWindow), sequence: 729, resource id: 0, major code: 20 (GetProperty), minor code: 0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopInTick : tick = 3360
loopAction = 1
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopOutTick : tick = 3840
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
Add loop event at tick 3840 (loopInTick = 3360)
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
event.type() == ME_LOOP in/out tick = 3360/3840 loop | getCurTick() = 3840
seek : utick=3360
loopAction = 0
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
seek : utick=0
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
loopAction = 1
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=3360, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopInTick : tick = 960
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
Add loop event at tick 3840 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
loopAction = 0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
seek : utick=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
seek : utick=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
loopAction = 1
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
Add loop event at tick 3840 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/3840 loop | getCurTick() = 3840
seek : utick=960
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=3840, isInPos=0
setLoopOutTick : tick = 2400
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2400, isInPos=0
setLoopCursor : tick=960, isInPos=1
setLoopCursor : tick=2400, isInPos=0
Add loop event at tick 2400 (loopInTick = 960)
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
event.type() == ME_LOOP in/out tick = 960/2400 loop | getCurTick() = 2400
seek : utick=960
Segmentation fault
/home/turtle$
I also got this weird failure by setting the IN and OUT points to the same note, but could not reproduce it:
*** Error in `mscore': invalid fastbin entry (free): 0x00007fa59c096100 ***
A copy of the terminal log for this error is attached as file "weirdlog.txt"
But, by setting the IN and OUT points to the same note (the fourth in the score), after a few repeats it gives a segmentation fault:-
/home/turtle$ mscore
read shortcuts from
Fontconfig warning: "/etc/fonts/conf.d/56-user.conf", line 9: reading configurations from ~/.fonts.conf is deprecated.
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
ChangeProperty::flip(): QVariant(bool, false) -> QVariant(bool, true)
setLoopInTick : tick = -1
setLoopCursor : tick=0, isInPos=1
setLoopOutTick : tick = -1
setLoopCursor : tick=61439, isInPos=0
QWidget::setMinimumSize: (inspector/Ms::Inspector) Negative sizes (-325,0) are not possible
QQmlComponent: Component is not ready
creating component failed
line 16: module "QtQuick" version 1.1 is not installed
QQmlComponent: Component is not ready
creating component failed
line 14: module "QtQuick" version 1.0 is not installed
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopCursor : tick=0, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopInTick : tick = 1440
loopAction = 1
setLoopCursor : tick=1440, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopCursor : tick=1440, isInPos=1
setLoopCursor : tick=61439, isInPos=0
setLoopOutTick : tick = 1920
setLoopCursor : tick=1440, isInPos=1
setLoopCursor : tick=1920, isInPos=0
setLoopCursor : tick=1440, isInPos=1
setLoopCursor : tick=1920, isInPos=0
Add loop event at tick 1920 (loopInTick = 1440)
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
event.type() == ME_LOOP in/out tick = 1440/1920 loop | getCurTick() = 1920
seek : utick=1440
Segmentation fault
/home/turtle$
Really hard to reproduce this crash. I succeeded to reproduce it a few time, but I can't reproduce it when using the debugger.
Anyone has a step by step way to reproduce this bug?
It is difficult to reproduce in a predictable way the bug.
A few observations:
1- the new implementation does not allow to reset the "start loop" and "end loop" during playback, but it only allows repositioning of "start loop" and "end loop" (only) on the notes being played.
2- the selection of notes during playback seems to act in a non-predictable way: I tried with the Promenade Example, I set "start loop" on the 3rd note and "end loop" on the 6th note and then let it play. The highlighted blue notes behavior was fine at the beginning (i.e. it followed the notes being played), then it froze on the note just after the final note of the loop, while the loop continued to play normally (and if you click "start loop" or "end loop" buttons in this case the note being played is set as start or end loop, as in normal case and not the highlighted wrong note), then it started again to follow the notes being played.
I managed to make MuseScore crash with the following, but it can just be a "programmed" crash by address sanitizer on a wrong reading/writing:
1- Open play panel on the Promenade Example.
2- Select 3r note, click "start loop".
3- Select 6th note, click "end loop".
4- Play.
5- While playing, when the play cursor is on the final note of the loop, click "start loop".
6- Press "play" to stop playback.
I obtained the attached backtrace with address sanitizer: "loop_crash1.txt"
I managed to have another crash with the previous steps up to 5- and then wild pressing "start loop" until the "start loop" green rectangle appeared after the "end loop" red rectangle. Then stopped playback. The address sanitizer log is "loop_crash2.txt".
Linux Mint 13, commit 025f37c36c9
I managed to let the loop play outside the rectangles (some wild clicking on the "end loop" button: the green and red rectangles were on some notes, but the loop seemed to ignore the "end" position set at the red rectangle and was using the previous "end" position). When playing and stopping playback a few times I obtained a crash (this with a Nightly build under Windows, no address sanitizer log).
[ Address sanitizer is built inside gcc 4.8; to use it
-fsanitize=address -fno-omit-frame-pointer
can be added to the CMAKE_CXX_FLAGS_DEBUG at line 111 of MuseScore/CmakeLists.txtThen make a debug build and use asan_symbolize.py with
mscore 2>&1 | ./asan_symbolize.py | c++filt
More information: http://blog.qt.digia.com/blog/2013/04/17/using-gccs-4-8-0-address-sanit… ]
see also http://musescore.org/en/node/22412
I managed to make MuseScore crash twice by simply letting the loop play, as in the original report.
Steps performed:
1- Open play panel on the Promenade Example.
2- Select 1st note, click "start loop".
3- Select 6th note, click "end loop".
4- Play.
5- Let it play for a very LONG time.
It took more than 5 minutes before seeing the crash. And they happened after different amount of time: it is a random crash.
I tried again and let it play for more than 15 minutes, but then it did not crash.
Attached the logs from address sanitizer (in the first also the MuseScore debug log).
The crash seems to be related to a painting event, but I am not 100% sure about this.
My new commit has been merged (#461). I changed the way the loop is managed internally.
If anyone could test it and see if crashes still happens. Thanks!
vgStef...
mscore : Unstable Prerelease for Version 2.0.0; Build 63c959d
Nice job! I tried all kinds of ways of using the loop feature - and none of them resulted in a crash. It seems to me that the instability problem has been resolved.
One minor comment. The 'out' marker looks to be a little bit too far to the right of the final note in the loop. It almost seems to cover the next note giving the wrong impression of which note is the final note. See the attached snapshot where the selected 'out' note is at the end of the bar, but the marking is well towards covering the first note in the following bar.
System: Linux, OpenSuse 12.3
Thanks for the fix for this very useful tool.
Crash on the loop is fixed. I put this issue on fixed. Create a new one or discuss on the forum if needed.
Automatically closed -- issue fixed for 2 weeks with no activity.