Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MU4 Issue] MuseScore quits instead of just closing score #13764

Closed
HemantAntony opened this issue Oct 14, 2022 · 14 comments
Closed

[MU4 Issue] MuseScore quits instead of just closing score #13764

HemantAntony opened this issue Oct 14, 2022 · 14 comments

Comments

@HemantAntony
Copy link
Contributor

Describe the bug
When you press Ctrl + W to close the open score, it

To Reproduce
Steps to reproduce the behavior:

  1. Open any score
  2. Press Ctrl + W
  3. MuseScore quits

Expected behavior
Only the score should close instead of the whole app

Screenshots

2022-10-14.21-39-44.mp4

Platform information

  • OS: Ubuntu 22.04 LTS

Additional context
For the Devs, this problem occurs because there is more than one instance of the app open. Hence quitApp becomes true, hencing forcing MU4 to quit. I would've attempted to fix this. But this lead to bunch of things about IpcSocket (It sounds too complicated :) )

Also, if no one can reproduce this, ask for any other info you might need

@HemantAntony
Copy link
Contributor Author

This might be related to #13698. However, in that issue it states that the issue is a crash. Hence I thought it might be a different issue. But they both do look similar

@Eism
Copy link
Contributor

Eism commented Oct 15, 2022

@HemantAntony
Yes, it's the same bug(#13698)
Please check the build from #13774

@Eism
Copy link
Contributor

Eism commented Oct 15, 2022

Ah, I missed additional information.

For the Devs, this problem occurs because there is more than one instance of the app open.

This is expected behaviour. See #9966

@HemantAntony
Copy link
Contributor Author

@Eism but that behaviour is only when there are more than 1 projects open. This issue occurs when only one project is open. So MuseScore should not close

The bug is that there are two app instances in the code when in reality there is only one

@Eism
Copy link
Contributor

Eism commented Oct 17, 2022

@HemantAntony make sure you have only one instance open.
I can't reproduce

@HemantAntony
Copy link
Contributor Author

HemantAntony commented Oct 17, 2022

I only do have one instance open

If no one can reproduce, I guess I will try to figure out what the problem is (emphasis on try :) )

@AntonioBL
Copy link
Contributor

Ciao.
I managed to reproduce it most of times with these steps:
1- Open MuseScore
2- Open a recent score ("score1") from the dashboard
3- Open another recent score ("score2") from the "recent files" menu
4- close score2 with Ctrl + w
5- close score1 with Ctrl + w -> MuseScore quits
In case, repeat the previous steps (i.e. open two scores from recent file menu and close one after the other)

Linux Mint 20.3, Arch.: x86_64, MuseScore version (64-bit): 4.0.0-3239707478, revision: github-musescore-musescore-2d8a581

@HemantAntony
Copy link
Contributor Author

@AntonioBL Hello, that is sadly(?) another issue #10399

@DmitryArefiev
Copy link
Contributor

@HemantAntony Can you do a factory reset, restart OS and then try again using build from #13774 ?

Maybe that helps..

@HemantAntony
Copy link
Contributor Author

When I test this issue after booting from a LiveUSB, this doesn't occur. Hence, likely something to do with my system :(
See this comment

@sammik
Copy link
Contributor

sammik commented Nov 1, 2022

Happens again in latest nightly.

Closing.score.quits.app.mp4

@DmitryArefiev
Copy link
Contributor

Happens again in latest nightly.

@sammik Can't reproduce it on my LinuxUbuntu 22.04

Did you try this build?
https://github.com/musescore/MuseScore/actions/runs/3366843472

@sammik
Copy link
Contributor

sammik commented Nov 1, 2022

Happens again in latest nightly.

@sammik Can't reproduce it on my LinuxUbuntu 22.04

Did you try this build? https://github.com/musescore/MuseScore/actions/runs/3366843472

@DmitryArefiev I tried build You sent me also with factory reset.

Same result - after closing score, MU quits.

here is terminal:

./MuseScoreNightly-202211010452-master-97bad50-x86_64.AppImage -F /lib/x86_64-linux-gnu/libjack.so.0 /lib/x86_64-linux-gnu/libnss3.so QEventLoop: Cannot be used without QApplication QEventLoop: Cannot be used without QApplication 18:22:07.296 | INFO | main_thread | GlobalModule | onPreInit: log path: /home/samko/.local/share/MuseScore/MuseScore4Development/logs/MuseScore_221101_182207.log 18:22:07.296 | INFO | main_thread | GlobalModule | onPreInit: === Started MuseScore 4.0.0-Development, build number 223050435 === 18:22:07.315 | ERROR | main_thread | LanguagesService | setCurrentLanguage: Error loading translator "/tmp/.mount_MuseScXClIjR/share/mscore4portablenightly-4.0//locale/qt_sk.qm" 18:22:07.541 | INFO | main_thread | DiagnosticsModule | onInit: success start crash handler 18:22:07.545 | WARN | main_thread | Qt | QIODevice::read (QFile, "/home/samko/.local/share/MuseScore/MuseScore4Development/shortcuts.xml"): device not open 18:22:07.545 | WARN | main_thread | Qt | QIODevice::read (QFile, "/home/samko/.local/share/MuseScore/MuseScore4Development/midi_mappings.xml"): device not open 18:22:08.238 | ERROR | main_thread | WorkspaceManager | findWorkspaceFiles: [401] The file does not exist 18:22:08.238 | WARN | main_thread | WorkspaceManager | setupDefaultWorkspace: not found default workspace, will be created new 18:22:08.239 | ERROR | main_thread | PluginsConfiguration | updatePluginsConfiguration: [401] The file does not exist 18:22:08.244 | WARN | main_thread | CloudService | readTokens: Could not find the tokens file: /home/samko/.local/share/MuseScore/MuseScore4Development/cred.dat 18:22:08.246 | INFO | main_thread | IpcSocket | connect: success connected to ipc server 18:22:11.302 | ERROR | main_thread | UpdateService | parseRelease: failed parse, err: "neplatná hodnota" 18:22:11.302 | ERROR | main_thread | UpdateScenario | doCheckForUpdate: unable to check for update, error code: 21, 18:22:18.743 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: file-new 18:22:18.805 | ERROR | main_thread | AppShell | run: error: qrc:/qml/MuseScore/Project/internal/NewScore/KeySignatureSettings.qml:116:13: QML KeySignatureListView: Binding loop detected for property "rows"

18:22:18.805 | WARN | main_thread | Qt | qrc:/qml/MuseScore/Project/internal/NewScore/KeySignatureSettings.qml:116:13: QML KeySignatureListView: Binding loop detected for property "rows"
18:22:23.949 | ERROR | main_thread | AppShellConfiguration | sessionProjectsPaths: [401] The file does not exist
18:22:23.987 | INFO | main_thread | NotationProject | doSave: success save file: "/home/samko/.local/share/MuseScore/MuseScore4Development/new_project.mscz"
18:22:24.201 | ERROR | 140467224172096 | SynthResolver | resolveSynth: invalid audio source params for trackId: 0
18:22:24.286 | INFO | 140467224172096 | FluidSynth | addSoundFonts: success load soundfont: /tmp/.mount_MuseScXClIjR/share/mscore4portablenightly-4.0/sound/MS Basic.sf3
18:22:24.287 | INFO | 140467224172096 | FluidSynth | addSoundFonts: success load soundfont: /tmp/.mount_MuseScXClIjR/share/mscore4portablenightly-4.0/sound/MS Basic.sf3
18:22:26.137 | ERROR | 140467224172096 | SynthResolver | resolveSynth: invalid audio source params for trackId: 1
18:22:26.143 | INFO | 140467224172096 | FluidSynth | addSoundFonts: success load soundfont: /tmp/.mount_MuseScXClIjR/share/mscore4portablenightly-4.0/sound/MS Basic.sf3
18:22:26.144 | INFO | 140467224172096 | FluidSynth | addSoundFonts: success load soundfont: /tmp/.mount_MuseScXClIjR/share/mscore4portablenightly-4.0/sound/MS Basic.sf3
18:22:26.294 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: file-close
18:22:28.239 | WARN | main_thread | MuseSamplerResolver | clearSources: Not supported!!
18:22:28.266 | INFO | main_thread | ActionsDispatcher | dispatch: try call action: quit
18:22:28.284 | INFO | main_thread | Profiler |

Main thread. Top 150 by sum time (total count: 144)
Function Call time Call count Sum time
StartupScenario::onStartupPageOpened 5529.462 ms 1 5529.462 ms
PluginsService::init 634.716 ms 1 634.716 ms
PluginsService::readPlugins 625.187 ms 1 625.187 ms
DockWindow::loadPage 98.434 ms 5 492.171 ms
DockWindow::loadPageContent 72.122 ms 4 288.486 ms
DockWindow::addDock 4.050 ms 64 259.198 ms
DockWindow::loadPanels 39.931 ms 4 159.724 ms
TemplatesModel::load 153.799 ms 1 153.799 ms
TemplatesRepository::templates 112.372 ms 1 112.372 ms
TemplatesRepository::readTemplates 12.377 ms 9 111.396 ms
StartupScenario::run 97.262 ms 1 97.262 ms
DockWindow::loadToolBars 18.692 ms 4 74.766 ms
UiActionsRegister::updateEnabledAll 2.853 ms 24 68.464 ms
DockWindow::restorePageState 14.192 ms 4 56.768 ms
DockWindow::restoreLayout 28.343 ms 2 56.686 ms
AbstractMenuModel::setItems 2.092 ms 26 54.403 ms
NotationProject::load 22.234 ms 2 44.468 ms
NotationProject::doLoad 21.999 ms 2 43.997 ms
TemplatesModel::loadAllCategories 41.392 ms 1 41.392 ms
InstrumentsRepository::load 40.101 ms 1 40.101 ms
TemplatesModel::updateTemplatesByCurrentCategory 37.871 ms 1 37.871 ms
NotationProject::save 37.625 ms 1 37.625 ms
AbstractNotationPaintView::load 12.294 ms 3 36.883 ms
EngravingProject::loadMscz 17.427 ms 2 34.853 ms
ScoreReader::loadMscz 17.422 ms 2 34.844 ms
NotationProject::createNew 34.178 ms 1 34.178 ms
NotationProject::loadTemplate 33.987 ms 1 33.987 ms
DockWindow::loadTopLevelToolBars 7.641 ms 4 30.564 ms
MasterNotation::applyOptions 25.748 ms 1 25.748 ms
dock::clearRegistry 4.537 ms 5 22.683 ms
InstrumentListModel::loadInstruments 7.426 ms 2 14.853 ms
NotationSwitchListModel::loadNotations 4.829 ms 3 14.487 ms
NotationSwitchListModel::load 7.155 ms 2 14.311 ms
DockBase::componentComplete 0.229 ms 57 13.066 ms
DockWindow::onQuit 12.899 ms 1 12.899 ms
SoundFontRepository::loadSoundFontPaths 12.322 ms 1 12.322 ms
LanguagesService::init 11.580 ms 1 11.580 ms
AppMenuModel::load 10.760 ms 1 10.760 ms
PluginsService::scanFileSystemForPlugins 9.363 ms 1 9.363 ms
PluginsService::registerShortcuts 9.351 ms 1 9.351 ms
DockBase::applySizeConstraints 0.065 ms 144 9.297 ms
LanguagesService::setCurrentLanguage 8.187 ms 1 8.187 ms
InstrumentListModel::load 7.696 ms 1 7.696 ms
InstrumentListModel::loadGroups 3.730 ms 2 7.460 ms
NavigationController::onActiveRequested 0.432 ms 17 7.352 ms
DockWindow::savePageState 1.825 ms 4 7.300 ms
InstrumentListModel::init 7.271 ms 1 7.271 ms
Score::doLayoutRange 1.209 ms 6 7.255 ms
LayoutSystem::collectSystem 0.184 ms 37 6.809 ms
LayoutPage::collectPage 1.019 ms 6 6.117 ms
DockWindow::windowState 1.214 ms 5 6.070 ms
CloudService::init 5.437 ms 1 5.437 ms
Score::update 1.536 ms 3 4.607 ms
MasterNotation::setMasterScore 2.155 ms 2 4.310 ms
MStyle::read 2.057 ms 2 4.115 ms
EngravingProject::setupMasterScore 1.920 ms 2 3.840 ms
EngravingProject::doSetupMasterScore 1.919 ms 2 3.837 ms
LanguagesService::loadLanguages 3.257 ms 1 3.257 ms
NotationActionController::canReceiveAction 0.002 ms 1793 3.202 ms
Score::doLayout 1.015 ms 3 3.046 ms
DockWindow::initDocks 0.634 ms 4 2.536 ms
NavigationControl::setPanel 0.003 ms 675 2.286 ms
UiActionsRegister::updateEnabled 0.427 ms 5 2.135 ms
UiContextResolver::currentUiContext 0.002 ms 1014 1.952 ms
DockPageView::init 0.474 ms 4 1.897 ms
ShortcutsRegister::reload 1.859 ms 1 1.859 ms
ShortcutsRegister::readFromFile 0.712 ms 2 1.424 ms
InstrumentsPanelTreeModel::clear 0.685 ms 2 1.371 ms
DockWindow::componentComplete 1.012 ms 1 1.012 ms
AbstractNotationPaintView::onViewSizeChanged 0.230 ms 4 0.919 ms
UiActionsRegister::updateShortcutsAll 0.356 ms 2 0.711 ms
SymNames::loadNameToSymIdHash 0.666 ms 1 0.666 ms
NavigationController::activePanel 0.001 ms 1015 0.636 ms
AbstractNotationPaintView::setScaling 0.123 ms 5 0.617 ms
AbstractNotationPaintView::scale 0.307 ms 2 0.614 ms
NavigationPanel::addControl 0.001 ms 671 0.481 ms
DockWindow::saveGeometry 0.479 ms 1 0.479 ms
NotationActionController::init 0.475 ms 1 0.475 ms
UiActionsRegister::updateChecked 0.067 ms 7 0.472 ms
NavigationController::doDeactivatePanel 0.017 ms 27 0.472 ms
NavigationController::activeSection 0.000 ms 1015 0.445 ms
NavigationController::doDeactivateSection 0.074 ms 6 0.444 ms
NavigationController::doDeactivateControl 0.004 ms 94 0.388 ms
Score::setUpTempoMap 0.004 ms 91 0.345 ms
DockPanelMenuModel::load 0.021 ms 14 0.292 ms
AbstractNotationPaintView::onNotationSetup 0.145 ms 2 0.290 ms
InstrumentsOnScoreListModel::load 0.281 ms 1 0.281 ms
AbstractNotationPaintView::onCurrentNotationChanged 0.093 ms 3 0.279 ms
ShortcutsRegister::makeUnique 0.253 ms 1 0.253 ms
NavigationPanel::setSection_property 0.001 ms 221 0.245 ms
InstrumentsOnScoreListModel::loadOrders 0.242 ms 1 0.242 ms
InstrumentsPanelTreeModel::load 0.240 ms 1 0.240 ms
InstrumentsPanelContextMenuModel::loadItems 0.199 ms 1 0.199 ms
NotationStatusBarModel::load 0.086 ms 2 0.173 ms
NavigationController::activeControl 0.007 ms 23 0.160 ms
UiActionsRegister::updateCheckedAll 0.160 ms 1 0.160 ms
AbstractNotationPaintView::forceFocusIn 0.078 ms 2 0.156 ms
DockWindow::registerDock 0.002 ms 68 0.149 ms
void createMeasures(mu::engraving::Score*, const mu::notatio0.138 ms 1 0.138 ms
AbstractNotationPaintView::moveCanvasToCenter 0.033 ms 4 0.134 ms
InspectorListModel::setElementList 0.043 ms 3 0.129 ms
NoteInputBarModel::data 0.000 ms 395 0.100 ms
CloudService::readTokens 0.074 ms 1 0.074 ms
NotationPageModel::init 0.037 ms 2 0.073 ms
ProjectConfiguration::recentProjectPaths 0.071 ms 1 0.071 ms
ProjectConfiguration::scanCloudProjects 0.065 ms 1 0.065 ms
NavigationSection::addPanel 0.001 ms 93 0.058 ms
NavigationController::reg 0.001 ms 39 0.057 ms
PluginsConfiguration::readPluginsConfiguration 0.057 ms 1 0.057 ms
InstrumentListModel::loadGenres 0.056 ms 1 0.056 ms
NavigationPanel::removeControl 0.001 ms 101 0.055 ms
InstrumentsPanelTreeModel::loadMasterPart 0.043 ms 1 0.043 ms
ShortcutsRegister::expandStandardKeys 0.019 ms 2 0.038 ms
AbstractNotationPaintView::notationContentRect 0.000 ms 91 0.032 ms
PlaybackEventsRenderer::render 0.000 ms 96 0.031 ms
AbstractNotationPaintView::verticalScrollbarSize 0.003 ms 11 0.030 ms
SelectableItemListModel::setItems 0.029 ms 1 0.029 ms
ShortcutsRegister::mergeShortcuts 0.029 ms 1 0.029 ms
NavigationSection::removePanel 0.001 ms 42 0.026 ms
InstrumentListModel::sortInstruments 0.021 ms 1 0.021 ms
AbstractNotationPaintView::horizontalScrollbarSize 0.002 ms 11 0.019 ms
NotationPageModel::updateDrumsetPanelVisibility 0.008 ms 2 0.017 ms
AbstractNotationPaintView::constraintCanvas 0.005 ms 3 0.014 ms
AbstractNotationPaintView::startHorizontalScrollPosition 0.001 ms 20 0.014 ms
NavigationController::unreg 0.001 ms 10 0.014 ms
AbstractNotationPaintView::scrollableAreaRect 0.004 ms 3 0.012 ms
MasterNotation::initExcerptNotations 0.006 ms 2 0.011 ms
AbstractNotationPaintView::ensureViewportInsideScrollableAre0.005 ms 2 0.010 ms
AbstractNotationPaintView::updateLoopMarkers 0.010 ms 1 0.010 ms
AbstractNotationPaintView::startVerticalScrollPosition 0.000 ms 20 0.009 ms
MasterNotation::doSetExcerpts 0.004 ms 2 0.008 ms
T* findNearestEnabled(const std::set<T*>&, const mu::ui::INa0.003 ms 3 0.008 ms
AbstractNotationPaintView::onNoteInputStateChanged 0.005 ms 1 0.005 ms
SlurSegment::avoidCollisions 0.001 ms 6 0.005 ms
Workspace::rawData 0.001 ms 4 0.003 ms
AbstractNotationPaintView::verticalScrollableSize 0.000 ms 10 0.003 ms
AbstractNotationPaintView::horizontalScrollableSize 0.000 ms 10 0.003 ms
UiArrangement::toolConfig 0.003 ms 1 0.003 ms
AbstractNotationPaintView::onPlayingChanged 0.002 ms 2 0.003 ms
T* findNearestEnabled(const std::set<T*>&, const mu::ui::INa0.001 ms 3 0.003 ms
DockWindow::restoreGeometry 0.002 ms 1 0.002 ms
UiConfiguration::readThemes 0.002 ms 1 0.002 ms
AbstractNotationPaintView::canvasCenter 0.001 ms 1 0.001 ms
ProjectConfiguration::parseRecentProjectsPaths 0.000 ms 1 0.000 ms

Other threads. Top 150 by sum time (total count: 15)
Function Call time Call count Sum time
LearnService::th_requestPlaylist 448.950 ms 2 897.899 ms
LearnService::th_requestPlaylist 526.956 ms 1 526.956 ms
LearnService::th_requestPlaylist 362.570 ms 1 362.570 ms
SynthResolver::resolveSynth 22.673 ms 4 90.692 ms
AbstractNotationPaintView::paint 32.550 ms 2 65.101 ms
NotationPainting::doPaint 64.683 ms 1 64.683 ms
AbstractNotationPaintView::paint 36.436 ms 1 36.436 ms
NotationPainting::doPaint 36.327 ms 1 36.327 ms
AbstractNotationPaintView::paintBackground 0.183 ms 2 0.365 ms
NotationPainting::paintPageSheet 0.197 ms 1 0.197 ms
SynthResolver::resolveAvailableResources 0.091 ms 1 0.091 ms
NotationPainting::paintPageSheet 0.075 ms 1 0.075 ms
AbstractNotationPaintView::paintBackground 0.074 ms 1 0.074 ms
SlurSegment::avoidCollisions 0.001 ms 2 0.002 ms
FxResolver::resolveFxList 0.000 ms 1 0.000 ms

18:22:28.284 | INFO | main_thread | AppShell | run: activeThreadCount: 0
18:22:28.391 | INFO | 140467232564800 | {anonymous} | alsaThread: exit
18:22:28.511 | INFO | main_thread | | main: Goodbye!! code: 0

@DmitryArefiev
Copy link
Contributor

@sammik Thanks!

@Eism Maybe you can help with terminal details please?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants