Fix last QMenu leak and its associated segfaults#2522
Merged
j9ac9k merged 9 commits intopyqtgraph:masterfrom Nov 26, 2022
Merged
Fix last QMenu leak and its associated segfaults#2522j9ac9k merged 9 commits intopyqtgraph:masterfrom
j9ac9k merged 9 commits intopyqtgraph:masterfrom
Conversation
Contributor
Author
|
With the cause of the segfault out of the way, a cleaner implementation of building the mouse submenu can be done. |
4ca79f7 to
7875269
Compare
Contributor
Author
|
I am trying to move away from the use of
|
7875269 to
1d3ac9a
Compare
f13bb82 to
6760d67
Compare
the test is actually bogus. the current implementation is such that it has no C++ children, thus qObjectTree() will return only one element. Yet if the menu did actually have any children, the test would fail on PyQt bindings; because the Python wrappers of the children are still alive (but the wrapped C++ objects are deleted)
there is already a config option "mouseRateLimit" for such a purpose, thus using SignalProxy here would be a bad example.
6760d67 to
c64a5e3
Compare
Contributor
Author
|
With the change of Fixed by skipping |
f192973 to
d9142ec
Compare
Member
|
Thanks for your work on this @pijyoi I know this one was a doozy to sort out. |
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.
Fixes #2497.
Completes #2518.
With the segfaults being attributed to the reason listed in #2520, this PR avoids taking the gui thread object.
This includes:
SignalProxyto useQTimerinstead ofThreadsafeTimerThus there are 2 bugs in PySide binding
QMenu::addMenu(QMenu*)(as detailed in partial fix for Qmenu leak #2518)