Skip to content

Pangolin X11: Unable to retrieve framebuffer options #74

@sunstarchan

Description

@sunstarchan

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

Activity

sunstarchan

sunstarchan commented on Jan 29, 2016

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

stevenlovegrove commented on Jan 29, 2016

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

stevenlovegrove commented on Jan 29, 2016

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

sunstarchan commented on Jan 31, 2016

@sunstarchan
Author

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

paulinus

paulinus commented on Feb 1, 2016

@paulinus

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

sunstarchan commented on Feb 2, 2016

@sunstarchan
Author

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

stevenlovegrove

stevenlovegrove commented on Feb 9, 2016

@stevenlovegrove
Owner

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

qiangw89

qiangw89 commented on Feb 23, 2016

@qiangw89

@paulinus Also solved my problem. Thanks very much!

OtacilioNeto

OtacilioNeto commented on Jun 16, 2016

@OtacilioNeto

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

lucasmedino

lucasmedino commented on Jun 24, 2016

@lucasmedino

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

OtacilioNeto

OtacilioNeto commented on Jun 24, 2016

@OtacilioNeto

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?

7 remaining items

ccyinlu

ccyinlu commented on Jan 4, 2017

@ccyinlu

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

yf13 commented on Jan 6, 2017

@yf13

@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

yf13 commented on Jan 6, 2017

@yf13

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

stevenlovegrove commented on Jan 10, 2017

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

ccyinlu commented on Jan 11, 2017

@ccyinlu

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

SkyRiderMike commented on May 17, 2017

@SkyRiderMike

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

ubuntuslave commented on Mar 8, 2018

@ubuntuslave

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

ubuntuslave commented on Mar 8, 2018

@ubuntuslave

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

Junxen commented on Sep 6, 2018

@Junxen

@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

ms-masker commented on Nov 13, 2019

@ms-masker

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @ubuntuslave@stevenlovegrove@paulinus@yf13@qiangw89

        Issue actions

          Pangolin X11: Unable to retrieve framebuffer options · Issue #74 · stevenlovegrove/Pangolin