SFML community forums

Help => Graphics => Topic started by: xarxer on March 04, 2011, 04:00:46 pm

Title: X Error (Cannot isolate problem)
Post by: xarxer on March 04, 2011, 04:00:46 pm
Hello, I have an exact copy of the QT-integration tutorial source code and I'm trying to run it.
The application starts and all, but I cannot see the SFML-widget, and this is the output:

Code: [Select]
Starting: /home/ftp4/cpp/projects/qsnake/build/qsnake
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id:  0x5c0000a
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id:  0x5c0000a
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 8 (X_MapWindow)
  Resource id:  0x5c0000a
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id:  0x5c0000a
X Error: RenderBadPicture (invalid Picture parameter) 175
  Extension:    153 (RENDER)
  Minor opcode: 7 (RenderFreePicture)
  Resource id:  0x15a
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 4 (X_DestroyWindow)
  Resource id:  0x5c0000a
*** Exited normally ***


And if I try to run a simple non-qt SFML app such as

Code: [Select]

#include <iostream>
#include <SFML/Graphics.hpp>

int main(int argc, char **argv) {
   
    sf::VideoMode Vid = sf::VideoMode::GetDesktopMode();
    Vid.Height = 600;
    Vid.Width = 400;
   
    sf::RenderWindow App(Vid,"Test", sf::Style::Close);
   
    sf::Event Event;
   
    while(App.IsOpened())
    {
while(App.GetEvent(Event)) {
   if(Event.Type == sf::Event::KeyPressed && Event.Key.Code == sf::Key::Escape)
App.Close();
}

App.Clear(sf::Color::Black);
    }

    return 0;
}



it just freezes (not really freezes, it takes all CPU power there is in the universe).

Any ideas what might be wrong?

Graphics drivers are up to date and all necessary libraries for X is installed.  
Same problem in SFML 1.6 and SFML 2 :(
Title: X Error (Cannot isolate problem)
Post by: Laurent on March 04, 2011, 04:08:56 pm
Quote
The application starts and all, but I cannot see the SFML-widget

I have no idea, sorry.

Quote
it just freezes (not really freezes, it takes all CPU power there is in the universe

This simply reflects what your code does: an endless loop with no pause. So this one is normal, and has nothing to do with your bug.
Title: X Error (Cannot isolate problem)
Post by: xarxer on March 04, 2011, 04:34:38 pm
Yeah you're right. I corrected the simple SFML-app and it works fine.

From this I draw the conclusion that the problem is X-related in some way.. have to do some research, thanks!  :)
Title: X Error (Cannot isolate problem)
Post by: devlin on March 04, 2011, 05:09:01 pm
Where's your App.Display() call?