-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Uploading large files to SPIFFS introduces wrong bytes in the files #924
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
Comments
Yes can reproduce with PR SPIFFS 0.3.3 also |
@me-no-dev I thing issue #792 can be stapled with the present one. |
back a few months ago when we had the first SPIFFS implementation there were no such issues. I think something in the driver is causing it and since @iggr wrote it this time, I hope he can help figuring it out |
@luc-github what is "PR SPIFFS 0.3.3"? |
Thanks for spotting this! Please try the fix in 4a3d20c. |
same thing :( |
@me-no-dev Sorry I should use link : #899 |
I was able to reproduce the issue using FSBrowser sample and 1 mb file filled with 0xff, before the fix. Not able to reproduce now. Are you sure the fix was applied? Can you try to re-upload clean FS image? |
@igrr what you mean by clean FS Image, use mkspiffs ? I did delete file and uploaded then downloaded without patch I have : I have deleted the file and applied the patch then uploaded then downloaded and I have : then I deleted, removed patch , upload then download and got : I am using #899 but not the FBBrowser sample but my simplified upload js |
@igrr I introduced an error in the source which showed during compilation, so patch is applied. No go on the fix though. |
maybe try using real data like larger image (what I use) |
Sorry mate, seems like I made the typo :) |
Actually with patch it is worse for me, not for you @me-no-dev ? |
@luc-github could you please share the complete sample to reproduce (sketch + data + png)? |
I use FM I did on my project (https://github.com/luc-github/ESP8266) the data is my dog's picture no issue to share 😄
|
@luc-github I did not check with larger image, but saw the error at the same exact spot which meant it did not work :) maybe should have checked if it had gotten worst |
Okay, got it to reproduce with a different file. Looking into it. |
That was a pretty lame bug. I fixed the number of bytes written for short (1-2 bytes) unaligned writes, but messed up the offset at which they were written in the process. Please try 74c16ec. |
New patch fix issue for me, thank you 😄 Also here a sample sketch/data as requested with my simplied uploader/ FM - sorry I am slow |
I can also confirm the fix works |
I have a verry interesting problem uploading larger files to the SPIFFS
if the file is larger than 226KB, I get at very particular points wrong bytes
those are exactly the next byte after 226KB, 364KB, 728KB and I imagine every 364KB after that
offsets correctpond to 0x38801, 0x5B001, 0xB6001, ... so on
and the wrong byte is usually only missing the first bit (if it's set) but sometimes the value is all around wrong
The text was updated successfully, but these errors were encountered: