Unable to load project I just saved - incorrect version (locale issue)
Closed this issue · 5 comments
(before everything - big thanks for the app! :))
Problem description:
I create a new project, save it, try to reopen it immediately.
I get the following error message:
"The project failed to load.
NESICIDE Project files must be version 0.3"
Probable cause:
In the serialization of the project object, I see this:
projectElement.setAttribute("version", 0.3);
The documentation of void QDomElement::setAttribute(const QString & name, float value)
specifies this: "The number is formatted according to the current locale."
My local specifies that the decimal separator is a comma, so the version (float) is saved as 0,3 instead of 0.3 in the project xml file.
However, during the opening of a project file, this value is loaded back as a string, and compared to the string 0.3, hence it fails with the above error message.
Environment:
Ubuntu 19.10 - NESICIDE Application version: v2.0.0 RELEASE
Thanks for the report. I think I will just make the version a string.
Latest Linux build should fix this let me know if not. Also I'm working on some stability issues reported in Windows, let me know if you see crashes on opening the app or on opening a project. Thanks.
...and yes, I'll be working on proper versioning and archival of old versions on my website.
Tested with the hello world project - Works like a charm, thanks for the superquick fix !
(I'm just beginning to use Nesicide, so I can't do a lot of extensive testing at this point :))
Welcome!