-
Notifications
You must be signed in to change notification settings - Fork 7.6k
WiFiUDP::parsePacket() CRASH #4104
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
Comments
without code to reproduce this it won't go anywhere. It is crashing due to inability to allocate memory for the UDP packet, how much etc is not clear due to lack of code. |
ok thanks for your answer, i will post soon detailled source |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
had this issue, changed the implementation of handlePacket to use buf on stack instead of re-allocating it over and over with every call. problem seems to be solved. |
Could you describe the new code and where did you put it? I had this issue, it is very random, but it every comes again. |
sure, in the file Arduino15/packages/esp32/hardware/esp32/2.0.0-alpha1/libraries/WiFi/src/WiFiUdp.cpp |
Thank you a lot, I already implement it and seems to be good. 👍 |
As I also permanently have issues with exactly this code and the change frrom @michaelbadichi seems to work fine for me as well - will this get integrated? |
Edit the file and submit a PR. |
We have been experiencing issues as well, this seems to have fixed our issue as well. |
sorry for this dumb question, as I am not that experienced with C++. Isn't new() and the cleanup still using heap via malloc, which would result in the same behavior just in different clothing? |
same problem here :
|
Somebody has the same crash than me using WiFiUDP ?
abort() was called at PC 0x40165d87 on core 1
Backtrace: 0x4008cf6c:0x3ffd4850 0x4008d19d:0x3ffd4870 0x40165d87:0x3ffd4890 0x40165dce:0x3ffd48b0 0x40165e7b:0x3ffd48d0 0x40165efa:0x3ffd48f0 0x40165f11:0x3ffd4910 0x400f3c92:0x3ffd4930 0x400d5d8c:0x3ffd4970 0x400f9159:0x3ffd49a0 0x400d7200:0x3ffd49c0 0x400d722b:0x3ffd49e0 0x40089285:0x3ffd4a00
#0 0x4008cf6c:0x3ffd4850 in invoke_abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:707
#1 0x4008d19d:0x3ffd4870 in abort at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp32/panic.c:707
#2 0x40165d87:0x3ffd4890 in __cxxabiv1::__terminate(void ()()) at /Volumes/build/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:112
#3 0x40165dce:0x3ffd48b0 in std::terminate() at /Volumes/build/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_terminate.cc:112
#4 0x40165e7b:0x3ffd48d0 in __cxa_throw at /Volumes/build/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/eh_throw.cc:87
#5 0x40165efa:0x3ffd48f0 in operator new(unsigned int) at /Volumes/build/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/new_op.cc:54
#6 0x40165f11:0x3ffd4910 in operator new[](unsigned int) at /Volumes/build/idf/crosstool-NG/.build/src/gcc-5.2.0/libstdc++-v3/libsupc++/new_opv.cc:32
#7 0x400f3c92:0x3ffd4930 in WiFiUDP::parsePacket() at /Users/pierregufflet/.platformio/packages/framework-arduinoespressif32/libraries/WiFi/src/WiFiUdp.cpp:221
#8 0x400d5d8c:0x3ffd4970 in ArtnetWifi_V2::receive_udp_task(void) at src/ArtnetV2/ArtnetWifi_V2.h:57
I just call udp.parsepacket()
This only occurs if i send several Artnet Universes : 32 packets of 530 bytes instantly crashes.
i log the esp32 freeheap just before crash :
///
N: getFreeHeap 56472
N: getMaxAllocHeap 51016
///
Espressif last stable version :
1.12.4
Hardware:
Board: ESP32devkitc v4
Core Installation version: ?1.0.0? ?1.0.1-rc4? ?1.0.1? ?1.0.1-git? ?1.0.2? ?1.0.3?
IDE name: Arduino IDE Platform.io
Flash Frequency: 40Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Mac OSX
The text was updated successfully, but these errors were encountered: