Skip to content

Yield context issue #2399

Closed
Closed
@luc-github

Description

@luc-github

I am using Git version and ESP12F CPU 160Mz 4MB/1MB SPIFFS and SD card library https://github.com/greiman/SdFat/tree/master/SdFat

when using :

File datafile = SD.open((char *)path.c_str());
                  if (!datafile){
                       LOG("Cannot open file!\n");
                       web_interface->WebServer.sendContent_P(NOT_AUTH_NF);
                       page_not_found = true;
                    }
                if (web_interface->WebServer.streamFile(datafile, contentType) != datafile.size()) {
                    LOG("Sent less data than expected!\n");
                    }
                else LOG("Stream done\n");

I have a crash when downloading files bigger than few Kb but no issue with small files
I have opened an issue on sdfat greiman/SdFat#39 and conclusion it is yield issue on esp core
Discussion with @me-no-dev and @martinayotte on gitter start here : https://gitter.im/esp8266/Arduino?at=57b1da0323f0cacc34e7e119
and end here: https://gitter.im/esp8266/Arduino?at=57b1e7dabe8025f16943d246

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions