Long press title bar freeze bug fix #2991
Open
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.
Long press on the title bar freezes the TFT.
Requirements
None, affects all TFTs, but perhaps in different ways.
Description
The core issue is a read from an invalid address when the title bar is long pressed because the key that is pressed (tempKey) is used for as index:
getCurMenuItems()->items[tempKey].label.index. The title bar is not a menu item which causes a read from a undefined address which typically causes hard fault of the MCU. I can confirm that this freezes the BTT TFT35 V3.0, BTT TFT35 V3.01 and MKS TFT35 V1.0.Benefits
TFT doesn't freeze anymore when the title bar is long pressed.
Related Issues
#2990