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

Pangolin X11: Unable to retrieve framebuffer options #74

Closed
sunstarchan opened this issue Jan 27, 2016 · 27 comments
Closed

Pangolin X11: Unable to retrieve framebuffer options #74

sunstarchan opened this issue Jan 27, 2016 · 27 comments

Comments

@sunstarchan
Copy link

Hello,

when I follow these steps to run ORB_SLAM2(https://github.com/raulmur/ORB_SLAM2), I get following error.

terminate called after throwing an instance of 'std::runtime_error'
what(): Pangolin X11: Unable to retrieve framebuffer options
Aborted (core dumped)

I'm running it with Ubuntu running in Parallels on Mac.
What's the main reason for this issue?

Thanks

@sunstarchan
Copy link
Author

@stevenlovegrove one more comment, I tried to build the project with the default C++ compiler on Mac, it built successfully, and all examples could run too. but when I tried to build with gcc/g++, the Object C code for Mac has build errors, such as

             from /Users/Ming/Documents/Projects/package_dir/Pangolin/src/display/device/display_osx.mm:33:

/usr/include/objc/NSObject.h:22:4: error: 'instancetype' does not name a type

  • (instancetype)self;
    ^
    /usr/include/objc/NSObject.h:36:4: error: 'instancetype' does not name a type
  • (instancetype)retain OBJC_ARC_UNAVAILABLE;
    ^
    /usr/include/objc/NSObject.h:38:4: error: 'instancetype' does not name a type
  • (instancetype)autorelease OBJC_ARC_UNAVAILABLE;
    ^
    /usr/include/objc/NSObject.h:60:4: error: 'instancetype' does not name a type
  • (instancetype)init
    ^
    /usr/include/objc/NSObject.h:66:4: error: 'instancetype' does not name a type
  • (instancetype)new OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
    ^
    /usr/include/objc/NSObject.h:67:4: error: 'instancetype' does not name a type
  • (instancetype)allocWithZone:(struct _NSZone *)zone OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
    ^
    /usr/include/objc/NSObject.h:68:4: error: 'instancetype' does not name a type
  • (instancetype)alloc OBJC_SWIFT_UNAVAILABLE("use object initializers instead");
    ^
    In file included from /System/Library/Frameworks/Foundation.framework/Headers/NSArray.h:5:0,
    from /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h:10,
    from /System/Library/Frameworks/Cocoa.framework/Headers/Cocoa.h:12,
    from /Users/Ming/Documents/Projects/package_dir/Pangolin/src/display/device/display_osx.mm:33:
    /System/Library/Frameworks/Foundation.framework/Headers/NSObject.h:19:21: error: 'nullable' does not name a type
  • (id)copyWithZone:(nullable NSZone *)zone;

Does this mean it not compatible with gcc/g++ on Mac?

@stevenlovegrove
Copy link
Owner

In Parallels, as with issue #69 , it looks as though no 3D graphics is supported from your session. Make sure that a simple program like glxgears can run first.

@stevenlovegrove
Copy link
Owner

I have hit your issue on OSX myself. I believe it should be possible to fix, but I haven't done so yet. As a workaround you can avoid the Objective C code by setting FORCE_GLUT to true in the CMakeLists.txt. If anyone is more intimately acquainted with the peculiarities of Objective C, I would appreciate some advice there.

@sunstarchan
Copy link
Author

Thanks for your input. The build process is successful now.

@paulinus
Copy link

paulinus commented Feb 1, 2016

I'm seeing the same what(): Pangolin X11: Unable to retrieve framebuffer options error. Running Ubuntu 14.04 on a virtualbox inside a mac.

I've managed to remove the error by commenting these 2 lines: https://github.com/stevenlovegrove/Pangolin/blob/master/src/display/device/display_x11.cpp#L123-L124
as it is done in this tutorial https://www.opengl.org/wiki/Tutorial:_OpenGL_3.0_Context_Creation_(GLX)

As far as i understand, the GLX_SAMPLE_BUFFERS and GLX_SAMPLES are set later on the same function anyway

@sunstarchan
Copy link
Author

@paulinus Great comment. I can run the project successfully now. Thanks very much.

@stevenlovegrove
Copy link
Owner

I've just pushed 45b38c1 which will hopefully address this issue whilst keeping the current behaviour on systems with decent graphics support.

@qiangw89
Copy link

@paulinus Also solved my problem. Thanks very much!

@OtacilioNeto
Copy link

I have the same problem when running Pangolin on FreeBSD using VirtualBox. The stevenlovegrove's patch solves my problem. Thanks a lot!

@lucasmedino
Copy link

Hi guys, I still get the same error when I do fix, any ideas why?

@OtacilioNeto
Copy link

What fix you have used? The proposed by stevenlovegrove here 45b38c1 ? What is the environment where you are running, over hardware, virtualbox or vmware? What is your operating system where you are trying run Pangolin?

@lucasmedino
Copy link

I am running over vmware and I am using a OSX

@OtacilioNeto
Copy link

What is your system that you are running over OSX?

@lucasmedino
Copy link

Ubuntu 14.04

@OtacilioNeto
Copy link

Try enable 3D acceleration on VMWARE. I got considerable improvements after this.

@KevenLee
Copy link

KevenLee commented Nov 2, 2016

Hello, I clone the pangolin code from github, and I use it when I running ORB-SLAM2, I get the following error,
terminate called after throwing an instance of 'std::runtime_error'
what(): Pangolin X11: Unable to retrieve framebuffer options
Aborted (core dumped)

I have download the pangolin code up to date, and the GLX_SAMPLE_BUFFERS and GLX_SAMPLES are deleted.

how should I do now. Any one can help me?

OS : ubuntu 12.04

@stevenlovegrove
Copy link
Owner

Make sure a simple graphical program like glxgears can run on your system. Then try the Pangolin sample HelloPangolin. If the first works, but the latter doesn't, then it may be a Pangolin issue and you should repost here. Otherwise you will need to make sure that you have OpenGL correctly configured on your system.

@ccyinlu
Copy link

ccyinlu commented Jan 4, 2017

When I run HelloPangolin on the real ubuntu 14.04 or VMWare, it works well!
I have used putty and XMing to run graphical application, and it works! Such as xclock and glxgears!
When I run HelloPangolin via ssh, error as fellows:

terminate called after throwing an instance of 'std::runtime_error'
  what():  Pangolin X11: Unable to retrieve framebuffer options
Aborted (core dumped)

Can anyone to help if I want to run Pangolin based application via remote ssh?

@yf13
Copy link

yf13 commented Jan 6, 2017

@ccyinlu I got similar error with HelloPangolin with Ubuntu 16.04 guest inside virtual box on a Windows 7 host. My X11 display is also Xming on the Win 7 reachable from PuTTY tunnel and the "glxgears" tool runs well without issues.

@yf13
Copy link

yf13 commented Jan 6, 2017

I noticed that my Windows 7 display mode is 16bit (RGB565) actually, thus I commented out the bits related attributes in display_x11.cpp. However, I finally was stopped by the fact that Pangolin requires at least GLX 1.3 but my Xming server seems like 1.2:

u@ubuntu:~/pangolin/build$` examples/HelloPangolin/HelloPangolin
Framebuffer with requested attributes not available. Using available framebuffer. You may see visual artifacts.terminate called after throwing an instance of 'std::runtime_error'
  what():  Pangolin X11: Invalid GLX version. Require GLX >= 1.3
Aborted (core dumped)

So very likely my X11 environment is not proper for Pangolin. :(

@stevenlovegrove
Copy link
Owner

Have you tried modifying the check on line 178 of display_x11.cpp? I'm not really aware of the difference between 1.2 and 1.3 - perhaps it will still work?

@ccyinlu
Copy link

ccyinlu commented Jan 11, 2017

This problem may be solved by providing an X server with higher version for GLX.
@yf13 If you have problem as fellows:

what():  Pangolin X11: Invalid GLX version. Require GLX >= 1.3

As @stevenlovegrove metioned, line 178 of display_x11.cpp will check the version of GLX you have installed in your client PC.
You can either try to uncomment the verification (line 178) or just upgrade your GLX to at least 1.3, for Pangolin needs GLX version >= 1.3
You can refer to install OpenGL to install the latest version (1.4).

Even if you upgrade your GLX version in the client PC to meet Pangolin's requirement, you may still get problem like what(): Pangolin X11: Unable to retrieve framebuffer options when your GLX version in the X server does not match the client.

I tried Xming 6.9 in the Server PC, and run glxinfo in the clinet:

ccyinlu@vicboomDell:~/ethan/git/Pangolin/build/examples/HelloPangolin$ glxinfo
name of display: localhost:10.0
display: localhost:10  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.2
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info,
    GLX_EXT_visual_rating, GLX_OML_swap_method, GLX_SGIS_multisample,
    GLX_SGIX_fbconfig, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier,
    GLX_SGI_make_current_read
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4

It indicated that the GLX version is 1.2 in Xming 6.9. You will be confronted with problems running HelloPangolin under this circumstance. (xclock and glxgears run well, maybe they can run on the GLX with version lower than 1.3)

Xming 7.5 or Xming 7.7 is not free, maybe it can fix the problem. (I have not tried)

I have tried MoboXterm 9.3 in the server PC, and run glxinfo in the client:

ccyinlu@vicboomDell:~/ethan/git/Pangolin/build/examples/HelloPangolin$ glxinfo
name of display: localhost:10.0
display: localhost:10  screen: 0
direct rendering: Yes
server glx vendor string: SGI
server glx version string: 1.4
server glx extensions:
    GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_texture_from_pixmap,
    GLX_EXT_visual_info, GLX_EXT_visual_rating, GLX_MESA_copy_sub_buffer,
    GLX_OML_swap_method, GLX_SGIS_multisample, GLX_SGIX_fbconfig,
    GLX_SGIX_pbuffer, GLX_SGIX_visual_select_group
client glx vendor string: Mesa Project and SGI
client glx version string: 1.4

After the GLX version upgraded to 1.4 in the server PC, xclock, glxgears and HelloPangolin all run well.

So the key point is that the GLX version for X server, client and Pangolin itself should be treated carefully.

@SkyRiderMike
Copy link

I still meet this problem at latest stable build. My environment is running on Bash Ubuntu on Windows 10 and Xming Server. The glxgears application runs well on my computer. The code compiled successfully, but still have problem with "Pangolin X11: Unable to retrieve framebuffer options "

@ubuntuslave
Copy link

I'm using GLX version 1.4 but still throws this framebuffer error related to glXChooseFBConfig() from display_x11.cpp. My glxgears works fine. However, the simple HelloPangolin example fails like this in Ubuntu 16.04 running under Parallels on OS X 10.12.6 (Sierra).

@ubuntuslave
Copy link

As somebody else mentioned in #81, Pangolin works after disabling 3d acceleration on my Parallels virtual machine configuration. It's kind of laggy though!

@Junxen
Copy link

Junxen commented Sep 6, 2018

@sunstarchan , hi ,I have the second problem on mac, from /Users/Ming/Documents/Projects/package_dir/Pangolin/src/display/device/display_osx.mm:33:

can you give more detail about how you solved the issue please?

@ms-masker
Copy link

ms-masker commented Nov 13, 2019

I meet an error,
/home/masker/SLAM/slambook-master/ch3/visualizeGeometry/visualizeGeometry.cpp:93:32: error: conversion from ‘pangolin::OpenGlMatrix’ to non-scalar type ‘Eigen::Matrix<double, 4, 4>’ requested
Matrix<double,4,4> m = matrix;
can any one help me? thank you
here the source codes
d_cam.Activate( s_cam );
pangolin::OpenGlMatrix matrix = s_cam.GetModelViewMatrix();
Matrix<double,4,4> m = matrix;

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