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

Crash after pasting a specific selection #22097

Open
sclsj opened this issue Mar 29, 2024 · 6 comments
Open

Crash after pasting a specific selection #22097

sclsj opened this issue Mar 29, 2024 · 6 comments
Assignees
Labels
crash Issues involving a crash of MuseScore waiting reply from user

Comments

@sclsj
Copy link

sclsj commented Mar 29, 2024

Issue type

Crash or freeze

Bug description

Copy pasted a certain selection - program crashed

Steps to reproduce

  1. Store this data in your clipboard (viewed using clipboard viewer)
    com.trolltech.anymime.application--musescore--stafflist.txt
  2. Paste this in a score
  3. MuseScore 4 should crash (reproduced using both my own native compiled version and official release)

Screenshots/Screen recordings

mscore crashes.zip

MuseScore Version

4.2.1 (lastest)

Regression

I don't know

Operating system

macOS 12

Additional context

I copied from a selection in a project I was working on. Let me know if you want the project. Unfortunately I don't have that project saved when musescore crashes so I'm not sure if it still contained content that can trigger this bug.

@muse-bot muse-bot added the crash Issues involving a crash of MuseScore label Mar 29, 2024
@DmitryArefiev
Copy link
Contributor

@sclsj Please add more details to repro steps. What should be copied/pasted from this long txt file?

bandicam.2024-03-29.12-31-56-203.mp4

@sclsj
Copy link
Author

sclsj commented Mar 29, 2024

This should be written to the clipboard (pasteboard) under the key com.trolltech.anymime.application--musescore--stafflist.

@sclsj

This comment was marked as outdated.

@sclsj

This comment was marked as outdated.

@sclsj

This comment was marked as outdated.

@sclsj
Copy link
Author

sclsj commented Mar 29, 2024

Try this solution by GPT-4. It works on my machine.
https://chat.openai.com/share/af60cb29-1d38-4feb-a95d-23af5fa12809

TL;DR: compile this swift snippet swiftc -o copyToClipboard copyToClipboard.swift, and run it on the downloaded com.trolltech.anymime.application--musescore--stafflist.txt file:

import Cocoa

let filePath = CommandLine.arguments[1]
let customMimeType = "com.trolltech.anymime.application--musescore--stafflist"
let pasteboard = NSPasteboard.general

do {
    let fileContent = try String(contentsOfFile: filePath)
    pasteboard.declareTypes([NSPasteboard.PasteboardType(rawValue: customMimeType)], owner: nil)
    pasteboard.setString(fileContent, forType: NSPasteboard.PasteboardType(rawValue: customMimeType))
} catch {
    print("Failed to read the file or copy to clipboard: \(error)")
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
crash Issues involving a crash of MuseScore waiting reply from user
Projects
None yet
Development

No branches or pull requests

5 participants