"Save As" silently fails for some filenames
Reported version
3.6
Type
Ergonomical (UX)
Frequency
Once
Severity
S3 - Major
Reproducibility
Always
Status
duplicate
Regression
No
Workaround
Yes
Project
- Open a musescore file
- Save it as (for instance) "Example 2.1-1" (set "Example 2.1-1" in the name, click "save")
- Nothing is saved, no error is shown.
The file should be saved as Example 2.1-1 OR (equally correct) Example 2.1-1 suffixed with the musescore extension corresponding to the "save as" format.
Comments
Regression vs. what previous version?
What version exactly?
What Operating System?
And no it should never ever save without the proper extension. There's a Linux distribution notoriously know to do that, workaround is to use thw Advanced preferences tonight use the native file dialog
In reply to Regression vs. what previous… by Jojo-Schmitz
Hi.
I use the flatpak version (currently 3.6.2) on debian
Not sure it's a proper "regression" : The stable debian version (2.3.2) cuts part of the filename (after the dot?), but at least, something is saved !
Note that the native file dialog is activated (tonight!) in the flatpak version (I did not set that myself).
"And no it should never ever save without the proper extension". Well, relying on windows-like file extensions is not perfect either, no opinion on that. "Example 2.1-1.mscz" would be fine to me, as "Example 2.1-1" would be fine to me.
So not a regression, and a workaround. Saving without any extension.might be ok on Linux (and even there only locally), it isn't anywhere else though and MuseScore on Linux is just 1.7% of the users...
See #75851: extension mscz missing prevents opening the file why that is a bad idea
See also #151171: Use native "save file" dialogs by default and #138446: select file navigator
In reply to So not a regression, and a… by Jojo-Schmitz
Well, the issue is not at all about the way the file extension question is handled in musescore. As I said, I have no opinion on that.
The issue i did report is that, in this version, clicking "save" closes the "save as" box, does NOT save the file, and does NOT warn the user that nothing is saved.
That is why this issue is not a duplicate of those others ;-)
To be clear - extensions are not Windows-like, they are native to Linux as well.
My guess is the file was saved without the extension, but because it has no extension, it doesn't show later in the "open" dialog, because it is not recognized as a MuseScore file. That's perfectly ordinary behavior of pretty much any program on any OS if you save a file with no (or an incorrect) extension.
If you can verify that no file at all is saved on your system (on mine it certainly is), can you post screenshots and/or video demonstrating this?
I'm also using the Flatpak version of Musescore (3.6.2) on Debian-based MX Linux as the second operating system and I haven't had this kind of problem so far.
If you add one of the problematic files (which cannot be saved with the save as command), I can test it. // I assume that you have normally-saved at least one of the files that caused this problem before.
In reply to To be clear - extensions are… by Marc Sabatella
Hi
In case you read the issue a little to fast, I gave the precise steps to reproduce the bug (first message of the issue report) as well a description of the bug (same message and issue title), and the musescore version (third message).
If you're interested in documenting/reproducing the issue, just follow the precise steps I listed, which I think are sufficient.
Now if following exactly these steps with the same version does either create a file or trigger an error message, I can investigate a little more for you.
In reply to Hi In case you read the… by jeanpitou
When I was using your example, I had habitually added ".mscz" to the end, so it was fine.
see: attached screenshot
About to the problem that occurs when saving a previously unsaved file with the "save as" command:
The problem is caused by using the dot character(s). The character after the last dot is assumed to be the file extension. In fact, if there are two dots in the file name, depending on the situation: part of the file name can be considered as directory, file name and suffix.
You can actually generate this error (not silently, but with a warning window) in the featherpad text editor. Open a new file, give the command "save as" and type test2.1-1.1 as the filename. An error message will appear immediately.
from the errorlog:
And yes the QTdialog (or whatever dialog system is being used) must somehow understand the return of the system error message and pass it on to the user (like featherpad does). But it is also possible that this problem is disappearing between System => QT <=> Flatpak.
Workaround: Try not to use dot characters in the filename. If you do, make sure to include the file extension (".mscz"). // Note: If you have opened a previously saved file, the file extension is already attached and visible. when you try to save it with the "save as" command. Put the new filename before the ".mscz" suffix.
In reply to When I was using your… by Ziya Mete Demircan
The Qt dialog though is only used when not using the native file dialogs and those are the default
@Ziya Mete Demircan Thanks for taking the time to reproduce the bug !
In the current version of MuseScore/src/userscores/internal/filescorecontroller.cpp
The following methods
void FileScoreController::saveScore()
void FileScoreController::saveScoreAs()
void FileScoreController::saveScoreCopy()
void FileScoreController::saveSelection()
all contain these copy-pasted lines :
if (selectedFilePath.empty()) {
return;
}
followed by :
doSaveScore(...)
So if I understand correctly these lines and if they have not been changed since the flatpak release I used, it seems the explanation of the issue is that the error path is simply ignored (treated as if the "cancel" button of the save dialog had been pressed) when an error message should be shown.
In reply to @Ziya Mete Demircan Thanks… by jeanpitou
Musescore must have a filter in its source code so that the software can know the file-type it can save at that time and show the previously saved ones in that save/save-as window.
If all the save/save as/save copy code is this much, it must be calling another function.
Also:
There must be an "errorlevel" detection followed by a redirection to a function (there is probably a function that evaluates the error-codes returned from the system).
Unfortunately, I didn't pay much attention to the source code of this software, except for a couple of places linked in the forum before. At the moment, I can only think about what should or shouldn't be there for me and write my predictions about it.
Beyond that, it's up to the software developers.
See #297613: File save can't determine file type without extension