Crashes on ESP8266 - Exception (29)

App with worked great, until I added Adafruit GFX library and started to work with ST7735 display. Now it crashes right in the first occurence of calling thing.handle(). Any suggestion is much appreciated.

Here is decoded stack and error:

Exception 29: StoreProhibited: A store referenced a page mapped with an attribute that does not permit stores
Decoding 28 results
0x4023f35b: more_comps at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 1072
0x40240246: comp_left_shift at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 590
:  (inlined by) bi_set_mod at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 775
0x4023f3c0: trim at /Users/igrokhotkov/e/axtls/e1/crypto/bigint.c line 1197
0x402412e4: RSA_pub_key_new at /Users/igrokhotkov/e/axtls/e1/crypto/rsa.c line 95
0x40244f94: asn1_get_int at /Users/igrokhotkov/e/axtls/e1/ssl/asn1.c line 158
0x40245492: asn1_public_key at /Users/igrokhotkov/e/axtls/e1/ssl/asn1.c line 461
0x40245324: asn1_get_printable_str at /Users/igrokhotkov/e/axtls/e1/ssl/asn1.c line 375
:  (inlined by) asn1_name at /Users/igrokhotkov/e/axtls/e1/ssl/asn1.c line 407
0x402451bc: asn1_validity at /Users/igrokhotkov/e/axtls/e1/ssl/asn1.c line 315
0x4023e190: x509_new at /Users/igrokhotkov/e/axtls/e1/ssl/x509.c line 114
0x40103307: lmacRecycleMPDU at ?? line ?
0x4023c83e: process_certificate at /Users/igrokhotkov/e/axtls/e1/ssl/tls1.c line 1942
0x4023da75: do_clnt_handshake at /Users/igrokhotkov/e/axtls/e1/ssl/tls1_clnt.c line 93
0x4023d4ec: do_handshake at /Users/igrokhotkov/e/axtls/e1/ssl/tls1.c line 1481
:  (inlined by) basic_read at /Users/igrokhotkov/e/axtls/e1/ssl/tls1.c line 1357
0x4023d894: do_client_connect at /Users/igrokhotkov/e/axtls/e1/ssl/tls1_clnt.c line 154
0x401004d8: malloc at ?? line ?
0x4023d644: ssl_read at /Users/igrokhotkov/e/axtls/e1/ssl/tls1.c line 265
0x40209784: WiFiClient::_s_connected(void*, void*, signed char) at ?? line ?
0x40209de5: WiFiClientSecure::_connectSSL(char const*) at ?? line ?
0x4020922e: WiFiClient::connect(IPAddress, unsigned short) at ?? line ?
0x4020a139: WiFiClientSecure::connect(char const*, unsigned short) at ?? line ?
0x4020e780: ThingerESP8266::connect_socket() at ?? line ?
0x4020de90: ThingerClient::connect_client() at ?? line ?
0x4020df4f: ThingerClient::handle_connection() at ?? line ?
0x4020e1f4: ThingerClient::handle() at ?? line ?
0x4020e4e5: setup at ?? line ?
0x40201a60: loop_wrapper() at core_esp8266_main.cpp line ?
0x40203870: cont_norm at cont.o line ?

OK, I got it. I’m running out of memory. :frowning:

Ups! :open_mouth:

In the latest library version (available in github master, but not in the library manager from arduino IDE), you can try to disable the output buffer by adding


before any other include. It should improve the memory usage while sending messages. Does the Adafruit GFX library use many dynamic memory?

I don’t think that Adafruit GFX uses “that much” memory, but my memory management in project is rather poor, so I had to disable some huge buffers I had for certain routines. I don’t think it an issue caused by any particular library (neither graphics, nor thinger’s), just project gets too complicated and memory is badly managed…