Crash pasting an image

• Mar 5, 2021 - 04:07

Figured I'd mention quickly that I copied an image from an image editor, switched over to MuseScore, [ctrl+v]'d without thinking, and got a crash.

I think I had a [title text] within a [vertical frame] selected. As much as that isn't advisable behavior, it obviously shouldn't crash the program. Probably something to do with measure bases versus measures or something while getting the parent.


Hi, i got a crash when pasting an image to a key signature.

All ok when i paste an image to the title frame.

MuseScore 3.6.2 AppImage on Linux Mint 20.1

In reply to by Pentatonus

Hmm, now can...

Please report in the issue tracker

In Debug mode it dies on a failed assertion, trying to convert the image to a keysig?

Fatal: ASSERT: "e == 0 || e->isKeySig()" in file ...\libmscore\scoreElement.h, line 520

Doing the same thing onto a title text gives another failed assertion:

Fatal: ASSERT: "ted" in file ...\libmscore\textbase.cpp, line 3052

Fir for the latter is quite simple:

$ git diff
diff --git a/libmscore/textbase.cpp b/libmscore/textbase.cpp
index 31daa8325..f5290cd06 100644
--- a/libmscore/textbase.cpp
+++ b/libmscore/textbase.cpp
@@ -3049,7 +3049,8 @@ void TextBase::editCopy(EditData& ed)
 TextCursor* TextBase::cursor(const EditData& ed)
       TextEditData* ted = static_cast<TextEditData*>(ed.getData(this));
-      Q_ASSERT(ted);
+      if (!ted)
+          return nullptr;
       return &ted->cursor;

Do you still have an unanswered question? Please log in first to post your question.