Comments (5)
I can't seem to get useful error information as it seems it fails badly before I can extract via a Mbed Error Hook to Serial
. However, I did try mbed_get_last_error_info
and it was reporting the following:
Status: 0x8003010D Value: 0xFFFFFFFE
Type: 0 Module: 3 Code: 269
Which seemingly translates to MBED_ERROR_TYPE_SYSTEM
, MBED_MODULE_NETWORK_STACK
and TIMEOUT
but may be a red herring. Again, no idea why this would be an issue due to using Scheduler.h
.
from arduinocore-mbed.
Hi @dansiviter ,
the problem seem to be a stack overflow; the scheduler threads override the default mbed thread stack size setting it to 1K https://github.com/arduino/ArduinoCore-mbed/blob/main/libraries/Scheduler/src/Scheduler.h#L33 .
If you increase to 4K (via Scheduler.startLoop(loop1, 4096)
) everything works as expected
from arduinocore-mbed.
I think the best way to tackle this would be to discourage the use of Scheduler lib (which was "ported" only to allow old sketches to run "seamlessly", but provides many more ways to shoot yourself in the foot than the normal, cooperative lib)
from arduinocore-mbed.
Thanks @facchinm, that's sorted it. Unfortunately, my codebase needs to work on some MKR boards too and using Scheduler.h
makes life much simpler for 3rd party libraries that like to use delay(...)
far too much. Therefore, I'd suggest a multipronged approach: modify code to correct the stack size and also put a comment in to discourage usage. Happy to submit a PR if that's a suitable approach?
from arduinocore-mbed.
@dansiviter super, I'd love to merge such PR 😉
from arduinocore-mbed.
Related Issues (20)
- Arduino Nicla Sense ME - SPI Slave support
- Missing WiFiClass::setHostname definition HOT 1
- error: 'WiFiAccessPoint' does not name a type,
- [ACELL02] Incomplete `library.properties` file for the GSM library
- Wrong bootloader information from factory Opta HOT 2
- Ethernet defines SSID_MAX_LENGTH HOT 1
- missing null pointer checks HOT 1
- potential null pointer access / _initializerCallback not initialized
- [BUG] DHCP Ethernet crashes after repeated switching of network interface [OPTA/Portenta H7] HOT 4
- Nicla Voice Record_and_Stream compile fails HOT 1
- Binary constants - enum implementation, leading to severe macro-coditioning compilation errors HOT 1
- UDP Multicast crashes ethernet interface when cable is disconnected and reconnected HOT 1
- Socket Write and Close Hangs Indefinitely When There Is No Connectivity HOT 1
- Accessing mbed errors history HOT 1
- `Ethernet.dnsServerIP()` does not return the IP address I set with `Ethernet.begin()` HOT 2
- Issue with sdram.h using PLL2
- Can't have input A0 and A3 configured as interrupt on Opta HOT 5
- Giga R1 Wifi - Wifi-Access-Point only Possible with Secrets of existing WiFi-Network HOT 1
- mbed EoL HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arduinocore-mbed.