Skip to content

bugfix: PlotCurveItem OpenGL didn't invalidate render_cache on cleanup#3089

Merged
j9ac9k merged 2 commits intopyqtgraph:masterfrom
pijyoi:fix-invalidate-cache
Jul 7, 2024
Merged

bugfix: PlotCurveItem OpenGL didn't invalidate render_cache on cleanup#3089
j9ac9k merged 2 commits intopyqtgraph:masterfrom
pijyoi:fix-invalidate-cache

Conversation

@pijyoi
Copy link
Copy Markdown
Contributor

@pijyoi pijyoi commented Jul 7, 2024

cleanup() is intended to be called for the following reasons:

  1. on program termination (but this may not always happen due to reasons out of our control)
  2. if a context change is detected
    For both cases, OpenGL objects are destroyed.

For case (2), the state of the class is expected to be restored to a freshly initialized state, in preparation for a re-initialization.

The bug here is that render_cache was not invalidated even though the VBO that it was relying on had just been nuked.

Included is a change to MouseSelection.py to trigger this bug.

@j9ac9k
Copy link
Copy Markdown
Member

j9ac9k commented Jul 7, 2024

Nice catch, thanks for the fix!

@j9ac9k j9ac9k merged commit 53f0537 into pyqtgraph:master Jul 7, 2024
@pijyoi pijyoi deleted the fix-invalidate-cache branch July 7, 2024 18:49
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