-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Some issues with large files #3293
Conversation
37af31b
to
f39937d
Compare
This is ready for review. |
I moved the message box to the end as it would interrupt the song playing. First take care of everything and remove lock, then disappoint the user... Me thinks |
5b997c9
to
b2e795e
Compare
I've updated the first post with an explanation of the fix. I think this is a reasonable fix for now. |
You've added a |
b2e795e
to
fd49f55
Compare
* Prevent crash on loading too large or long sample * Move message box to the end * Fix export from command line with large files
In response to two related crashes in SampleBuffer.cpp as commented in #3205
I substituted the command line messages for a message box.
I haven't touched the original 100 MB size limit and have added a 1 hour length check.
FIx explained:
I add a bool,
fileLoadError
, which is set to false, should the file fail on one of the tests. I add a test for file length as a compressed file of small size when decompressed will take a much bigger size so the important fact to know for LMMS is not the file size but the length of the sample. This operation takes a bit of time to carry out compared to the file size test so we wait to see if that one passes and then carry on testing the length of the sample.If the file is marked fileLoadError == true, the buffer will be written with one sample, value 0, and after removing possible locks a message is shown. The message is only for information and is shown after the locks are removed so the project isn't frozen while waiting for 'OK' to be pressed. The old message was to the command line and of little use to an ordinary user.
Some issues that remain with opening large files:
SampleBuffer::update()
.