openglsuperbible / sb7code

Source code and supporting material for the 7th Edition of OpenGL SuperBible
727 stars 251 forks source link

Segv crashes on Linux with Catalyst 15.7 #2

Closed ghost closed 9 years ago

ghost commented 9 years ago

All examples works great except these two:

bindlesstex example crashes at line 156, glMakeTextureHandleResidentARB function:

Program received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x00007ffff33a6c6f in ?? () from /usr/lib/dri/fglrx_dri.so
#2  0x00007ffff2c9f82e in ?? () from /usr/lib/dri/fglrx_dri.so
#3  0x00007ffff2d7b5e2 in ?? () from /usr/lib/dri/fglrx_dri.so
#4  0x00007ffff2d7cd0e in ?? () from /usr/lib/dri/fglrx_dri.so
#5  0x00007ffff2d7e1e0 in ?? () from /usr/lib/dri/fglrx_dri.so
#6  0x00007ffff2a5ddbd in ?? () from /usr/lib/dri/fglrx_dri.so
#7  0x00007ffff21443e5 in ?? () from /usr/lib/dri/fglrx_dri.so
#8  0x0000000000414820 in bindlesstex_app::startup (this=0x448f70)
    at ../src/bindlesstex/bindlesstex.cpp:156
#9  0x000000000041562e in sb7::application::run (this=0x448f70, the_app=0x448f70)
    at ../include/sb7.h:159
#10 0x0000000000414efc in main (argc=1, argv=0x7fffffffdea8)
    at ../src/bindlesstex/bindlesstex.cpp:256

sparsetexture example crashes at line 173, glTexSubImage2D function:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2d24c4c in ?? () from /usr/lib/dri/fglrx_dri.so
(gdb) bt
#0  0x00007ffff2d24c4c in ?? () from /usr/lib/dri/fglrx_dri.so
#1  0x00007ffff2ca75e9 in ?? () from /usr/lib/dri/fglrx_dri.so
#2  0x00007ffff2cb0075 in ?? () from /usr/lib/dri/fglrx_dri.so
#3  0x00007ffff2cb9774 in ?? () from /usr/lib/dri/fglrx_dri.so
#4  0x00007ffff2a5cb98 in ?? () from /usr/lib/dri/fglrx_dri.so
#5  0x00007ffff2a5fe85 in ?? () from /usr/lib/dri/fglrx_dri.so
#6  0x00007ffff2a68ac3 in ?? () from /usr/lib/dri/fglrx_dri.so
#7  0x00007ffff212e654 in ?? () from /usr/lib/dri/fglrx_dri.so
#8  0x00007ffff212f038 in ?? () from /usr/lib/dri/fglrx_dri.so
#9  0x00007ffff25d6027 in ?? () from /usr/lib/dri/fglrx_dri.so
#10 0x00000000004144a3 in sparsetexture_app::render (this=0x447f70, 
    currentTime=0.07021405) at ../src/sparsetexture/sparsetexture.cpp:173
#11 0x0000000000414d5a in sb7::application::run (this=0x447f70, the_app=0x447f70)
    at ../include/sb7.h:163
#12 0x0000000000414626 in main (argc=1, argv=0x7fffffffdea8)
    at ../src/sparsetexture/sparsetexture.cpp:207

I guess ?? in backtraces mean that driver has no debug symbols in it, don't know how to debug it further.

ghost commented 9 years ago

I'm on another machine with HD 7970 card and same Catalyst 15.7 driver: bindlesstex works now, but sparsetexture still crashes:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff2d9dc4c in ?? () from /usr/lib/dri/fglrx_dri.so
(gdb) bt
#0  0x00007ffff2d9dc4c in ?? () from /usr/lib/dri/fglrx_dri.so
#1  0x00007ffff2d205e9 in ?? () from /usr/lib/dri/fglrx_dri.so
#2  0x00007ffff2d29075 in ?? () from /usr/lib/dri/fglrx_dri.so
#3  0x00007ffff2d32774 in ?? () from /usr/lib/dri/fglrx_dri.so
#4  0x00007ffff2ad5b98 in ?? () from /usr/lib/dri/fglrx_dri.so
#5  0x00007ffff2ad8e85 in ?? () from /usr/lib/dri/fglrx_dri.so
#6  0x00007ffff2ae1ac3 in ?? () from /usr/lib/dri/fglrx_dri.so
#7  0x00007ffff21a7654 in ?? () from /usr/lib/dri/fglrx_dri.so
#8  0x00007ffff21a8038 in ?? () from /usr/lib/dri/fglrx_dri.so
#9  0x00007ffff264f027 in ?? () from /usr/lib/dri/fglrx_dri.so
#10 0x00000000004144a3 in sparsetexture_app::render (this=0x436360, 
    currentTime=0.050822314) at ../src/sparsetexture/sparsetexture.cpp:173
#11 0x0000000000414d5a in sb7::application::run (this=0x436360, 
    the_app=0x436360) at ../include/sb7.h:163
#12 0x0000000000414626 in main (argc=1, argv=0x7fffffffdf38)
    at ../src/sparsetexture/sparsetexture.cpp:207

grahamsellers commented 9 years ago

Thanks for the reports. Unfortunately, the AMD implementation doesn't support sparse textures on Linux at this time. The samples are pretty simple and don't do any real error checking, hence they can crash when using unsupported extensions.

georgeraraujo commented 9 years ago

These also crash for me on Windows 8.1 x64 with:

But they work fine on a GeForce GTX 650 with driver 353.30 (OpenGL 4.5).

1

2

ghost commented 9 years ago

These also crash for me on Windows 8.1 x64 with:

AMD Radeon HD7670M with Catalyst 14.12 (OpenGL 4.4); Intel HD 4400 with driver 10.18.14.4206 (OpenGL 4.3).

Yea, since these two examples use OpenGL 4.5 -- they crash.

Thanks for the reports. Unfortunately, the AMD implementation doesn't support sparse textures on Linux at this time. The samples are pretty simple and don't do any real error checking, hence they can crash when using unsupported extensions.

Good to know, thank you, Graham! Issue is closed.

georgeraraujo commented 9 years ago

Yea, since these two examples use OpenGL 4.5 -- they crash.

A program that uses a later OpenGL version does not necessarily crash. compressrgtc, for example, does not run but also does not crash on the Intel - the window shows nothing, and the program prints errors to stdout.

media/shaders/rgtc/rgtccompress.cs.glsl:ERROR: 0:24: '' :  Incorrect GLSL version: 440
WARNING: 0:26: 'GL_ARB_explicit_attrib_location' :  extension is not available in current GLSL version
WARNING: 0:26: 'local_size_x' : symbol not available in current GLSL version 
ghost commented 9 years ago

If your HD 7670M with Catalyst 15.7 runs every program fine -- Graham's job is done :) He can't affect the quality of drivers from Nvidia or Intel. Also, be sure to check the list of supported extensions for your card.

georgeraraujo commented 9 years ago

I am not complaining that the programs crash, nor that they should run on hardware that is not compatible with OpenGL 4.5. I just reported that they crash on my HD 7670M, which is compatible with OpenGL 4.4 - and runs Catalyst 14.12.