PGE icon indicating copy to clipboard operation
PGE copied to clipboard

running time error

Open zdx3578 opened this issue 8 years ago • 10 comments

i am run PGE in ec2 xrdp desktop: when run PGE demo error bellow: ubuntu@ip-172-30-0-107:/opt/practice/pge/PGE/pge$ sudo python Tennis-v0.py t3d1 [2016-05-17 14:18:23,249] Making new env: Tennis3D-v0 Warning: The created OpenGL context does not fully meet the settings that were requested Requested: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false Created: version = 1.3 ; depth bits = 16 ; stencil bits = 8 ; AA level = 0 ; core = false ; debug = false Setting vertical sync not supported X Error of failed request: BadRequest (invalid request code or no such operation) Major opcode of failed request: 148 (GLX) Minor opcode of failed request: 206 () Serial number of failed request: 114 Current serial number in output stream: 114

(now i seem listen on tcp port )

^CTraceback (most recent call last): File "Tennis-v0.py", line 16, in env = gym.make('Tennis3D-v0') File "/opt/practice/gym/gym/envs/registration.py", line 76, in make return spec.make() File "/opt/practice/gym/gym/envs/registration.py", line 52, in make env = cls(**self._kwargs) File "/opt/practice/pge/PGE/pge/pypge/Tennis3DInterface.py", line 33, in init conn, addr = self.s.accept() File "/usr/lib/python2.7/socket.py", line 202, in accept sock, addr = self._sock.accept() KeyboardInterrupt Exception AttributeError: "'Tennis3DEnv' object has no attribute 'connection'" in <bound method Tennis3DEnv.del of <pypge.Tennis3DInterface.Tennis3DEnv object at 0x7f8d86620c10>> ignored ubuntu@ip-172-30-0-107:/opt/practice/pge/PGE/pge$ ubuntu@ip-172-30-0-107:/opt/practice/pge/PGE/pge$

when running in xvfb: error bellow:

ubuntu@ip-172-30-0-107:/opt/practice/pge/PGE/pge$ xvfb-run -s "-screen 0 1400x900x24" bash

ubuntu@ip-172-30-0-107:/opt/practice$ cd pge/PGE/pge/ ubuntu@ip-172-30-0-107:/opt/practice/pge/PGE/pge$ sudo python Tennis-v01.py [2016-05-17 10:05:04,186] Making new env: Tennis3D-v0 Failed to use the RandR extension while trying to get the desktop video mode Xlib: extension "GLX" missing on display ":99". Xlib: extension "GLX" missing on display ":99". Xlib: extension "GLX" missing on display ":99". Failed to use the RandR extension while trying to get the desktop video mode X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 78 (X_CreateColormap) Serial number of failed request: 9 Current serial number in output stream: 10

any one have any suggest? thanks!

zdx3578 avatar May 17 '16 02:05 zdx3578

@zdx3578 You could try running with the GNU debugger (gdb). You would need to rebuild the pge using the commands cmake -DCMAKE_BUILD_TYPE=Debug . followed by make clean; make and then gdb --args python Tennis-v0.py (when gdb gets to its prompt type run). If you get a crash the gdb backtrace command can then used to show the stack track, to help narrow down where the crash occurs. The output you show looks like an OpenGL related issue.

rcrowder avatar May 17 '16 09:05 rcrowder

Update: I quickly tried a debug version of the PGE on a headless Ubuntu AWS EC2 instance, and faced an issue with SFML Window library. This was seen using gdb when running the PGE as a standalone process, i.e. ./pge Tennis3D-v0 hide 128 128. So it could also be related to SFML too.

rcrowder avatar May 17 '16 11:05 rcrowder

thanks very much; i will try ; we can chat in gitter

in another machine :

pge/PGE/pge$ sudo python Tennis-v0.py [2016-05-17 10:30:56,493] Making new env: Tennis3D-v0

stop in here!

^CTraceback (most recent call last): File "Tennis-v0.py", line 16, in env = gym.make('Tennis3D-v0') File "/usr/local/lib/python2.7/dist-packages/gym/envs/registration.py", line 79, in make return spec.make() File "/usr/local/lib/python2.7/dist-packages/gym/envs/registration.py", line 55, in make env = cls(**self._kwargs) File "/opt/practice/pge/PGE/pge/pypge/Tennis3DInterface.py", line 33, in init conn, addr = self.s.accept() File "/usr/lib/python2.7/socket.py", line 202, in accept sock, addr = self._sock.accept() KeyboardInterrupt Exception AttributeError: "'Tennis3DEnv' object has no attribute 'connection'" in <bound method Tennis3DEnv.del of <pypge.Tennis3DInterface.Tennis3DEnv object at 0x7f00e041e910>> ignored

ubuntu@ip-172-30-0-164opt/practice/pge/PGE/pge$

[2016-05-17 10:30:56,493] Making new env: Tennis3D-v0 stop in here;

maybe it was listin in this : File "/opt/practice/pge/PGE/pge/pypge/Tennis3DInterface.py", line 33, in init conn, addr = self.s.accept() ??

zdx3578 avatar May 17 '16 13:05 zdx3578

Thanks. This AttributeError happens when the PGE process fails to start properly. Investigation into this issue on EC2 show that it's likely an issue with SFML not being able to create a rendering window that can be hooked into OpenAI Gym.

rcrowder avatar May 17 '16 14:05 rcrowder

[2016-05-19 13:10:11,315] Making new env: Tennis3D-v0 X Error of failed request: BadMatch (invalid parameter attributes) Major opcode of failed request: 155 (GLX) Minor opcode of failed request: 34 () Serial number of failed request: 71 Current serial number in output stream: 70

error info not enough; this log is from one 2012 samsung laptop,in ubuntu 14.04

but bullet3/examples/ExampleBrowser run ok!

zdx3578 avatar May 19 '16 09:05 zdx3578

in ubuntu 1604:

zdx@zdx-535U3C:~/Downloads/PGE/pge$ python Tennis-v0.py [2016-05-20 09:56:24,812] Making new env: Tennis3D-v0 Warning: The created OpenGL context does not fully meet the settings that were requested Requested: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false Created: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = true ; debug = false OpenGL extension SGIS_texture_edge_clamp unavailable( can ref https://github.com/SFML/SFML/pull/882) Artifacts may occur along texture edges Ensure that hardware acceleration is enabled if available Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES

  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  • in resources/shaders/positionOnlyVertex.vert Could not load vertex shader! Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  • in resources/shaders/positionOnlyVertex.vert Could not load vertex shader! Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  • in resources/shaders/positionOnlyVertex.vert Could not load vertex shader! Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: 0:1(10): error: GLSL 4.00 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.00 ES, and 3.00 ES
  • in resources/shaders/defaultVertex.vert Could not load vertex shader! pge: /home/zdx/Downloads/PGE/pge/source/pge/rendering/shader/Shader.cpp:283: void pge::Shader::setShaderTexture(const string&, GLuint, GLuint): Assertion `_progID != 0' failed. ^CTraceback (most recent call last): File "Tennis-v0.py", line 16, in env = gym.make('Tennis3D-v0') File "/home/zdx/Downloads/gym/gym/envs/registration.py", line 84, in make return spec.make() File "/home/zdx/Downloads/gym/gym/envs/registration.py", line 57, in make env = cls(**self._kwargs) File "/home/zdx/Downloads/PGE/pge/pypge/Tennis3DInterface.py", line 33, in init conn, addr = self.s.accept() File "/usr/lib/python2.7/socket.py", line 206, in accept sock, addr = self._sock.accept() KeyboardInterrupt Exception AttributeError: "'Tennis3DEnv' object has no attribute 'connection'" in <bound method Tennis3DEnv.del of <pypge.Tennis3DInterface.Tennis3DEnv object at 0x7fcb541fc2d0>> ignored zdx@zdx-535U3C:~/Downloads/PGE/pge$

zdx3578 avatar May 20 '16 02:05 zdx3578

when in mac os EI capitan change /Users/lmj/develop/PGE/pge/source/pge/rendering/SFMLOGL.cpp:3:10: fatal error: 'GL/glu.h' file not found to /Users/lmj/develop/PGE/pge/source/pge/rendering/SFMLOGL.cpp:3:10: fatal error: 'OpenGL/glu.h' make ok

but run error:

lmjdeMacBook-Air:pge lmj$ python Tennis-v0.py [2016-05-21 07:44:06,786] Making new env: Tennis3D-v0 Warning. Compatibility profile not supported on this platform. Error. Unable to create the context. Retrying without shared context. Warning. New context created without shared context. Warning: The created OpenGL context does not fully meet the settings that were requested Requested: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false Created: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = true ; debug = false Unable to compile shader: ERROR: 0:106: Invalid call of undeclared identifier 'texture2D' ERROR: 0:112: Use of undeclared identifier 'diffuseTexColor'

  • in resources/shaders/gbufferrender/gBufferRenderParallax.frag Could not load fragment shader! OpenGL extension SGIS_texture_edge_clamp unavailable Artifacts may occur along texture edges Ensure that hardware acceleration is enabled if available Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:3: 'layout' : syntax error: syntax error
  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:7: 'layout' : syntax error: syntax error
  • in resources/shaders/positionOnlyVertex.vert Could not load vertex shader! Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:7: 'layout' : syntax error: syntax error
  • in resources/shaders/positionOnlyVertex.vert Could not load vertex shader! Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:7: 'layout' : syntax error: syntax error
  • in resources/shaders/positionOnlyVertex.vert Could not load vertex shader! Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:3: 'layout' : syntax error: syntax error
  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:3: 'layout' : syntax error: syntax error
  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:3: 'layout' : syntax error: syntax error
  • in resources/shaders/noTransformVertex.vert Could not load vertex shader! Unable to compile shader: ERROR: 0:1: '' : version '400' is not supported ERROR: 0:7: 'layout' : syntax error: syntax error
  • in resources/shaders/defaultVertex.vert Could not load vertex shader! Assertion failed: (_progID != 0), function setShaderTexture, file /Users/lmj/develop/PGE/pge/source/pge/rendering/shader/Shader.cpp, line 283.

zdx3578 avatar May 20 '16 23:05 zdx3578

mac install SFML from source :

[2016-05-21 08:14:25,656] Making new env: Tennis3D-v0 Warning. Compatibility profile not supported on this platform. Error. Unable to create the context. Retrying without shared context. Warning. New context created without shared context. Warning: The created OpenGL context does not fully meet the settings that were requested Requested: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false Created: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = true ; debug = false ; sRGB = false Unable to compile shader: ERROR: 0:106: Invalid call of undeclared identifier 'texture2D' (ref http://stackoverflow.com/questions/26266198/glsl-invalid-call-of-undeclared-identifier-texture2d) ERROR: 0:112: Use of undeclared identifier 'diffuseTexColor'

  • in resources/shaders/gbufferrender/gBufferRenderParallax.frag Could not load fragment shader! ^CTraceback (most recent call last): File "Tennis-v0.py", line 16, in env = gym.make('Tennis3D-v0')

zdx3578 avatar May 21 '16 00:05 zdx3578

fix texture2d to texture ;

python Tennis-v0.py [2016-05-21 13:52:38,670] Making new env: Tennis3D-v0 Warning. Compatibility profile not supported on this platform. Error. Unable to create the context. Retrying without shared context. Warning. New context created without shared context. Warning: The created OpenGL context does not fully meet the settings that were requested Requested: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false Created: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = true ; debug = false ; sRGB = false

stop in this ; and also no windows appear.

zdx3578 avatar May 21 '16 05:05 zdx3578

in ubunt 16 ; bullet from source; PGE from source; SFML from source;

python Tennis-v0.py [2016-05-21 13:57:06,823] Making new env: Tennis3D-v0 Warning: The created OpenGL context does not fully meet the settings that were requested Requested: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = false ; debug = false ; sRGB = false Created: version = 4.1 ; depth bits = 0 ; stencil bits = 0 ; AA level = 0 ; core = true ; debug = false ; sRGB = false OpenGL extension SGIS_texture_edge_clamp unavailable Artifacts may occur along texture edges Ensure that hardware acceleration is enabled if available invalid enumerant

wait in this ; and also no windows appear.

zdx3578 avatar May 21 '16 05:05 zdx3578