Jump to content

[SOLVED] Sample GLAppQt does not work on Linux


photo

Recommended Posts

I want to try GLAppQt, it compiles without error, but when I start it, he show me error window with message:

GLAppQt::create_context(): glXMakeCurrent(): failed

Engine::video_restart(): can't set 1024x768 windowed video mode

 

With Unigine app I have no problem, it's work fine.

 

Uningine log:

 

~/Downloads/UnigineSDK-source-2012-09-07/source/samples/App/GLAppQt$ ./main.py

X Error: BadWindow (invalid Window parameter) 3

Major opcode: 31 (X_GrabKeyboard)

Resource id: 0x0

Loading "/home/ziv/Downloads/UnigineSDK-source-2012-09-07/source/samples/App/GLAppQt/../../../../data/demos/sanctuary/unigine.cfg"...

Loading "libGL.so.1"...

Loading "libopenal.so.1"...

Set 1024x768 windowed video mode

------------- 0x8cc9cd8

X Error: BadMatch (invalid parameter attributes) 8

Extension: 135 (Uknown extension)

Minor opcode: 5 (Unknown request)

Resource id: 0x4a0000d

GLAppQt::create_context(): glXMakeCurrent(): failed

Engine::video_restart(): can't set 1024x768 windowed video mode

Set 1280x720 windowed video mode

------------- 0x8b3ebd0

X Error: BadMatch (invalid parameter attributes) 8

Extension: 135 (Uknown extension)

Minor opcode: 5 (Unknown request)

Resource id: 0x4a0000d

GLAppQt::create_context(): glXMakeCurrent(): failed

 

Unigine fatal error

GLAppQt::create_context(): glXMakeCurrent(): failed

Engine::video_restart(): can't set 1280x720 windowed video mode

Shutdown

 

Thanks.

Link to comment
  • 2 weeks later...
  • 6 months later...

Still the same ...

Using :

 

- UnigineSDK_source_2013-04-30_linux

- Using Qt version 4.8.3 in /usr/lib/i386-linux-gnu

- Linux alderaan 3.5.0-27-generic #46-Ubuntu SMP Mon Mar 25 20:00:05 UTC 2013 i686 i686 i686 GNU/Linux

- Ubuntu 12.10

- Nvidia binary : 310.40 (GeForce GTX 460M)

 

 

 

16:01:34 Loading "/opt/UnigineSDK_source_2013-04-30_linux/bin/../data/demos/crypt/unigine.cfg"...
16:01:34 Loading "libInterface_x86d.so"...
16:01:34 Loading "libGL.so.1"...
16:01:34 Set 1280x720 windowed video mode
16:01:34 GLAppQt::create_context(): glXMakeCurrent(): failed
16:01:34 Engine::video_restart(): can't set 1280x720 windowed video mode
16:01:41 Set 1280x720 windowed video mode
16:01:41 GLAppQt::create_context(): glXMakeCurrent(): failed
16:01:41 Engine::video_restart(): can't set 1280x720 windowed video mode
16:01:41 Shutdown

 

I've tested GLAppQt.zip but doesn't compile

 

Thanks

Link to comment
  • 2 weeks later...
Changes made :

----------------------

 

.h : class AppQt : public QGLWidget, public Unigine::App {

.cpp : AppQt::AppQt(QWidget *parent,Qt::WindowFlags flags) : QGLWidget(parent,0,flags) {


 

 

Console output :

----------------------

 

christophe@alderaan:/opt/UnigineSDK_source_2013-04-30_linux/bin$ ./main -engine_config ../data/demos/crypt/unigine.cfg

Loading "/opt/UnigineSDK_source_2013-04-30_linux/bin/../data/demos/crypt/unigine.cfg"...

Loading "libInterface_x86d.so"...

Loading "libGL.so.1"...

Set 1280x720 windowed video mode

X Error: BadMatch (invalid parameter attributes) 8

  Extension:    153 (Uknown extension)

  Minor opcode: 5 (Unknown request)

  Resource id:  0x4a0000b

GLAppQt::create_context(): glXMakeCurrent(): failed

Engine::video_restart(): can't set 1280x720 windowed video mode

Set 1280x720 windowed video mode

X Error: BadMatch (invalid parameter attributes) 8

  Extension:    153 (Uknown extension)

  Minor opcode: 5 (Unknown request)

  Resource id:  0x4a0000b

GLAppQt::create_context(): glXMakeCurrent(): failed

 

Unigine fatal error

GLAppQt::create_context(): glXMakeCurrent(): failed

Engine::video_restart(): can't set 1280x720 windowed video mode

Shutdown

 

 

Debug :

----------------------

 

It crash on GLAppQt.cpp on line : if(glXMakeCurrent(display,window,context) == 0) {...

 

 

 

Thanks

 

 

Link to comment

Have you tried other resolution, other driver version, other PC with different GPU for testing if the crash might be caused by the driver/hardware ?

Link to comment

Running the same demo (or any other Unigine application) outside of Qt is working very well.

Don't think it's hw related ...

Link to comment

Hi,

 

I've tried to build GLAppQt sample with qt designer 2.7 + QT SDK 4.8.4 and it worked (but I've used Ubuntu 13.04 instead of 12.04). Steps for reproduction:

  1. sudo aptitude install libqt4-core libqt4-dev libqt4-gui libqt4-qt3support libqt4-sql qt4-designer qt4-dev-tools qt4-doc qt4-qtconfig
  2. sudo apt-get install ccache
  3. sudo apt-get install cmake
  4. sudo apt-get install qtcreator
  5. Launch the qtcreator;
  6. Open build settings:

    Tools -> Options -> Build & Run -> Qt Versions
     
  7. Select the QT 5.0.1 in PATH (System)...
  8. Press Browse button near the field qmake location:;
  9. Select the qmake-qt4 in opened window (the path should be /usr/bin/qmake-qt4)
  10. Press OK button to save the changes;
  11. Open the main.pro from <SDK>/samples/App/GLAppQt in qtcreator;
  12. Press Configure project button
  13. Modify the main.pro file in the unix section to get the following content:

    unix {
    ​   DEFINES += _LINUX
       LIBS += -L$$PWD/../../../../lib/
       LIBS += -lX11
       LIBS += -lUnigine_x86d
       LIBS += -lGL
    }
     
  14. After that press Ctrl+Shift+B to build the application; 
  15. You will get compiled main in the configured output dir (in my case this is <SDK>/samples/App/build-main-Desktop-Debug directory);
  16. Copy main to <SDK>/samples/App/GLAppQt;
  17. Replace main.py with the attached file (unzip first);
  18. Launch main.py.

Thanks!

main_py.zip

main.pro_settings.png

How to submit a good bug report
---
FTP server for test scenes and user uploads:

Link to comment

Fixed !!!

 

An other problem is that the Interface plugin of the crypt demo is crashing (I had to remove it to make the example run with this demo) and  a co-worker told me that in windows it's also crashing but not each time.

 

Thanks for the fix

Link to comment
×
×
  • Create New...