Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception (28): after configuration #14

Open
kisdaniel opened this issue Aug 4, 2018 · 13 comments
Open

Exception (28): after configuration #14

kisdaniel opened this issue Aug 4, 2018 · 13 comments

Comments

@kisdaniel
Copy link

I get an exception after configuration when it restarts, what is the problem?


[INFO UKWN] Connecting to remote AP
[INFO UKWN] Connected to Remote Access Point!
[INFO UKWN] Our IP Address is:
[INFO UKWN] 192.168.1.127

Exception (28):
epc1=0x402147bb epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

ctx: cont 
sp: 3fff1430 end: 3fff17a0 offset: 01a0

>>>stack>>>
3fff15d0:  3fff21cc 4020c9fc 3fff30a4 3fff0778  
3fff15e0:  3fffdad0 3ffe995c 3fff30a4 40208fb6  
3fff15f0:  00000022 40103ee1 00040000 00000000  
3fff1600:  3ffeeec0 40102ebe 00000000 4000050c  
3fff1610:  3fffc278 40102d14 00000000 4000050c  
3fff1620:  3fffc278 40102d14 3fffc200 00000022  
3fff1630:  3fff1640 00000000 0000001f 40105789  
3fff1640:  40206e95 00000030 0000000d ffffffff  
3fff1650:  40206e8c 00000000 000003e8 00000000  
3fff1660:  00000003 00000101 00000000 fffffffe  
3fff1670:  ffffffff 3fffc6fc 00000078 00048ac6  
3fff1680:  00000000 00000000 3fff0526 00000030  
3fff1690:  00000000 3fff17f4 3fff0778 00000030  
3fff16a0:  00000000 00000000 00000001 3fff0771  
3fff16b0:  00000000 3fffdad0 3fff0778 00000030  
3fff16c0:  00000190 3fffc6fc 00000001 3fff0771  
3fff16d0:  00000000 3fffdad0 3fff0778 00000030  
3fff16e0:  00000000 3fffdad0 3fff0778 00000030  
3fff16f0:  00000000 00000000 00000000 4021293f  
3fff1700:  3fff0694 000005a4 000005a4 4010020c  
3fff1710:  3fffdad0 3fff052c 3fff1740 4010068c  
3fff1720:  3fff0694 00000218 00000218 4010020c  
3fff1730:  00000000 00000000 00000000 3fff5454  
3fff1740:  0000000f 00000000 3fff2e8c 0000000f  
3fff1750:  00000000 3fff30a4 3fff30a4 40206c60  
3fff1760:  00000000 00000000 00000000 3fff0778  
3fff1770:  3fffdad0 00000000 3fff052c 40206f93  
3fff1780:  3fffdad0 00000000 3fff0771 4021350c  
3fff1790:  feefeffe feefeffe 3fff0780 40100744  
<<<stack<<<

 ets Jan  8 2013,rst cause:2, boot mode:(1,6)


 ets Jan  8 2013,rst cause:4, boot mode:(1,6)

wdt reset

@snappy46
Copy link
Contributor

snappy46 commented Aug 4, 2018

As mentioned in the README file your problem might be related to pubsubclient default MQTT_MAX_PACKET_SIZE of 128. Open the pubsubclent library and change value to 256 instead of 128. If you are using platformio you can also setup a build flag instead of modifying the pubsubclient library.

@coogle
Copy link
Collaborator

coogle commented Aug 21, 2018

This could also be some sort of bug related to the way you configured the device. Did you modify other configuration settings than simply the AP?

I would start to debug this by hard resetting the device's EEPROM and starting again from scratch, this time only setting minimal settings to connect to your AP and get an IP address (no MQTT, etc). If that works, incrementally change settings and restart until you find the crash and add that to this bug report and we'll get it fixed.

@mikemoyse
Copy link

I've got the same issue. If I reduce to basics and only enter the WiFi client settings I get an error saying the settings failed to save. If I fill in every field the settings save OK but it crashes right after getting an IP. I've tried several different modules all with the same result.

If I put the stack dump into Exception Decoder I get:

Decoding stack results 0x40214e84: esp_yield() at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_main.cpp line 91 0x40207f36: CoogleIOT::flashStatus(int, int) at C:\Arduino\libraries\CoogleIOT\src\CoogleIOT.cpp line 523 0x4020d35c: ESP8266WiFiSTAClass::status() at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\libraries\ESP8266WiFi\src\ESP8266WiFiSTA.cpp line 498 0x4020997a: CoogleIOT::loop() at C:\Arduino\libraries\CoogleIOT\src\CoogleIOT.cpp line 323 0x40215ee1: run_scheduled_functions() at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\Schedule.cpp line 71 0x40214f13: loop_wrapper() at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_main.cpp line 126 0x40214ef0: loop_wrapper() at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_main.cpp line 117 0x40208247: CoogleIOT::log(String, CoogleIOT_LogSeverity) at C:\Arduino\libraries\CoogleIOT\src\CoogleIOT.cpp line 266 0x4010020c: _umm_free at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\umm_malloc\umm_malloc.c line 1295 0x401006dc: free at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\umm_malloc\umm_malloc.c line 1755 0x4020790f: loop() at C:\Arduino\MQTT\sketch_nov14a/sketch_nov14a.ino line 154 0x402078d8: setup() at C:\Arduino\MQTT\sketch_nov14a/sketch_nov14a.ino line 107 0x40214f10: loop_wrapper() at C:\Users\mike\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.4.2\cores\esp8266\core_esp8266_main.cpp line 125

@mikemoyse
Copy link

mikemoyse commented Nov 17, 2018

OK, so the issue with the web page saying "Failed to save settings" is that the MQTT port is set to zero so if you only fill in the remote AP SSID & Password it will bomb out as the MQTT port is invalid. Shouldn't this default to 1883?

Looking at the code it looks like even if one set the MQTT port via
#define COOGLEIOT_DEFAULT_MQTT_PORT
this data is not passed to the web page on the first startup. I can't actually see anywhere in the code where the defaults or overrides are sent to the web page or initialised but that might be me as I'm not a programmer ;-)

Anyway, now knowing that the MQTT port needs to be set on the web page to prevent a saving error still doen't fix the fact that the code crashes once connected to an AP.

@mikemoyse
Copy link

Further digging suggests this is an issue in the code related to null pointers being passed to the libraries. I see this on every crash "Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads"

A quick Google says this is due to null pointer or some other way data is being passed incorrectly to the libraries. This is now beyond my abilities as I was looking for an easy to use set of tools :-(

@mikemoyse
Copy link

Just a thought but is it possible that the issue is in the ArduinoJson.h file? This file hasn't been touched for over a year but the original author has brought out several revisions. It seems to contain memcpy routines which have changed since the original and I've found references to this in other reports of exception 28

@mikemoyse
Copy link

Giving up. I've tried rolling back library versions and it still crashes. I've blown away my entire development setup and started from a clean system, it still crashes. I've tried lots of different hardware modules, it still crashes.
This just doesn't work, looks like a great project but sadly it's not usable.

@coogle
Copy link
Collaborator

coogle commented Nov 25, 2018 via email

@mikemoyse
Copy link

Cool and thanks for getting back to me. If you need anything please shout. I'd really like to use this and I'm more than happy to work with you to resolve it.

@mikemoyse
Copy link

Don't know if this helps but I've tried using this similar project
https://github.com/1technophile/OpenMQTTGateway and it works fine on my hardware. No crashes at all.

I particularly like the way it redirects to the web interface when the wireless key is entered.

@mikemoyse
Copy link

Any luck?

@coogle
Copy link
Collaborator

coogle commented Jan 4, 2019 via email

@davrodfer
Copy link

davrodfer commented Jan 26, 2019

Hi. I have the same error and I believe that I found the problem.

The error I have is:

Exception 28: LoadProhibited: A load referenced a page mapped with an attribute that does not permit loads
PC: 0x40217d1f: PubSubClient::connected() at /Users/user/Docs/Arduino/libraries/PubSubClient/src/PubSubClient.cpp line 603
EXCVADDR: 0x00000008

The problem occurred when I configure the device as wifi client and I don't configure the mqtt settings.
If I configure an existent mqtt with the correct settings, the error disappear and the program run as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants