-
Notifications
You must be signed in to change notification settings - Fork 21
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
Arduino IDE 2.0: Errors on compiling and compiled code enters a fatal exception loop #30
Comments
Adding Detail from Serial Monitor during the crash (this keeps cycling until the power is removed). -------------- CUT HERE FOR EXCEPTION DECODER --------------- User exception (panic/abort/assert) Abort called
ctx: cont |
Some of the compiler warning you have posted are known to me, e.g.:
and are fixed in the latest developer version, not jet released. You can still get by checking out from the developer branch. The warning
is in the PubSubClient library and is harmless in the contextex of this project. The warning
results from you using a much more recent ESP8266 SDK than the version the project was originally designed for. I consider upgrading to a later version myself to resolve this. On the other hand other users already have reported that an even new SDK can be used and works without changing the code, so this is also harmless in the context of this project. But the warning
is new to me and does not make sense if you look at the code. Your compiler does not detect that this is a lambda expression and this will result in undefined behaviour that is probably the cause for the exception. Please check if all board settings documented at the top of the INO file are correctly set in Arduino. If the problem persists, please provide more info:
|
Thanks, I'll work through the suggestions above and feedback. |
Reverted back to the 1.18 IDE and corrected the RAM settings resolved the issues above |
During compiling the warnings below are flagged.
Compiling completed and can be uploaded to the WEMO D1, but then enters a continuous crash loop.
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTPublisher.cpp: In member function 'void MQTTPublisher::loop()':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTPublisher.cpp:132:13: warning: comparison of constant '255' with boolean expression is always true [-Wbool-compare]
132 | if (b != SBH20IO::UNDEF::BOOL)
| ~~^~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:34,
from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTPublisher.cpp:30:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h: At global scope:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/ConfigurationFile.cpp: In member function 'bool ConfigurationFile::load(const char*)':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/ConfigurationFile.cpp:73:31: warning: catching polymorphic type 'class std::runtime_error' by value [-Wcatch-value=]
73 | catch (std::runtime_error re)
| ^~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/OTAUpdate.cpp:31:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:115:22: warning: 'long unsigned int timeDiff(long unsigned int, long unsigned int)' defined but not used [-Wunused-function]
115 | static unsigned long timeDiff(unsigned long newTime, unsigned long oldTime)
| ^~~~~~~~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/MQTTClient.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp: In member function 'void SBH20IO::setup(LANG)':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:203:66: warning: 'static void SBH20IO::clockRisingISR(void*)' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
203 | attachInterruptArg(digitalPinToInterrupt(PIN::CLOCK), SBH20IO::clockRisingISR, this, RISING);
| ^~~~~~~~~~~~~~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:281:31: note: declared here
281 | static ICACHE_RAM_ATTR void clockRisingISR(void* arg);
| ^~~~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:203:94: warning: 'static void SBH20IO::clockRisingISR(void*)' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
203 | attachInterruptArg(digitalPinToInterrupt(PIN::CLOCK), SBH20IO::clockRisingISR, this, RISING);
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:281:31: note: declared here
281 | static ICACHE_RAM_ATTR void clockRisingISR(void* arg);
| ^~~~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp: In static member function 'static void SBH20IO::clockRisingISR(void*)':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:576:23: warning: 'static void SBH20IO::decodeDisplay()' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
576 | decodeDisplay();
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:282:38: note: declared here
282 | static ICACHE_RAM_ATTR inline void decodeDisplay();
| ^~~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:582:19: warning: 'static void SBH20IO::decodeLED()' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
582 | decodeLED();
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:283:38: note: declared here
283 | static ICACHE_RAM_ATTR inline void decodeLED();
| ^~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:588:22: warning: 'static void SBH20IO::decodeButton()' is deprecated: Use IRAM_ATTR in place of ICACHE_RAM_ATTR to move functions into IRAM [-Wdeprecated-declarations]
588 | decodeButton();
| ^
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.cpp:29:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:284:38: note: declared here
284 | static ICACHE_RAM_ATTR inline void decodeButton();
| ^~~~~~~~~~~~
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/esp8266-intexsbh20.ino: In function 'void setup()':
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/esp8266-intexsbh20.ino:128:31: warning: catching polymorphic type 'class std::runtime_error' by value [-Wcatch-value=]
128 | catch (std::runtime_error re)
| ^~
In file included from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/SBH20IO.h:34,
from /Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/esp8266-intexsbh20.ino:53:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h: At global scope:
/Users/jrsouthern/Documents/Arduino/esp8266-intexsbh20/common.h:128:22: warning: 'long unsigned int diff(unsigned int, unsigned int)' defined but not used [-Wunused-function]
128 | static unsigned long diff(unsigned int newVal, unsigned int oldVal)
| ^~~~
/Users/jrsouthern/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp: In member function 'boolean PubSubClient::publish_P(const char*, const uint8_t*, unsigned int, boolean)':
/Users/jrsouthern/Documents/Arduino/libraries/PubSubClient/src/PubSubClient.cpp:523:16: warning: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Wsign-compare]
523 | return (rc == expectedLength);
| ~~~^~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered: