WiFi Example Guru Meditation Error

Posts: 23
Joined: Fri Jan 13, 2017 8:45 pm

WiFi Example Guru Meditation Error

Postby Paladin » Thu Mar 30, 2017 5:04 pm

So, I'm working from This Wifi Example, but it's not working correctly for me. This is the error from simply compiling and running the example code with the idf_monitor:

Code: Select all

I (1001) cpu_start: Starting scheduler on PRO CPU.
I (1090) phy: phy_version: 350, Mar 22 2017, 15:02:06, 1, 0
Guru Meditation Error of type LoadProhibited occurred on core  0. Exception was unhandled.
Register dump:
PC      : 0x400832be  PS      : 0x00060130  A0      : 0x80081630  A1      : 0x3ffaf380  
0x400832be: xQueueTakeMutexRecursive at /Users/alwynsmith/esp/esp-idf/components/freertos/./queue.c:2040

A2      : 0xa5a5a5a5  A3      : 0xffffffff  A4      : 0x00060120  A5      : 0x00000000  
A6      : 0x000000aa  A7      : 0x3ffafc20  A8      : 0x80082b58  A9      : 0x3ffaf370  
A10     : 0x00000003  A11     : 0x00060123  A12     : 0x00060120  A13     : 0x3ffafcd8  
A14     : 0x0000002a  A15     : 0x3ffafb60  SAR     : 0x0000001d  EXCCAUSE: 0x0000001c  
EXCVADDR: 0xa5a5a5a9  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xffffffff  

Backtrace: 0x400832be:0x3ffaf380 0x40081630:0x3ffaf3a0 0x40081710:0x3ffaf3d0 0x400d72c1:0x3ffaf3f0 0x400da496:0x3ffaf700 0x400d7361:0x3ffaf820 0x401001e4:0x3ffafb30 0x400dc231:0x3ffafb80 0x400d0c55:0x3ffafc40
0x400832be: xQueueTakeMutexRecursive at /Users/.../esp/esp-idf/components/freertos/./queue.c:2040

0x40081630: lock_acquire_generic at /Users/.../esp/esp-idf/components/newlib/./locks.c:147

0x40081710: _lock_acquire_recursive at /Users/.../esp/esp-idf/components/newlib/./locks.c:161

0x400d72c1: _vfprintf_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:862

0x400da496: __sbprintf at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:485

0x400d7361: _vfprintf_r at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/vfprintf.c:875

0x401001e4: printf at /Users/ivan/e/newlib_xtensa-2.2.0-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/stdio/../../../.././newlib/libc/stdio/printf.c:61

0x400dc231: app_main at /Users/.../esp/examples/esp32-tutorial/02_wifi_connection/main/./main.c:101

0x400d0c55: main_task at /Users/.../esp/esp-idf/components/esp32/./cpu_start.c:263

Entering gdb stub now.
Remote debugging using /dev/cu.usbserial-DN01J4DD
xQueueTakeMutexRecursive (xMutex=0xa5a5a5a5, xTicksToWait=4294967295)
    at /Users/.../esp/esp-idf/components/freertos/./queue.c:630
630			if( pxMutex->pxMutexHolder == ( void * ) xTaskGetCurrentTaskHandle() ) /*lint !e961 Cast is not redundant as TaskHandle_t is a typedef. */

User avatar
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: WiFi Example Guru Meditation Error

Postby kolban » Fri Mar 31, 2017 1:16 am

The exception seems to be being reported from a simple "printf()" call which has no substitution/insertion parameters which should be innocuous. What I would suggest is:

1. Change the printf(xxx) statements to ESP_LOGD("myTag", xxx) statements


2. Comment out line 72 of main.c which reads "setvbuf(stdout, NULL, _IONBF, 0);"

That last one is a guess but since many of us have used simple printf() calls with impunity, I am looking for something "uncommon" in the example code that might be causing an issue.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

Who is online

Users browsing this forum: Google [Bot] and 18 guests