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

yarpview / yarpscope crash on WSL using Xming #2071

Closed
arrenglover opened this issue Aug 2, 2019 · 11 comments
Closed

yarpview / yarpscope crash on WSL using Xming #2071

arrenglover opened this issue Aug 2, 2019 · 11 comments
Assignees
Labels

Comments

@arrenglover
Copy link
Contributor

Describe the bug
On start-up of yarpview or yarpscope there is a segmentation fault. The GUI attempts to open, it flashes on the screen.

To Reproduce

yarpserver
yarpview

Expected behavior
yarpview/yarpscope should run and not crash.

Screenshots

aglover@IITICUBLAP089:~$ yarpview
QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-aglover'
yarp: Port /yarpview/img:i active at tcp://10.240.0.28:10002/
QOpenGLShaderProgram: could not create shader program
QOpenGLShader: could not create shader
QOpenGLShaderProgram::uniformLocation(imageTexture): shader program is not linked
Segmentation fault (core dumped)

Configuration (please complete the following information):

  • OS:

Windows subsystem for linux

Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic

Windows 10 Pro

Version 10.0.18362 Build 18362

  • yarp version:

YARP Version: 3.2.100 (3.2.100+20190716.14+git8f7d73651)

  • compiler:

-- CMake: 3.10.2 (/usr/bin/cmake)
-- C Compiler: GNU 7.4.0 (/usr/bin/cc)
-- CXX Compiler: GNU 7.4.0 (/usr/bin/c++)
-- Build type: Release

Additional context

It seems like it is a problem with my system rather than YARP itself. The problem only started happening on Wednesday (I might have done some system updates, I'm not sure). If I roll back yarp to master (release before Wednesday) the problem still occurs. Has anyone had similar problems recently or in the past? Google didn't help me fix it ...

@Nicogene
Copy link
Member

Nicogene commented Aug 2, 2019

What are you using as X server? I encountered a similar problem(or maybe the same not sure) using Xming.

The curious thing is that only the QML guis crashes.

@arrenglover
Copy link
Contributor Author

Yes - sorry I forgot to write: yarpmanager GUI works fine

Yes I'm using xming (xming has been working for 2 years so far). I'll try a different xserver and see if it has the same behaviour

@arrenglover
Copy link
Contributor Author

@Nicogene thanks!

I tried vsxsrv instead of xming and it doesn't have the same problem. yarpview is working.

the latest version of vsxsrv seems to be doing everything that xming was doing so I can switch to it without any problems it seems. Thanks for pointing me in the right direction. If you want to close the issue go ahead.

@Nicogene
Copy link
Member

Nicogene commented Aug 2, 2019

I'm glad that helped you 😄

I would like to know if Microsoft(maybe with WSL2) has decided a "canonical" X server provider.

Otherwise it will be a mess to support WSL usage.

cc @traversaro @pattacini @claudiofantacci @drdanz

@pattacini
Copy link
Member

I can confirm that I've found in my experience Xming a bit buggy in this respect.
That's why I switched to X410 in the past (from the Microsoft Store).

@Nicogene Nicogene changed the title yarpview / yarpscope crash (OpenGL) yarpview / yarpscope crash on WSL using Xming Aug 2, 2019
@arrenglover
Copy link
Contributor Author

okay good to know, but X410 isn't free 😞 . vsxsrv had a new update in July that seems to be working nicely.

@Nicogene Nicogene self-assigned this Aug 2, 2019
@Nicogene Nicogene added Status: Help Wanted Issue Type: QA/Support This is a generic question or a support request that does not require a patch and removed Status: Help Wanted labels Aug 2, 2019
@pattacini
Copy link
Member

Yep not free, right @arrenglover
They were offering it with a large discount some time ago so I caught the opportunity to get it for 10 dollars or similar.

@arrenglover
Copy link
Contributor Author

arrenglover commented Aug 5, 2019

Update to this:
None of the X servers are actually working properly,

  1. xming crashed with the above
  2. vcxsrv runs the app, and loads the window, but it is always blank/black. (sorry I never actually checked I could see something on the yarpview 😢 ). I get the following error:

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-aglover'
QGLXContext: Failed to create dummy context

  1. x410 (trial) gets the following error and crashes before opening the window

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-aglover'
QGLXContext: Failed to create dummy context
yarp: Port /yarpview/img:i active at tcp://192.168.1.118:10003/
Failed to create OpenGL context for format QSurfaceFormat(version 2.0, options
QFlagsQSurfaceFormat::FormatOption(), depthBufferSize 24, redBufferSize -1, greenBufferSize
-1, blueBufferSize -1, alphaBufferSize -1, stencilBufferSize 8, samples -1, swapBehavior
QSurfaceFormat::SwapBehavior(DoubleBuffer), swapInterval 1, profile
QSurfaceFormat::OpenGLContextProfile(NoProfile))
Aborted (core dumped)

It seems possible to fix with a re-install of the graphics drivers, but I'm not sure exactly how that works WSL or for an X11 server. My guess is that some run-time library loaded by QLM related to the graphics is not the correct version. Any ideas?

@pattacini
Copy link
Member

pattacini commented Aug 5, 2019

yarpscope and yarpview are also crashing on my WSL installation: just tested right now.
Anyway, I can tell you that I saw them working (at least yarpview) in the past.

@randaz81
Copy link
Member

Some updates on this question.

I have no problems running yarpview, etc on WSL. Even Gazebo runs super fast.
Here is my current configuration:

  • Windows 10, Version 2004, Build 19041.329
  • WSL1 or WSL2 (same for me)
  • Nvidia Driver: 451.67
  • VcXsrv (vesrion 64.1.20.8.1) configured with native opengl set to off.
  • Inside WSL, the environment variable LIBGL_ALWAYS_INDIRECT=0

Please note that before updating the Nvidia Driver (it was <445.0) I had your same problem on WSL2.

@randaz81 randaz81 reopened this Jul 24, 2020
@arrenglover
Copy link
Contributor Author

thanks @randaz81. I have recently tried with WSL again (1 & 2) and I am not having any problems either. It seems the problem has been fixed somewhere. 👍 I have basically the same set-up as you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants