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

freeglut (foo): ERROR: Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow #15

Closed
cookiegg opened this issue Oct 20, 2018 · 15 comments

Comments

@cookiegg
Copy link

cookiegg commented Oct 20, 2018

My system enviroment

python:anaconda3

bullet3: 2.87

The bullet was installed use two different mehods:

method 1:

cmake .
make 
sudo make install

method 2:

./build_cmake_pybullet_double.sh

And the pybullet and Bullet/example/examplebrowser could be opened without problem.

Build process

My directory variable set as:

EIGEN_DIR = /data/program/eigen-eigen-b3f3d4950030
BULLET_INC_DIR = /data/program/bullet3-2.87/src

PYTHON_INC = /home/forrest/anaconda3/include/python3.6m
PYTHON_LIB = /home/forrest/anaconda3/lib -lpython3.6m

When I build DeepMimic, after entering make python,the build process stop with the output as follows:

17 warnings generated.
clang++ -shared -std=c++11 -O3 -Wall -fPIC  objs/Main.o objs/DeepMimicCore.o objs/util/Annealer.o objs/util/ArgParser.o objs/util/BVHReader.o objs/util/FileUtil.o objs/util/IndexManager.o objs/util/JsonUtil.o objs/util/MathUtil.o objs/util/Rand.o objs/util/Timer.o objs/util/Trajectory.o objs/util/json/json_reader.o objs/util/json/json_value.o objs/util/json/json_writer.o objs/anim/Character.o objs/anim/KinCharacter.o objs/anim/KinTree.o objs/anim/Motion.o objs/anim/Shape.o objs/sim/AgentRegistry.o objs/sim/CharController.o objs/sim/ContactManager.o objs/sim/Controller.o objs/sim/CtController.o objs/sim/CtCtrlUtil.o objs/sim/CtPDController.o objs/sim/CtrlBuilder.o objs/sim/CtVelController.o objs/sim/DeepMimicCharController.o objs/sim/ExpPDController.o objs/sim/GroundBuilder.o objs/sim/Ground.o objs/sim/GroundPlane.o objs/sim/ImpPDController.o objs/sim/MultiBody.o objs/sim/ObjTracer.o objs/sim/PDController.o objs/sim/Perturb.o objs/sim/PerturbManager.o objs/sim/RBDModel.o objs/sim/RBDUtil.o objs/sim/SimBodyJoint.o objs/sim/SimBodyLink.o objs/sim/SimBox.o objs/sim/SimCapsule.o objs/sim/SimCharacter.o objs/sim/SimCharBuilder.o objs/sim/SimCharGeneral.o objs/sim/SimCylinder.o objs/sim/SimJoint.o objs/sim/SimObj.o objs/sim/SimPlane.o objs/sim/SimRigidBody.o objs/sim/SimSphere.o objs/sim/SpAlg.o objs/sim/World.o objs/render/Camera.o objs/render/DrawCharacter.o objs/render/DrawGround.o objs/render/DrawKinTree.o objs/render/DrawMesh.o objs/render/DrawObj.o objs/render/DrawPerturb.o objs/render/DrawSimCharacter.o objs/render/DrawUtil.o objs/render/DrawWorld.o objs/render/GraphUtil.o objs/render/IBuffer.o objs/render/MatrixStack.o objs/render/MeshUtil.o objs/render/Shader.o objs/render/ShadowMap.o objs/render/TextureDesc.o objs/render/TextureUtil.o objs/render/VertexBuffer.o objs/render/lodepng/lodepng.o objs/render/lodepng/lodepng_util.o objs/scenes/DrawRLScene.o objs/scenes/DrawScene.o objs/scenes/DrawSceneImitate.o objs/scenes/DrawSceneKinChar.o objs/scenes/DrawSceneSimChar.o objs/scenes/RLScene.o objs/scenes/RLSceneSimChar.o objs/scenes/SceneBuilder.o objs/scenes/Scene.o objs/scenes/SceneImitate.o objs/scenes/SceneKinChar.o objs/scenes/SceneSimChar.o  -lGLEW -lGL -lGLU -lglut -lBulletDynamics -lBulletCollision -lLinearMath DeepMimicCore_wrap.o -o _DeepMimicCore.so -L/home/forrest/anaconda3/lib -lpython3.6m

issue

At the time, I thought the build process finished, but when I run

python DeepMimic.py --arg_file args/run_humanoid3d_spinkick_args.txt

I get a Error about freeglut. But I test freeglut with other script, it's works.

forrest@cyborg:/data/Documents/DeepMimic$ python DeepMimic.py --arg_file args/run_humanoid3d_spinkick_args.txt
/home/forrest/anaconda3/lib/python3.6/site-packages/h5py/__init__.py:34: FutureWarning: Conversion of the second argument of issubdtype from `float` to `np.floating` is deprecated. In future, it will be treated as `np.float64 == np.dtype(float).type`.
  from ._conv import register_converters as _register_converters
freeglut (foo):  ERROR:  Internal error <FBConfig with necessary capabilities not found> in function fgOpenWindow

And glxinfo | grep OpenGL output as follows:

OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: TITAN X (Pascal)/PCIe/SSE2
OpenGL core profile version string: 4.3.0 NVIDIA 384.111
OpenGL core profile shading language version string: 4.30 NVIDIA via Cg compiler
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.5.0 NVIDIA 384.111
OpenGL shading language version string: 4.50 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

I googled this problem, but did not find a solution. Could you give me some tips to fix this problem? Thanks!

@cookiegg
Copy link
Author

I find the above error appear when running to

  • line 275 of DeepMimic.py
glutCreateWindow(bDeepMimic’)

If I comment

from learning.rl_world import RLWorld

Above error disappear, and a new error occur:

forrest@cyborg:/data/Documents/DeepMimic$ python DeepMimic.py --arg_file args/run_humanoid3d_spinkick_args.txt
Renderer: TITAN X (Pascal)/PCIe/SSE2
OpenGL version supported 4.3.0 NVIDIA 384.111
Compiling shader: data/shaders/Mesh_VS.glsl
Compiling shader: data/shaders/VertColor_PS.glsl
Compiling shader: data/shaders/FullScreenQuad_VS.glsl
Compiling shader: data/shaders/DownSample_PS.glsl
Compiling shader: data/shaders/Mesh_VS.glsl
Compiling shader: data/shaders/DownSample_PS.glsl
[cyborg:29427] *** Process received signal ***
[cyborg:29427] Signal: Segmentation fault (11)
[cyborg:29427] Signal code: Address not mapped (1)
[cyborg:29427] Failing at address: (nil)
[cyborg:29427] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7f6807529330]
[cyborg:29427] *** End of error message ***
Segmentation fault (core dumped)

The new error seems occur during running to

  • line 293 of DeepMimic.py:

    env = DeepMimicEnv(args, enable_draw)
  • line 16 of deepmimic_env.py:

    self._core.Init
  • line 636 of DeepMimicCore.py:

    def Init(self):
      return _DeepMimicCore.cDeepMimicCore_Init(self)

@xbpeng
Copy link
Owner

xbpeng commented Oct 21, 2018

Haven't seen that error before. You shouldn't be commenting out RLWorld. Maybe try commenting out the three lines here:

glutInitContextVersion(3, 2)

glutInitContextVersion(3, 2)
glutInitContextFlags(GLUT_FORWARD_COMPATIBLE)
glutInitContextProfile(GLUT_CORE_PROFILE)

and see if that makes any difference.

@cookiegg
Copy link
Author

I try commenting out the three lines you mentioned, the old error about freeglut appear again.

@renzhendian
Copy link

@cookiegg I have the same problem. Do you solve this problem?

@cookiegg
Copy link
Author

@renzhendian I upgrade my OS from ubuntu1404 to 1604, the old error about freeglut disappeared.
I do not know how to fix the Segmentation fault (core dumped) error about shader.
However, at least the code about training policy can run normally.

python mpi_run.py --arg_file args/train_humanoid3d_spinkick_args.txt --num_workers 4

screenshot from 2018-10-24 19-04-22

So, the problem is only related to the shader,I am still analyzing the cause of the error.

@MarshallChen
Copy link

MarshallChen commented Oct 25, 2018

I have the same problem on Mac OSX High Sierra. Well build this project on mac is much painful, I also modified shaders version from 130 to 120, don't think it's shaders problem at all. @cookiegg have you solved your Segmentation fault error?

Renderer: Intel Iris Pro OpenGL Engine
OpenGL version supported 2.1 INTEL-10.36.19
Compiling shader: data/shaders/Mesh_VS.glsl
Compiling shader: data/shaders/VertColor_PS.glsl
Compiling shader: data/shaders/FullScreenQuad_VS.glsl
Compiling shader: data/shaders/DownSample_PS.glsl
Compiling shader: data/shaders/Mesh_VS.glsl
Compiling shader: data/shaders/DownSample_PS.glsl
[marshall:65363] *** Process received signal ***
[marshall:65363] Signal: Segmentation fault: 11 (11)
[marshall:65363] Signal code: Address not mapped (1)
[marshall:65363] Failing at address: 0x0
[marshall:65363] [ 0] 0   libsystem_platform.dylib            0x00007fff6862af5a _sigtramp + 26
[marshall:65363] [ 1] 0   ???                                 0x0000000000000000 0x0 + 0
[marshall:65363] [ 2] 0   _DeepMimicCore.so                   0x000000011ae9635c _ZN9cMeshUtil14BuildPointMeshERNSt3__110unique_ptrI9cDrawMeshNS0_14default_deleteIS2_EEEE + 44
[marshall:65363] [ 3] 0   _DeepMimicCore.so                   0x000000011ae8dae0 _ZN9cDrawUtil11BuildMeshesEv + 16
[marshall:65363] [ 4] 0   _DeepMimicCore.so                   0x000000011ae8d7d3 _ZN9cDrawUtil12InitDrawUtilEv + 147
[marshall:65363] [ 5] 0   _DeepMimicCore.so                   0x000000011adb2378 _ZN14cDeepMimicCore4InitEv + 24
[marshall:65363] [ 6] 0   _DeepMimicCore.so                   0x000000011aef404b _ZL25_wrap_cDeepMimicCore_InitP7_objectS0_ + 91
[marshall:66630] [ 7] 0   Python                              0x000000010b229005 _PyCFunction_FastCallDict + 166
[marshall:66630] [ 8] 0   Python                              0x000000010b28f0e6 call_function + 491
[marshall:66630] [ 9] 0   Python                              0x000000010b287621 _PyEval_EvalFrameDefault + 1659
[marshall:66630] [10] 0   Python                              0x000000010b2901e9 _PyFunction_FastCall + 121
[marshall:66630] [11] 0   Python                              0x000000010b28f0bd call_function + 450
[marshall:66630] [12] 0   Python                              0x000000010b287621 _PyEval_EvalFrameDefault + 1659
[marshall:66630] [13] 0   Python                              0x000000010b28f866 _PyEval_EvalCodeWithName + 1747
[marshall:66630] [14] 0   Python                              0x000000010b290119 _PyFunction_FastCallDict + 449
[marshall:66630] [15] 0   Python                              0x000000010b1f0708 _PyObject_FastCallDict + 196
[marshall:66630] [16] 0   Python                              0x000000010b1f082b _PyObject_Call_Prepend + 156
[marshall:66630] [17] 0   Python                              0x000000010b1f0589 PyObject_Call + 101
[marshall:66630] [18] 0   Python                              0x000000010b23c4d8 slot_tp_init + 57
[marshall:66630] [19] 0   Python                              0x000000010b239439 type_call + 184
[marshall:66630] [20] 0   Python                              0x000000010b1f06d3 _PyObject_FastCallDict + 143
[marshall:66630] [21] 0   Python                              0x000000010b28f0b6 call_function + 443
[marshall:66630] [22] 0   Python                              0x000000010b287621 _PyEval_EvalFrameDefault + 1659
[marshall:66630] [23] 0   Python                              0x000000010b28f866 _PyEval_EvalCodeWithName + 1747
[marshall:66630] [24] 0   Python                              0x000000010b28ff49 fast_function + 218
[marshall:66630] [25] 0   Python                              0x000000010b28f0bd call_function + 450
[marshall:66630] [26] 0   Python                              0x000000010b2876b8 _PyEval_EvalFrameDefault + 1810
[marshall:66630] [27] 0   Python                              0x000000010b2901e9 _PyFunction_FastCall + 121
[marshall:66630] [28] 0   Python                              0x000000010b28f0bd call_function + 450
[marshall:66630] [29] 0   Python                              0x000000010b287621 _PyEval_EvalFrameDefault + 1659
[marshall:66630] *** End of error message ***
[1]    66630 segmentation fault  python3 DeepMimic.py --arg_file args/run_humanoid3d_spinkick_args.txt

@xbpeng
Copy link
Owner

xbpeng commented Oct 25, 2018

It looks like you have OpenGL 2.1, we need 3.2. So that might be the cause of the errors.

@MarshallChen
Copy link

It seems not, shaders compiled without error. @cookiegg he's on OpenGL 4.3 also has this error.

forrest@cyborg:/data/Documents/DeepMimic$ python DeepMimic.py --arg_file args/run_humanoid3d_spinkick_args.txt
Renderer: TITAN X (Pascal)/PCIe/SSE2
OpenGL version supported 4.3.0 NVIDIA 384.111
Compiling shader: data/shaders/Mesh_VS.glsl
Compiling shader: data/shaders/VertColor_PS.glsl
Compiling shader: data/shaders/FullScreenQuad_VS.glsl
Compiling shader: data/shaders/DownSample_PS.glsl
Compiling shader: data/shaders/Mesh_VS.glsl
Compiling shader: data/shaders/DownSample_PS.glsl
[cyborg:29427] *** Process received signal ***
[cyborg:29427] Signal: Segmentation fault (11)
[cyborg:29427] Signal code: Address not mapped (1)
[cyborg:29427] Failing at address: (nil)
[cyborg:29427] [ 0] /lib/x86_64-linux-gnu/libpthread.so.0(+0x10330) [0x7f6807529330]
[cyborg:29427] *** End of error message ***
Segmentation fault (core dumped)

@MarshallChen
Copy link

So may be we should use OpenGL 3.2 explicitly?

@xbpeng
Copy link
Owner

xbpeng commented Oct 26, 2018

do you know what is triggering that seg fault?

@MarshallChen
Copy link

MarshallChen commented Oct 26, 2018

_ZN9cMeshUtil14BuildPointMeshERNSt3__110unique_ptrI9cDrawMeshNS0_14default_deleteIS2_EEEE + 44

By the line above it's pointing out that maybe cDrawMesh() function didn't working properly on my mac. I tried to std::cout some random strings to console like it says. I think new cDrawMesh() call crashed.

void cMeshUtil::BuildPointMesh(std::unique_ptr<cDrawMesh>& out_mesh)
{
	...
        std::cout << "This will be console logged" << std::endl;
	
        out_mesh = std::unique_ptr<cDrawMesh>(new cDrawMesh());
        
        std::cout << "This will not be logged" << std::endl;
	
        BuildDrawMesh(vert_data, pos_len, norm_data, norm_len, coord_data, coord_len, idx_data, idx_len, out_mesh.get());
}

Maybe you are right it's still the OpenGL problem.

@cookiegg
Copy link
Author

#10
I solved this problem,just comment the line:

glutInitContextVersion(3, 2)

screenshot from 2018-10-30 10-18-38

@xbpeng
Copy link
Owner

xbpeng commented Oct 30, 2018

cool, glad to hear that worked out!

@Superlee506
Copy link

@cookiegg Hi, thanks for this related issue and I face the same problem.
I commented the glutInitContextVersion(3, 2) in Line 269, but the bug still exists. Do I need to do some other modifications?

@cookiegg
Copy link
Author

cookiegg commented Dec 1, 2018

@Superlee506
My env:
ubuntu:16.04
opengl: 4.6.0
NVIDIA Driver: 390.87

I guess the error related with the mismatch between Opengl with OS and Graph Driver. So maybe you should upgrade your OS AND Driver.

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

5 participants