[FIX][MNT] Remove segfault in tests for building documentation#3491
[FIX][MNT] Remove segfault in tests for building documentation#3491janezd merged 1 commit intobiolab:masterfrom
Conversation
25c409a to
d9af422
Compare
Codecov Report
@@ Coverage Diff @@
## master #3491 +/- ##
==========================================
+ Coverage 83.55% 83.56% +<.01%
==========================================
Files 367 367
Lines 65454 65454
==========================================
+ Hits 54691 54694 +3
+ Misses 10763 10760 -3 |
e34aa00 to
21be458
Compare
21be458 to
c965e76
Compare
|
@ajdapretnar, this PR hopefully fixes a crash that caused all new PRs to fail. It is related to building a catalog of widgets. I don't know how the catalog on the web is updated, but I suppose it uses the script I changed here. I'm assigning this PR to you: could you check if the catalog - in particular the icons - is still OK with this script? Or find somebody who knows how to do it? (I don't.) |
|
I am not sure what you mean by widget catalog. Documentation does not have a catalog. If you are referring to the website, this is done elsewhere (website repo) and I don't think it should be affected by numpy at all. |
|
@ajdapretnar, I think this is the same script that generates icons for the catalog on the web. If they look OK locally (they do on my machine), let's hope they'll look the same on the web. |
Issue
create_widget_catalog.py segfaults when Python is freeing memory.
Description of changes
It seems that removing numpy helped - it almost always crashed before, and never crashed after. Numpy was used just to create a table with 50504 zeros.
b"\x00" * 50 * 50 *4"works just as well.While searching for the problem I reordered the import order to match that in
canvas.__main__. I kept it reordered.I also added
QApplication.setAttribute(Qt.AA_ShareOpenGLContexts), as recommended in the output. This flag has to be set beforeQApplicationto have an effect. I don't know about other flags, but I moved them, too.Includes