Can't delete/cut title frame if text not selected. Crash if then attempt to add text.

• Jul 14, 2016 - 19:36
Reported version
3.0
Type
Functional
Severity
S2 - Critical
Status
closed
Project
Tags

If I have a score with a title frame, I'm able to delete the title frame if I have the *actual text* selected.

However, if I'm selecting the text frame but not the text (i.e. I click inside the text frame where there is no text), then pressing delete or ctrl->X doesn't *appear* to remove the empty title frame.

Critical, because I'm able to produce an infinite hang by pressing Ctrl->X after selecting an empty title frame, and then right clicking on the apparently still-existing text box and pressing "Add Text". Clearly something is getting removed in memory but NOT the entire Frame/MeasureBase.

9a911bf42e27c99db4231b450105eafa2c7b479a on arch linux x86-64 Qt 5.7

1   Ms::Score::firstMeasure                                 score.cpp         1409 0x12a2a5e      
2   Ms::Score::tick2measure                                 utils.cpp         50   0x135c777      
3   Ms::Score::doLayoutRange                                layout.cpp        3663 0x123b7e9      
4   Ms::Score::update                                       cmd.cpp           203  0x139fa72      
5   Ms::Score::undoRedo                                     cmd.cpp           152  0x139f690      
6   Ms::MuseScore::undoRedo                                 musescore.cpp     3556 0xc092bd       
7   Ms::MuseScore::cmd                                      musescore.cpp     4629 0xc0f76b       
8   Ms::MuseScore::cmd                                      musescore.cpp     4433 0xc0e65e       
9   Ms::MuseScore::qt_static_metacall                       moc_musescore.cpp 820  0x10507f2      
10  QMetaObject::activate(QObject *, int, int, void * *)                           0x7fffec0944e9 
11  QActionGroup::triggered(QAction *)                                             0x7ffff3519f6f 
12  ??                                                                             0x7ffff351aae9 
13  QMetaObject::activate(QObject *, int, int, void * *)                           0x7fffec0944e9 
14  QAction::triggered(bool)                                                       0x7ffff3516472 
15  QAction::activate(QAction::ActionEvent)                                        0x7ffff3518e60 
16  QAction::event(QEvent *)                                                       0x7ffff35197dc 
17  QApplicationPrivate::notify_helper(QObject *, QEvent *)                        0x7ffff351ce3c 
18  QApplication::notify(QObject *, QEvent *)                                      0x7ffff35245b1 
19  QCoreApplication::notifyInternal2(QObject *, QEvent *)                         0x7fffec068c80 
20  QShortcutMap::dispatchEvent(QKeyEvent *)                                       0x7fffed3a06a8                                                                                  

Seems to be stuck in infinite while loop here:

Measure* Score::firstMeasure() const
      {
      MeasureBase* mb = _measures.first();
      while (mb && mb->type() != Element::Type::MEASURE)
            mb = mb->next();

      return toMeasure(mb);
      }

mb->next() contains the exact same address that mb is. So this while loop keeps doing the same thing over and over again. No SegFault, but rather an infinite loop.


Comments

Still trying to figure out extact replication steps. Here is what screen looks like after *supposedly* deleting the text box while not selecting the actual text, and then right clicking and adding text:

Screenshot (41).png

The crash I remember happenen with some combinatino of Undoing, but I'm trying to figure exact steps....

I just got the crash again...same infinite loop. Wasn't keeping track of my exact steps...sorry, but here's the stack:

1   Ms::Score::firstMeasure                                 score.cpp         1409 0x12a2a5e      
2   Ms::Score::tick2measure                                 utils.cpp         50   0x135c777      
3   Ms::Score::doLayoutRange                                layout.cpp        3663 0x123b7e9      
4   Ms::Score::update                                       cmd.cpp           203  0x139fa72      
5   Ms::Score::undoRedo                                     cmd.cpp           152  0x139f690      
6   Ms::MuseScore::undoRedo                                 musescore.cpp     3556 0xc092bd       
7   Ms::MuseScore::cmd                                      musescore.cpp     4629 0xc0f76b       
8   Ms::MuseScore::cmd                                      musescore.cpp     4433 0xc0e65e       
9   Ms::MuseScore::qt_static_metacall                       moc_musescore.cpp 820  0x10507f2      
10  QMetaObject::activate(QObject *, int, int, void * *)                           0x7fffebf994e9 
11  QActionGroup::triggered(QAction *)                                             0x7ffff3519f6f 
12  ??                                                                             0x7ffff351aae9 
13  QMetaObject::activate(QObject *, int, int, void * *)                           0x7fffebf994e9 
14  QAction::triggered(bool)                                                       0x7ffff3516472 
15  QAction::activate(QAction::ActionEvent)                                        0x7ffff3518e60 
16  QAction::event(QEvent *)                                                       0x7ffff35197dc 
17  QApplicationPrivate::notify_helper(QObject *, QEvent *)                        0x7ffff351ce3c 
18  QApplication::notify(QObject *, QEvent *)                                      0x7ffff35245b1 
19  QCoreApplication::notifyInternal2(QObject *, QEvent *)                         0x7fffebf6dc80 
20  QShortcutMap::dispatchEvent(QKeyEvent *)                                       0x7fffed2a56a8 

I keep slacking on writing down every step out of laziness and frustration. There is some simple combination, I'm sure. It seems just enough deleting and undoing and redoing and readding text box does it. I'm giving up on finding the steps to produce the infinite loop, but am going to fix the source bug...

In reply to by ericfontainejazz

Status (old) active fixed
Status active fixed
Tags View Changes

I couldn't delete the title frame second time in step 3, because it has already been deleted in step 2 :(
Eric, could you please verify the case using the latest master and reopen if the issue is still alive?