Guru Meditation Error when using Loramesh and sockets



  • I'm using a LoPy4 with development firmware 1.19.0.b4 and the example loramesh code. This all works fine on a number of nodes. It is when I start to add extra code to access the Wlan and use the MQTT library that I start to see errors.

    The mqtt connect function generates the error on calling self.sock.connect(self.addr)

    The full error is:

    # code block
    Guru Meditation Error: Core  1 panic'ed (InstrFetchProhibited)
    . Exception was unhandled.
    Core 1 register dump:
    PC      : 0x00000000  PS      : 0x00060730  A0      : 0x800f8acd  A1      : 0x3ffddf70
    A2      : 0x3f94ec90  A3      : 0x3ffc900c  A4      : 0x0000075b  A5      : 0x00000002
    A6      : 0x00000000  A7      : 0x00000000  A8      : 0x800e3a3a  A9      : 0x3ffddf50
    A10     : 0x3f94ec90  A11     : 0x3ffddf70  A12     : 0x0000075b  A13     : 0x3ffddf74
    A14     : 0x00000001  A15     : 0x000006ca  SAR     : 0x0000001b  EXCCAUSE: 0x00000014
    EXCVADDR: 0x00000000  LBEG    : 0x400e3c22  LEND    : 0x400e3c38  LCOUNT  : 0x0000000e
    
    Backtrace: 0x00000000:0x3ffddf70 0x400f8aca:0x3ffddfa0 0x400f52e5:0x3ffddfc0 0x400f534d:0x3ffddfe0 0x401008ce:0x3ffde000 0x400f8bbc:0x3ffde0a0 0x400f52e5:0x3ffde120 0x400f534d:0x3ffde140 0x401008ce:0x3ffde160 0x400f8bbc:0x3ffde200 0x400f52e5:0x3ffde230 0x400f5312:0x3ffde250 0x400deece:0x3ffde270 0x400df13d:0x3ffde310 0x400dde77:0x3ffde330
    
    ================= CORE DUMP START =================
    

    Any ideas on what is causing this. If I remove the call to mqtt client connect then it runs without error.

    Cheers

    Andrew



  • This is the first thing I tried when I saw there was a new firmware release. After updating to the 1.2 release the code was tried again and still shows the same problem.

    Are there any changes to the socket library and the function parameters that has not yet been documented?

    Thanks

    Andrew



  • could you confirm this is still happening in the new 1.20 release https://forum.pycom.io/topic/4099/new-firmware-release-candidate-v1-20-0-rc0/



  • Tried the displaying memory, shows 2548704 bytes so not a low memory problem.



  • What about using :

    import gc
    ...
    gc.collect()
    print(gc.mem_free())
    

    with the last 2 lines in some parts of the code ?
    Maybe is low memory problem.


Log in to reply
 

Pycom on Twitter