musescore / MuseScore

MuseScore is an open source and free music notation software. For support, contribution, bug reports, visit MuseScore.org. Fork and make pull requests!
https://musescore.org
Other
12.23k stars 2.65k forks source link

Crash when selecting a specific rest or attempting to replace it with a note. #17292

Open tsadok opened 1 year ago

tsadok commented 1 year ago

Issue type

Crash or freeze

Bug description

Ran into this problem on 4.0.1, updated to 4.0.2, problem persisted. In my work in progress, there was a specific measure, containing two quarter notes followed by two eighth rests. Any attempt to select the first of those two rests, or replace it with a note, resulted in a crash. It was eventually discovered that the problem could be worked around by entering the desired sequence of notes for the measure in a different measure, and then cutting and pasting it into the measure with the problem. However, before doing this, I saved a copy of the file with the problem, so that the crash can be reproduced.

Standard Error Pastebin: https://pastebin.com/BhN6BbL7

Reddit thread wherein I was advised to file here: https://old.reddit.com/r/Musescore/comments/12safyn/crash_when_attempting_to_place_a_note_in_place_of/

Steps to reproduce

  1. Unzip buggy.zip
  2. Open buggy.mscz
  3. Pan to page 5.
  4. Find measure 27 (the last measure of the Piano part that has notes).
  5. On the treble staff of the piano part, add three successive quarter notes to measure 27.
  6. Crash occurs when adding the third note.

Screenshots/Screen recordings

No response

MuseScore Version

OS: Devuan GNU/Linux 4 (chimaera), Arch.: x86_64, MuseScore version (64-bit): 4.0.2-230651545, revision: github-musescore-musescore-dbe7c6d

Regression

I don't know

Operating system

Devuan Chimaera

Additional context

buggy.zip cpuinfo.txt free-h.txt

MarcSabatella commented 1 year ago

Confirmed, crashes also on master.

bkunda commented 1 year ago

Cannot reproduce on macOS.

DmitryArefiev commented 1 year ago

@tsadok @MarcSabatella I can't reproduce it on Windows10 or LinuxUbuntu with buggy.mscz. Can you try it again on the latest master please?

MarcSabatella commented 1 year ago

Still crashes for me in last night's master build, with the same file, same steps (adding three quarter notes to top staff of piano part, measure 27).

DmitryArefiev commented 1 year ago

That's strange.. You do the same as on this video?

https://user-images.githubusercontent.com/90187801/236236085-51e9dfb8-e9f3-41d8-a41a-ac57bd889758.mp4

(it's from Windows, I don't have a proper videocapture on Linux)

MarcSabatella commented 1 year ago

More or less the same, yes, except I'm not sure how you're actually doing the note input. For me, I select the full measure, then press N, then type C C C. Looks like you are doing something else but I can't quite tell what - something that changes the initial measure rest into individual rests before you begin entering notes. Maybe you are pressing 5 before entering note input mode? I also don't see the note input cursor appear before the first note, so I guess you are also pressing C before entering note input mode? I tried it that way, but it still crashes:

Screen recording 2023-05-04 9.18.35 AM.webm

DmitryArefiev commented 1 year ago

Thanks!

I select the full measure, then press N, then type C C C.

I used those steps as well but without crash. Tried on LinuxUbuntu and LinuxMint

DmitryArefiev commented 1 year ago

@Eism Maybe you can try on your Linux machine?

DmitryArefiev commented 1 year ago

@MarcSabatella or @tsadok Can you attach MS diagnostic files please (Menu bar->Diagnostic->Save diagnostic files)?

Maybe that helps (@Eism also can't reproduce the crash)

Thanks!

MarcSabatella commented 1 year ago

Here is the diagnostic package generated after crashing it with last nightly's master build - buggy-diagnostic.zip

MarcSabatella commented 1 year ago

BTW, I also tried running with a build that had AddressSantizer enabled, but unfortunately that did not crash. I also tried a version with no AddressSanitizer but with debug enabled, and it did crash, with slightly more info on the console:

07:35:20.890 | DEBUG | main_thread | ShortcutsController | activate: E
07:35:20.892 | INFO  | main_thread | ActionsDispatcher | dispatch: try call action: note-e
07:35:21.032 | DEBUG | main_thread | Score      | endCmd: Undo stack current macro child count: 4
07:35:21.041 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
07:35:21.052 | DEBUG | 135717761046272 | MuseSamplerWrapper | setCurrentPosition: Seek a new playback position, newPosition: 1764000
07:35:21.053 | DEBUG | 135717761046272 | MuseSamplerWrapper | setCurrentPosition: Seek a new playback position, newPosition: 1764000
07:35:21.053 | DEBUG | 135717761046272 | MuseSamplerWrapper | setCurrentPosition: Seek a new playback position, newPosition: 1764000
07:35:21.053 | DEBUG | 135717761046272 | MuseSamplerWrapper | setCurrentPosition: Seek a new playback position, newPosition: 1764000
07:35:21.071 | DEBUG | main_thread | UiActionsRegister | updateEnabledAll: currentCtx: UiCtxNotationFocused
malloc(): invalid next size (unsorted)
DmitryArefiev commented 1 year ago

@MarcSabatella Thanks for the info!

@Eism Can you check please when you have time