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

'GDK_IS_DISPLAY (display)' failed and Windows Subsystem for Linux. #101

Closed
lcpt opened this issue Nov 3, 2021 · 9 comments
Closed

'GDK_IS_DISPLAY (display)' failed and Windows Subsystem for Linux. #101

lcpt opened this issue Nov 3, 2021 · 9 comments

Comments

@lcpt
Copy link
Collaborator

lcpt commented Nov 3, 2021

@mihdicaballero has found this bug running the XC verification tests on a WSL machine running Ubuntu 20.04. The results he obtained are here.

Some tests complain about the connection to the XServer: Unable to init server: Could not connect: Connection refused and then they show the following message gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed. The test itself works as expected and returns OK.

Apparently, the problem is related with the use of Matplotlib module. I've removed or commented out the lines that import this module because it's not needed unless you're debugging the code.

I've no access to an WSL machine, so I can't check if that solution works. @ebrahimraeyat, @mihdicaballero could you pull the modified verification tests and check if this workaround works?

@ebrahimraeyat
Copy link
Contributor

Thanks @lcpt. For me errors still are there:

test test_earth_pressure.py: ok.
test test_earth_pressure_sloped_wall.py: ok.
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused

(test_surf_unif_load_distributed.py:225): Gdk-CRITICAL **: 15:03:57.995: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed
test test_surf_unif_load_distributed.py: ok.
   Earthquake action tests.
test mononobe_okabe_test_01.py: ok.
Unable to init server: Could not connect: Connection refused
Unable to init server: Could not connect: Connection refused

(test_NCSP_01.py:234): Gdk-CRITICAL **: 15:04:00.586: gdk_cursor_new_for_display: assertion 'GDK_IS_DISPLAY (display)' failed

.....

@lcpt
Copy link
Collaborator Author

lcpt commented Nov 3, 2021

I've modified run_verif.sh trying to avoid Matplotlib complaints by adding this:

if [ -n "$MPLBACKEND" ]; then
   echo "$JAUNE" "MPLBACKEND already set as: $MPLBACKEND" "$NORMAL"
else
   echo "$BLEU" "Setting MPLBACKEND to avoid Matplotlib complaints." "$NORMAL"
   MPLBACKEND=Agg
   export MPLBACKEND
fi

Maybe this works.

@ebrahimraeyat
Copy link
Contributor

Thanks @lcpt . It removes those errors, but some new errors, maybe new issue needed:

test test_element_axis_01.py: ok.
Traceback (most recent call last):
  File "tests/elements/crd_transf/test_element_axis_02.py", line 53, in <module>
    fiberSectionRepr.setGeomNamed(quadFibersGeom.name)
AttributeError: 'GeomSection' object has no attribute 'name'
.
.
.
     Force beam-column 3D tests.
Traceback (most recent call last):
  File "tests/elements/beam_column/test_force_beam_column_3d_01.py", line 59, in <module>
    fiberSectionRepr.setGeomNamed(testQuadRegion.name) # We assign the geometry (regions and rebars)
AttributeError: 'GeomSection' object has no attribute 'name'
Traceback (most recent call last):
  File "tests/elements/beam_column/test_force_beam_column_3d_02.py", line 63, in <module>
    fiberSectionRepr.setGeomNamed(testQuadRegion.name)
AttributeError: 'GeomSection' object has no attribute 'name'
Traceback (most recent call last):
  File "tests/elements/beam_column/test_force_beam_column_3d_03.py", line 64, in <module>
    fiberSectionRepr.setGeomNamed(testQuadRegion.name)
AttributeError: 'GeomSection' object has no attribute 'name'
Traceback (most recent call last):
  File "tests/elements/beam_column/test_force_beam_column_3d_04.py", line 67, in <module>
    fiberSectionRepr.setGeomNamed(testQuadRegion.name)
AttributeError: 'GeomSection' object has no attribute 'name'
Traceback (most recent call last):

and more similar errors. thanks.

@lcpt
Copy link
Collaborator Author

lcpt commented Nov 3, 2021

That's strange. It's always the same error, but it has nothing to do with the matplotlib issue.

In my computer, it works perfectly fine ...
And before this change, the examples worked fine for you as well, isn't it?

It's quite strange. Have you changed anything else?

@mihdicaballero
Copy link

Hi! @lcpt I just run again the verification tests, and it almost was Ok in everything. I only had some errors with gmsh:

image

Thanks :)

@lcpt
Copy link
Collaborator Author

lcpt commented Nov 4, 2021

Different versions of GMSH create slightly different meshes with different number of nodes. This is probably the cause of this error (the mesh is perfectly fine, but XC expects a different number of nodes). Could you open a new issue for this problem?, in the interim I'll take a look on how to solve it.

@lcpt
Copy link
Collaborator Author

lcpt commented Nov 4, 2021

@ebrahimraeyat if the problem with the name of GeomSection objects persists, I think it's better to open a new issue.

@ebrahimraeyat
Copy link
Contributor

@ebrahimraeyat if the problem with the name of GeomSection objects persists, I think it's better to open a new issue.

Thanks @lcpt. I decided to compile xc again and if errors still exist, I will open new issue about it. Thank you so much.

@lcpt
Copy link
Collaborator Author

lcpt commented Nov 8, 2021

I think this will probably fix the problem.

I'll close this issue. You can open a new one as needed.

@lcpt lcpt closed this as completed Nov 8, 2021
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

No branches or pull requests

3 participants