powertab / powertabeditor

View and edit guitar tablature.
https://powertab.github.io
GNU General Public License v3.0
531 stars 68 forks source link

Crash when adding repeat #449

Closed pellens closed 6 months ago

pellens commented 1 year ago

Description When I add a repeat ending to the tabs notation, PTE crashes

To Reproduce

  1. Select the end of the bar
  2. Click on the symbol 'Repeat ending' in the Toolbox window
  3. Select option 2
  4. Press OK
  5. Crash

Additional Info Segmentation fault 0# main in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 1# main in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 2# _sigtramp in /usr/lib/system/libsystem_platform.dylib 3# Barline::getPosition() const in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 4# SystemRenderer::drawAlternateEndings(ConstScoreLocation const&, LayoutInfo const&, double) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 5# SystemRenderer::drawSystemSymbols(ConstScoreLocation const&, LayoutInfo const&) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 6# SystemRenderer::operator()(System const&, int) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 7# ScoreArea::redrawSystem(int) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 8# PowerTabEditor::redrawSystem(int) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 9# QMetaObject::activate(QObject*, QMetaObject const*, int, void**) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 10# UndoManager::redrawNeeded(int) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 11# QMetaObject::activate(QObject*, QMetaObject const*, int, void**) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 12# QUndoStack::push(QUndoCommand*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 13# UndoManager::push(QUndoCommand*, int) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 14# PowerTabEditor::editRepeatEnding(bool) in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor 15# QMetaObject::activate(QObject*, QMetaObject const*, int, void**) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 16# QAction::activate(QAction::ActionEvent) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 17# QAbstractButton::isCheckable() const in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 18# QAbstractButton::mouseReleaseEvent(QMouseEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 19# QToolButton::mouseReleaseEvent(QMouseEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 20# QWidget::event(QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 21# QToolButton::event(QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 22# QApplicationPrivate::notify_helper(QObject*, QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 23# QApplication::notify(QObject*, QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 24# QCoreApplication::notifyInternal2(QObject*, QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 25# QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 26# QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 27# QDesktopWidget::qt_metacall(QMetaObject::Call, int, void**) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 28# QApplicationPrivate::notify_helper(QObject*, QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 29# QApplication::notify(QObject*, QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtWidgets.framework/Versions/5/QtWidgets 30# QCoreApplication::notifyInternal2(QObject*, QEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 31# QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtGui.framework/Versions/5/QtGui 32# QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtGui.framework/Versions/5/QtGui 33# qt_plugin_instance in /Applications/Power Tab Editor.app/Contents/PlugIns/platforms/libqcocoa.dylib 34# __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 35# __CFRunLoopDoSource0 in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 36# __CFRunLoopDoSources0 in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 37# __CFRunLoopRun in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 38# CFRunLoopRunSpecific in /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 39# RunCurrentEventLoopInMode in /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 40# ReceiveNextEventCommon in /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 41# _BlockUntilNextEventMatchingListInModeWithFilter in /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 42# _DPSNextEvent in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 43# -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 44# -[NSApplication run] in /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 45# qt_plugin_instance in /Applications/Power Tab Editor.app/Contents/PlugIns/platforms/libqcocoa.dylib 46# QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) in /Applications/Power Tab Editor.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 47# QCoreApplication::exec() in /Applications/Power Tab Editor.app/Contents/Frameworks/QtCore.framework/Versions/5/QtCore 48# main in /Applications/Power Tab Editor.app/Contents/MacOS/Power Tab Editor

Version Mac, PTE 2.0 beta

cameronwhite commented 1 year ago

I wasn't able to reproduce this - are you testing this just on the ending bar of a brand new file?

pellens commented 1 year ago

It happens in files I worked in and have a lot of notes written annotated, as well in brand new files without any notes...

BigHonkinDaddy commented 6 months ago

I was able to reproduce.
But I had never seen this before until I tried to reproduce the error to help out. It seems to only be an issue when you're in the very last position of the score. Now, why you'd want to add Repeat Ending at the end of score is curious. Nonetheless, seems to be a bug. Maybe its best to disable Repeat Ending (in both the Position Menu and on the Toolbox) if on the last position in the file.

cameronwhite commented 6 months ago

I think I originally read this as adding a new barline and setting its type to Repeat End, which worked fine. If I instead add an alternate ending (Music Symbols -> Repeat Ending) then I do reproduce the crash. Thanks!