RobotLocomotion / director

A robotics interface and visualization framework, with extensive applications for working with http://drake.mit.edu
BSD 3-Clause "New" or "Revised" License
179 stars 86 forks source link

Cannot create GLX Context #503

Open gizatt opened 7 years ago

gizatt commented 7 years ago

I'm exploring the many instances of this problem reported online (it originates in VTK), but for documentation's sake:

After no modifications I'm aware of (no reboot, no apt-get upgrade, no rebuild), drake-visualizer and directorPython testMainWindowApp.py (and probably others) have stopped launching with error:

ERROR: In /build/buildd/vtk-5.8.0/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0x263af40): Could not find a decent visual

ERROR: In /build/buildd/vtk-5.8.0/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0x263af40): Could not find a decent visual

ERROR: In /build/buildd/vtk-5.8.0/Rendering/vtkXOpenGLRenderWindow.cxx, line 631
vtkXOpenGLRenderWindow (0x263af40): Cannot create GLX context.  Aborting.

Aborted (core dumped)

This has persisted after a clean rebuild (of spartan) and a reboot.

While I search and try stuff, any ideas?

patmarion commented 7 years ago

Can you run glxgears? Can you post output of glxinfo?

I have only seen this after modifying the video driver, and it resolves after a reboot.

gizatt commented 7 years ago

glxgears works without warnings, glxinfo is at https://pastebin.com/izg6L2BR

Just reinstalled my video driver and rebooted and the problem is persisting; then purged out vtk 5.8, reinstalled, and rebuilt director (make -B) and it's persisting

patmarion commented 7 years ago

How is it picking up vtk-5.8 from this path: /build/buildd/vtk-5.8.0/Rendering/vtkXOpenGLRenderWindow.cxx? Is that what you expect? Do you also have vtk system installed?

gizatt commented 7 years ago

I'm pretty confused by that path -- a "buildd" folder doesn't show up anywhere in my system.

I'm not sure what you mean by vtk system?

On Fri, Apr 21, 2017 at 8:16 AM, Pat Marion notifications@github.com wrote:

How is it picking up vtk-5.8 from this path: build/buildd/vtk-5.8.0/ Rendering/vtkXOpenGLRenderWindow.cxx? Is that what you expect? Do you also have vtk system installed?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/RobotLocomotion/director/issues/503#issuecomment-296175189, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7LTz_7z_mHmfQzYJiPLrVBkbf9NtsFks5ryJ4FgaJpZM4NDhds .

gizatt commented 7 years ago

I can't reproduce this in standalone drake-building-director; only in Spartan. I'm guessing it could be that the Spartan Director build is pulling in a conflicting version of a library...

manuelli commented 7 years ago

I fixed this by setting the USE_SYSTEM_VTK=OFF option.

patmarion commented 7 years ago

There are two things to double check:

1) which version you compiled and linked with 2) which version of vtk gets loaded at runtime when you import vtk

They need to be the same.

QinZiwen commented 6 years ago

@gizatt Is this problem solved?

gizatt commented 6 years ago

@QinZiwen IIRC this was a VTK version mismatch (system vs director-or-drake-source-installed) that I haven't had trouble with since

QinZiwen commented 6 years ago

@gizatt Sorry, I didn't understand what you meant

QinZiwen commented 6 years ago

Vtk no special requirements, like:

In general VTK tries to be as portable as possible; the specific configurations below are known to work and tested.

VTK supports the following C++11 compilers:

Microsoft Visual Studio 2013 or newer
gcc 4.8.3 or newer
Clang 3.3 or newer
Apple Clang 5.0 (from Xcode 5.0) or newer
Intel 14.0 or newer

VTK supports the following operating systems:

Windows Vista or newer
Mac OS X 10.7 or newer
Linux (ex: Ubuntu 12.04 or newer, Debian 4 or newer)

https://gitlab.kitware.com/vtk/vtk

gizatt commented 6 years ago

Right, but Director expects a certain vtk version (6 or 7, I think? see the director homepage) while your system might have another version installed. If you run director and it loads vtk dynamic libraries that are a different version than it director was built with, this problem might come up.

On Mar 11, 2018 20:48, "Ziwen Qin" notifications@github.com wrote:

Vtk no special requirements, like:

In general VTK tries to be as portable as possible; the specific configurations below are known to work and tested.

VTK supports the following C++11 compilers:

Microsoft Visual Studio 2013 or newer gcc 4.8.3 or newer Clang 3.3 or newer Apple Clang 5.0 (from Xcode 5.0) or newer Intel 14.0 or newer

VTK supports the following operating systems:

Windows Vista or newer Mac OS X 10.7 or newer Linux (ex: Ubuntu 12.04 or newer, Debian 4 or newer)

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/RobotLocomotion/director/issues/503#issuecomment-372165197, or mute the thread https://github.com/notifications/unsubscribe-auth/AC7LTzdlDfTju1t2yOFvbKyGtLOamp-jks5tdcXsgaJpZM4NDhds .