Update signalDecoder.cpp: Fix OOM crash caused by rtl_433_Decoder_Stack too small on Lilygo Lora device #156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
♻️ Current situation
This fixes the crash caused by OOM when low water mark on rtl_433_Decder_Stack drops below 0. (See: 1technophile/OpenMQTTGateway#2043)
Describe the current situation. Explain current problems, if there are any. Be as descriptive as possible (e.g., including examples or code snippets).
💡 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
withifndef rtl_433_Decoder_Stack
so that users can easily manually tweak the allocated stack size for their own particular situations.⚙️ Release Notes
Increase
rtl_433_Decoder_Stack
size for OOK_Modulation to avoid OOM crashesTesting
NA
Reviewer Nudging
Where should the reviewer start? what is a good entry point?