Closed UpBlueio closed 10 months ago
Today I am trying to run a train with the ESP32 and stock motor shield.
Which ESP32 model are you using? If it is one that is shaped like the Arduino Uno it is very likely that the A0 and A1 pins are not usable (ESP32 limitation on the ADC pins). Add a jumper wire from A0 to A2 and A1 to A3.
Core dump: Task:main (1073485316) crashed at PC 40081c2e Registers:
This is a duplicate of the Assertion failed in file ../components/OpenMRNIDF/src/openlcb/If.hxx line 344: assert(it != localNodes_.end())
one. For this one, was the train deleted from actively running or was it deleted from the Locomotive Roster page?
If you can give me exact steps you took for this I'll see if I can reproduce and trace through the code as it shouldn't be crashing here.
Core dump: Task:Esp32WiFiConn (1073527224) crashed at PC 40081c2e Registers:
This is a duplicate of abort() was called at PC 0x4017d302 on core 1
. Was there any information prior to the abort() call? I'll see if I can decode this trace and see if I can find any clues there.
Core dump: Task:tiT (1073532008) crashed at PC 4017a1b2 Registers:
This task is the LwIP driver task which handles all TCP/IP communication. It looks likely that it ran into an out-of-memory condition. Was JMRI connecting to the ESP32 CS as an OpenLCB hub? If so, can you try enabling the JMRI OpenLCB hub and have ESP32 CS connect to it instead? I'm wondering if JMRI requesting the locomotive FDI data (function configuration) or CDI data (locomotive configuration) is causing a backup of TCP/IP packets in LwIP leading to the crash due to running out of memory buffers.
I'll do some digging and see if I can reproduce this one as well.
Which ESP32 model are you using? If it is one that is shaped like the Arduino Uno it is very likely that the A0 and A1 pins are not usable (ESP32 limitation on the ADC pins). Add a jumper wire from A0 to A2 and A1 to A3.
The Arduino Uno form factor. I connected 12 to 13, A0 to A2 and A1 to A3.
This is a duplicate of the
Assertion failed in file ../components/OpenMRNIDF/src/openlcb/If.hxx line 344: assert(it != localNodes_.end())
one. For this one, was the train deleted from actively running or was it deleted from the Locomotive Roster page?
I first opened the Throttle and tried a few addresses to find the address of my loco. Later i found out this makes roster entries. When i try to deleted this entries in the Roster page I get the problem.
This is a duplicate of
abort() was called at PC 0x4017d302 on core 1
. Was there any information prior to the abort() call? I'll see if I can decode this trace and see if I can find any clues there.
Sadly no
This task is the LwIP driver task which handles all TCP/IP communication. It looks likely that it ran into an out-of-memory condition. Was JMRI connecting to the ESP32 CS as an OpenLCB hub?
ESP32 is the hub, JMRI the client i guess.
If so, can you try enabling the JMRI OpenLCB hub and have ESP32 CS connect to it instead? I'm wondering if JMRI requesting the locomotive FDI data (function configuration) or CDI data (locomotive configuration) is causing a backup of TCP/IP packets in LwIP leading to the crash due to running out of memory buffers.
I will try that this weekend.
I'll do some digging and see if I can reproduce this one as well.
Thank you.
Is there some way how i can debug why the train is not moving? The F functions also does not work.
@Nefkens I haven't been able to reproduce the issues you have reported unfortunately. I did find one bug related to deleting a roster entry that may result in the locomotive remaining as "active" which I'll be investigating.
I've made a couple updates on the trainmgr
branch that should help improve performance / reliability of LwIP. I'll be merging these changes to master soon.
I'm also using Esp32OlcbNodeBrowser running on an ESP32-S3 for the "hub" which JMRI (and UWT-100/UWT-50) use to communicate with the CS via TWAI (CAN). If you have a spare ESP32 you can try using as the hub. Note that there is a possible performance bug in JMRI that can result in rather slow CDI access over TCP/IP.
Is there some way how i can debug why the train is not moving? The F functions also does not work.
The best way is to check the console output from the ESP32, I'd guess most likely since nothing appears to be working that the track output is not enabled (it defaults to off for safety).
You can enable the track output via the built-in web interface on the CS (click / tap on the power icon in top right, it should turn from red to green) or by sending the OpenLCB event 01.00.00.00.00.00.FF.FE. To send the OpenLCB Event from within JMRI select the Send Frame
option from the OpenLCB
menu, in the Send OpenLCB event message
section enter 01.00.00.00.00.00.FF.FE
in the Event ID
box and click the Send Event Produced
button. This will enable the track output.
Assertion failed in file ../components/OpenMRNIDF/src/openlcb/If.hxx line 344: assert(it != localNodes_.end())
assert failed: void openlcb::If::remove_local_node_from_map(openlcb::Node*) If.hxx:344 (0)
Backtrace:0x40081c2e:0x3ffc04000x400898dd:0x3ffc0420 0x40090c79:0x3ffc0440 0x40151abe:0x3ffc0570 0x4013e539:0x3ffc05a0 0x400fcd34:0x3ffc05c0 0x400ff6d2:0x3ffc05e0 0x400ee518:0x3ffc0610 0x400d9fed:0x3ffc0630 0x400eecfd:0x3ffc0650 0x40123d5b:0x3ffc0670 0x400df181:0x3ffc06a0 0x401cedd3:0x3ffc1550 0x4008cf7d:0x3ffc1570
ELF file SHA256: c69b3535851093b9
Rebooting...
I was finally able to reproduce this one, there was a duplicate call to deleting the local node. It is fixed in https://github.com/atanisoft/ESP32CommandStation/pull/111 which will be merged to master.
Closing this issue as the reported items have been fixed for nearly a year now.
Hi Again.
Thank for fixing the settings page yesterday. Today I am trying to run a train with the ESP32 and stock motor shield.
I got several crashes with the esp32 while doing several things. First of all, i didn't get my train running. My train does not drive whatever command i give. Only when the esp32 crashes when doing a other action(listed below) it somtimes drives for a few cm before stopping.
Crashes:
Deleting a train from the roster:
While booting i get this core dump:
Crash when changing locomotive at the throttle page:
When using the throttle in JMRI:
When there are no crashes, the train does not run.
Hope you can solve the issues.