Skip to content

Bug Fix: Add safe LVGL object deletion to prevent LoadProhibited crashes#114

Merged
KlausMu merged 2 commits into
OMOTE-Community:mainfrom
Stuckya:fix/safe-lvgl-deletion
Sep 27, 2025
Merged

Bug Fix: Add safe LVGL object deletion to prevent LoadProhibited crashes#114
KlausMu merged 2 commits into
OMOTE-Community:mainfrom
Stuckya:fix/safe-lvgl-deletion

Conversation

@Stuckya

@Stuckya Stuckya commented Sep 20, 2025

Copy link
Copy Markdown
Contributor

I was encountering intermittent crashes when my kids were using the remote. This led me to debugging the crashes and I uncovered 3 issues along the way. This was the 2nd issue.

Problem:

LoadProhibited crash with EXCVADDR: 0x00000009 when pressing KEY_RIGHT repeatedly in default scene, caused by invalid LVGL object access during GUI navigation.

Root Cause:

  • setActiveTab() function called LVGL functions on potentially NULL or invalid tabview objects.
  • clear_tabview() and clear_panel() deleted objects without validation.
  • Possible race conditions between object deletion and usage.

Fix:

  1. Added safe_delete_lv_obj() helper function to validate objects before deletion.
  2. Added null and validity checks in setActiveTab() before using tabview.
  3. Refactored clear_tabview() and clear_panel() to use safe deletion with early returns.
  4. Prevents LoadProhibited crashes from invalid LVGL object access.

@KlausMu KlausMu merged commit e58c671 into OMOTE-Community:main Sep 27, 2025
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants