MuseScore icon indicating copy to clipboard operation
MuseScore copied to clipboard

Crash while typing in palettes search

Open avvvvve opened this issue 1 year ago • 3 comments

Issue type

Crash or freeze

Bug description

Sometimes, while typing in the search bar in the palettes panel, MuseScore 4.3 crashes.

This has happened to me 5 or 6 times but I can't figure out exact steps to replicate it. It feels random but usually does not happen when using the search right after opening a score.

Steps to reproduce

  1. Have a score open for a while, do some engraving
  2. Open palettes
  3. Type in the search bar
  4. Crash

Screenshots/Screen recordings

No response

MuseScore Version

MuseScore version (64-bit): 4.2.1-240230937, revision: github-musescore-musescore-d757433

Regression

Yes, this used to work in a previous version of MuseScore 4.x

Operating system

OS: macOS 14.1, Arch.: x86_64

Additional context

No response

avvvvve avatar Feb 23 '24 14:02 avvvvve

Looks like this was mentioned in #12753 in 4.0 so maybe it's not a regression

avvvvve avatar Feb 23 '24 14:02 avvvvve

Reproduced (let's keep this open)

PaletteSearchCrash.zip

zacjansheski avatar Feb 23 '24 19:02 zacjansheski

@Eism can you look at that crash report? I reproduced shortly after a factory reset so it should be pretty clean

Definitely a squirrely crash

zacjansheski avatar Feb 23 '24 19:02 zacjansheski

Please check whether the crash depends on the open tooltip on palete element?

  1. start searching
  2. hover over the found element
  3. clear search by Ctrl+Backspace

And the same thing, but without the second point

Eism avatar Feb 26 '24 13:02 Eism

It does seem to do with mouse placement... still haven't quite found the culprit

https://github.com/musescore/MuseScore/assets/69917893/a9dda448-3140-4fe7-b167-bbb9f42dcba9

zacjansheski avatar Feb 26 '24 14:02 zacjansheski

So if the cursor is hovering over an element that changes when searching something new, the crash is easy to reproduce

https://github.com/musescore/MuseScore/assets/69917893/0eb30866-712e-4a55-ac0c-5d5f567cfa7e

zacjansheski avatar Feb 26 '24 14:02 zacjansheski

I can confirm this. Crash happens in QmlToolTip::showToolTip (in moc_qmltooltip.cpp). See attached acreenshot. I am able to reproduce it relatively easily by hovering over a palette element and before the tooltip appears (I think the delay is 500ms) I press CTRL+F9 quickly. Most likely sometimes showToolTip gets called on a destroyed element even though there is logic that hides/cancels the tooltip when the element gets destroyed. It looks like depending on the timing, this does not always work which explains the random behavior. palette_search_crash .

krasko78 avatar Feb 26 '24 16:02 krasko78