arch/sim: Stop publishing stale X11 display during teardown.#18956
Merged
Conversation
xiaoxiang781216
approved these changes
May 25, 2026
b8372f4 to
d714c02
Compare
jerpelea
approved these changes
May 25, 2026
jerpelea
requested changes
May 25, 2026
Contributor
jerpelea
left a comment
There was a problem hiding this comment.
please follow the contribution guidelines and add a proper PR title, description and test cases
sim_x11events() polls g_display from the idle loop while the framebuffer teardown path closes the X connection. Clear the global Display handle before teardown so the event path stops using it, but keep the saved local Display pointer for XShmDetach(), XUngrabButton(), and XCloseDisplay(). This only changes the sim X11 framebuffer shutdown ordering and does not change user-visible APIs or build configuration. Signed-off-by: hanzhijian <hanzhijian@zepp.com>
d714c02 to
a1a048d
Compare
Contributor
Author
|
Addressed the requested PR metadata/test details:
CI has been re-triggered on the updated commit. |
linguini1
approved these changes
May 25, 2026
Contributor
Author
|
@jerpelea The requested PR metadata/test details have been addressed in the current head commit:
Could you please re-review when convenient so the stale change-request state can be cleared if this now looks OK? Thanks. |
jerpelea
approved these changes
May 27, 2026
Contributor
Author
|
🎉 Congratulations on the merge! Thank you for the contribution — glad to see this sim/X11 teardown fix landed successfully. Much appreciated! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
sim_x11events()may continue pollingg_displayfrom the idle loop while the X11 connection is being torn down.Display *in a local variable, clear the globalg_displaybefore teardown, and use the local pointer for the remaining X11 cleanup calls.Impact
Testing
I confirm that changes are verified on local setup and work as intended:
./tools/checkpatch.sh -g HEAD~...HEAD../tools/configure.sh sim:nsh && make -j4../nuttx, ranhelp,uname -a, andpoweroff.Testing logs before change:
Testing logs after change:
PR verification Self-Check