Replies: 6 comments 34 replies
-
Hi @Jason2866,
I tested reading different chunks of data to test switching between But its good that we released the 2.0.3-RC1 and all of you are testing that. I can say that the SDWebServer is not working with switching between read/fread or only when using read(). Its works only with fread() (the previous implementation). I'm testing and sorting out why its not working at all. I will appriciate any advices or test cases/sketches to be able to test more scenarios. |
Beta Was this translation helpful? Give feedback.
-
Answer for @s-hadinger comment in PR. To be able to discuss everything in one place :)
I have tested this in Arduino and I don't get wrong results as you did, everything is good. Scenario 1 - read 128 + read 128
Scenario 2 - read 128 + read 256
I will give a great example - Thanks to @igrr Now imagine you call fread to read 16 bytes, then call read to read 512 bytes.
So as a result, the first call reads bytes 0-15 from the file, and the next call reads bytes 128-667 from the file, instead of 16-571. Bytes 16-255 are still stuck in FILE* internal buffer. You can only call I have tested different scenarios where its switches between The table below show how bytesinbuf and pointer behave. The read 512 is the only one called that call read directly (size > 128)
|
Beta Was this translation helpful? Give feedback.
-
Thank you for the detailed explanation. But "somewhere" is "something" wrong which generates issues. |
Beta Was this translation helpful? Give feedback.
-
@Jason2866 @s-hadinger
|
Beta Was this translation helpful? Give feedback.
-
Created new PR #6536 - with all changes. Please if you can test this. Edited file.seek to be working. |
Beta Was this translation helpful? Give feedback.
-
New PR created #6569. |
Beta Was this translation helpful? Give feedback.
-
Since this commit we have crashes using the Filesystem. Reverted the PR, Filesystem and SD Card useage is working again. Tbh, not really fully understanding what the PR does.
See comment #6456 (comment) too
@P-R-O-C-H-Y @me-no-dev
Beta Was this translation helpful? Give feedback.
All reactions