Skip to content

[FIX][MNT] Remove segfault in tests for building documentation#3491

Merged
janezd merged 1 commit intobiolab:masterfrom
janezd:debug-doc-build
Dec 21, 2018
Merged

[FIX][MNT] Remove segfault in tests for building documentation#3491
janezd merged 1 commit intobiolab:masterfrom
janezd:debug-doc-build

Conversation

@janezd
Copy link
Contributor

@janezd janezd commented Dec 20, 2018

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 before QApplication to have an effect. I don't know about other flags, but I moved them, too.

Includes
  • Code changes

@codecov
Copy link

codecov bot commented Dec 20, 2018

Codecov Report

Merging #3491 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3491      +/-   ##
==========================================
+ Coverage   83.55%   83.56%   +<.01%     
==========================================
  Files         367      367              
  Lines       65454    65454              
==========================================
+ Hits        54691    54694       +3     
+ Misses      10763    10760       -3

@janezd janezd force-pushed the debug-doc-build branch 5 times, most recently from e34aa00 to 21be458 Compare December 20, 2018 17:01
@janezd janezd changed the title [WIP] Debug segfault in tests for building documentation [FIX][MNT] Remove segfault in tests for building documentation Dec 20, 2018
@janezd
Copy link
Contributor Author

janezd commented Dec 20, 2018

@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.)

@ajdapretnar
Copy link
Contributor

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.
I could only test the documentation locally and it was fine (apart from some small fixes I can do later).

@janezd
Copy link
Contributor Author

janezd commented Dec 21, 2018

@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.

@janezd janezd merged commit 0aa6e51 into biolab:master Dec 21, 2018
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