Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: X Error (Cannot isolate problem)  (Read 2508 times)

0 Members and 1 Guest are viewing this topic.

xarxer

  • Newbie
  • *
  • Posts: 35
    • View Profile
X Error (Cannot isolate problem)
« 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 :(

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32504
    • View Profile
    • SFML's website
    • Email
X Error (Cannot isolate problem)
« Reply #1 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.
Laurent Gomila - SFML developer

xarxer

  • Newbie
  • *
  • Posts: 35
    • View Profile
X Error (Cannot isolate problem)
« Reply #2 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!  :)

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
X Error (Cannot isolate problem)
« Reply #3 on: March 04, 2011, 05:09:01 pm »
Where's your App.Display() call?

 

anything