Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content

Fix/segfaults

wakonig_k requested to merge fix/segfaults into main

Description

This MR fixes the teardown of BECWidgets, in particular widgets that rely on pyqtgraph. In the past, resources allocated within widgets were not properly shut down. Furthermore, pytest-qt's logic of using the qtapp as a session fixture, further lead to resources being not being released, causing segmentation faults quite regularly.

To alleviate the debugging in the future, an auto-use fixture will now check for uncleaned resources after finishing the test, ensuring that widgets are properly shut down.

Related Issues

Type of Change

  • Added cleanup method where necessary to tear down qt resources.

Additional Comments

  • When you want to clean a qt resource, always use close + deleteLater. Just close isn't reliably freeing the resources. I've also noticed a slight discrepancy between pyside and pyqt, so better save than sorry...
  • There is no need to call close after yielding a widget in a fixture. In fact, the additional close could lead to problems in the teardown due to already freed resources. However, the widget must be added to qtbot using addWidget.

Definition of Done

  • Documentation is up-to-date.
Edited by wakonig_k

Merge request reports

Loading