Add detection for corrupt MMPZ files

Got a great idea for the future of LMMS? Post it here.
Forum rules

Make sure to search to see if your idea has been posted before! Check our issue tracker as well, just to make sure you are not posting a duplicate: https://github.com/LMMS/lmms/issues

Proposal
When opening a project, LMMS should be able to detect errors in project files without crashing or hanging. Upon detecting a corrupt MMPZ file, LMMS should report the bad file and -- after the user has acknowledged the problem -- open a new default project.

Background
I recently spent lots of time on this issue. LMMS crashed while saving a project file and, in the process, corrupted the MMPZ file it was saving. I had previously configured LMMS to automatically open the most recent project at startup, so whenever I subsequently tried to run LMMS, it would choke on the corrupt MMPZ file and hang. LMMS offered no clues about why it would not start normally.
Jim wrote:
Tue Feb 27, 2024 9:10 pm
Proposal
When opening a project, LMMS should be able to detect errors in project files without crashing or hanging. Upon detecting a corrupt MMPZ file, LMMS should report the bad file and -- after the user has acknowledged the problem -- open a new default project.

Background
I recently spent lots of time on this issue. LMMS crashed while saving a project file and, in the process, corrupted the MMPZ file it was saving. I had previously configured LMMS to automatically open the most recent project at startup, so whenever I subsequently tried to run LMMS, it would choke on the corrupt MMPZ file and hang. LMMS offered no clues about why it would not start normally.
Agree, will make a hub-ticket for the issue.