NorthernMan54 / rtl_433_ESP

Trial port of the rtl_433 Library for use with OpenMQTTGateway on a ESP32 and a CC1101 Transceiver
GNU General Public License v3.0
520 stars 125 forks source link

Update signalDecoder.cpp: Fix OOM crash caused by rtl_433_Decoder_Stack too small on Lilygo Lora device #156

Closed puterboy closed 1 month ago

puterboy commented 1 month ago

:recycle: Current situation

This fixes the crash caused by OOM when low water mark on rtl_433_Decder_Stack drops below 0. (See: https://github.com/1technophile/OpenMQTTGateway/issues/2043)

Describe the current situation. Explain current problems, if there are any. Be as descriptive as possible (e.g., including examples or code snippets).

:bulb: Proposed solution

I increased the memory size by 1500 which after running for a week on 2 different Lilygo Lora ESP32 devices leaves the water mark at just over 1KB -- I want to leave a little spare in case there are other sensor configurations and edge cases that would dip further into the stack.

I also wrapped the definitions of rtl_433_Decoder_stack with ifndef rtl_433_Decoder_Stack so that users can easily manually tweak the allocated stack size for their own particular situations.

:gear: Release Notes

Increase rtl_433_Decoder_Stack size for OOK_Modulation to avoid OOM crashes

Testing

NA

Reviewer Nudging

Where should the reviewer start? what is a good entry point?

puterboy commented 1 month ago

Not sure why build fails - it works fine on my platformio install and my changes were truly trivial. Seems from error message perhaps to be an error on the build site.

NorthernMan54 commented 1 month ago

Newer version of ubuntu breaks the build....

Run actions/setup-python@v4 Installed versions Version 3.7 was not found in the local cache Error: The version '3.7' with architecture 'x64' was not found for Ubuntu 24.04.

NorthernMan54 commented 1 month ago

Published as v0.3.3

Tks very much