It appears that autosummary does not work well with some decorators. It's odd that this results in a hard-crash i.e. a segfault. Logs are useless and so is dmesg.
When does the bug occur?
Building the docs with the custom template with full recursion to fully document all modules, classes, functions etc. See commit message in 25ee70467fa1b02ded8b31698deb1f34a5416c11 which describes this.
How do we replicate the issue?
Build the docs as of 25ee70467fa1b02ded8b31698deb1f34a5416c11 but include a blank __init__.py in src/qudi/util/widgets to allow sphinx to recurse into it.
Expected behavior
Do not segfault when building the docs lol.
Relevant log output
No response
Additional Comments
I have isolated the problem to the @QtCore.Property(int) decorator in the code block below:
https://github.com/prithviulm/qudi-core/blob/25ee70467fa1b02ded8b31698deb1f34a5416c11/src/qudi/util/widgets/loading_indicator.py#L71-L78
This is rather insane. If I replace the decorator with @property then it works fine. After numerous hours of debugging, it seems that the problem is that Sphinx gets confused sometimes with finding the right docstring when there's a decorator on a function. It appears that adding some random docstring to the function immediately solves the problem.
I guess this solution is fine for now (everything should have a docstring anyway?).
Version
Development
What is affected by the bug?
It appears that autosummary does not work well with some decorators. It's odd that this results in a hard-crash i.e. a segfault. Logs are useless and so is dmesg.
When does the bug occur?
Building the docs with the custom template with full recursion to fully document all modules, classes, functions etc. See commit message in 25ee70467fa1b02ded8b31698deb1f34a5416c11 which describes this.
How do we replicate the issue?
Build the docs as of 25ee70467fa1b02ded8b31698deb1f34a5416c11 but include a blank
__init__.py
insrc/qudi/util/widgets
to allow sphinx to recurse into it.Expected behavior
Do not segfault when building the docs lol.
Relevant log output
No response
Additional Comments
I have isolated the problem to the
@QtCore.Property(int)
decorator in the code block below: https://github.com/prithviulm/qudi-core/blob/25ee70467fa1b02ded8b31698deb1f34a5416c11/src/qudi/util/widgets/loading_indicator.py#L71-L78 This is rather insane. If I replace the decorator with@property
then it works fine. After numerous hours of debugging, it seems that the problem is that Sphinx gets confused sometimes with finding the right docstring when there's a decorator on a function. It appears that adding some random docstring to the function immediately solves the problem.I guess this solution is fine for now (everything should have a docstring anyway?).
Contact Details
No response