lucadentella / esp32-tutorial

563 stars 233 forks source link

setvbuf(stdout, NULL, _IONBF, 0) crashes http client example #4

Closed brannan closed 6 years ago

brannan commented 6 years ago

First of all, your tutorials are awesome and have helped me a ton. Thank you!

If the setvbuf line is left in the http_client I get the following:

Connecting to xxxx... I (2122) event: sta ip: 192.168.1.53, mask: 255.255.255.0, gw: 192.168.1.1 connected!

IP Address: 192.168.1.53 CORRUPT HEAP: multi_heap.c:370 detected at 0x3ffc3d64 abort() was called at PC 0x40086c4f on core 0 0x40086c4f: multi_heap_assert at /Users/brannan/esp/esp-idf/components/heap/./multi_heap_platform.h:55 (inlined by) multi_heap_malloc_impl at /Users/brannan/esp/esp-idf/components/heap/./multi_heap.c:370

Comment out the call and all works well. The actual crash comes traces back to the subnet mask printf statement.

lucadentella commented 6 years ago

Brannan thanks for your comment, I fixed the code