Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in StylesheetWatcher when widgets are deleted #167

Open
BryceBeagle opened this issue Jun 16, 2021 · 0 comments
Open

Memory leak in StylesheetWatcher when widgets are deleted #167

BryceBeagle opened this issue Jun 16, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@BryceBeagle
Copy link
Member

When a QWidget that is tracked by StylesheetWatcher is deleted from the UI, the StylesheetWatcher does not drop its reference.

For example, deleting a stream removes the VideoSmall widget from the UI. However, as shown below, the Python object is never deleted.

objgraph.by_type('VideoSmall')[1].thread()
Traceback (most recent call last):
  File "/opt/pycharm-professional/plugins/python/helpers/pydev/_pydevd_bundle/pydevd_exec2.py", line 3, in Exec
    exec(exp, global_vars, local_vars)
  File "<input>", line 1, in <module>
RuntimeError: wrapped C/C++ object of type VideoSmall has been deleted

image

This is especially an issue with the StreamWidgets because they hold references to the SyncedStreamReaders which use a lot of memory holding buffered frames.

@BryceBeagle BryceBeagle added the bug Something isn't working label Jun 16, 2021
@BryceBeagle BryceBeagle added this to the v0.28.3 milestone Jun 16, 2021
@velovix velovix removed this from the v0.28.3 milestone Jul 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants