Results 1 to 6 of 6

Thread: X Error: BadRequest (invalid request code or no such operation) 1

  1. #1
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default X Error: BadRequest (invalid request code or no such operation) 1

    Hi! I'm trying to port Qt to a new device. I've been able to port Qt for Embedded Linux with partial OpenGL support, and now I'm working on porting Qt for X11. I've built up an embedded Linux with X11 (tried with two different implementations, xfbdev and Xorg), and Qt is working correctly until I try OpenGL applications. If I try the hellogl_es2 example of Qt I get many errors. The most frequent are these:

    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 160 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 160 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 160 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 160 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082
    X Error: BadRequest (invalid request code or no such operation) 1
    Extension: 198 (Uknown extension)
    Minor opcode: 0 (Unknown request)
    Resource id: 0x600082

    What does this mean?
    I'm trying to understand some way what may be wrong, either the interaction of Qt with my EGL implementation, my EGL implementation itself or X11.
    Is there anyone who can suggest something I can do to somehow determine what the problem is?

    Consider that I already had to modify Qt sources as a segmentation fault occurred when dealing with my EGL implementation. According to what I understood, the problem was related to how Qt was choosing the EGLConfig, but this seems to be fixed now.

    Any help is welcome! Thanks!

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: X Error: BadRequest (invalid request code or no such operation) 1

    Is there anyone who can suggest something I can do to somehow determine what the problem is?
    Just step through the example code with a debugger, and see after which line you get the X Error in the console.
    Then run again to that line, and step in all the way in, until you pin point the exact call which causes the error.
    Depending on the exact call you might get a good idea what the problem is.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: X Error: BadRequest (invalid request code or no such operation) 1

    The problem is that the application seems to run correctly, the first "OpenGL frame" is shown correctly, so I see the image drawn by OpenGL, but after a few frames of the animation I get the errors. So, where can I put some logs to debug? I tried to place some messages in the paint code of hellogl_es2 but it is difficult to understand whether it is inside there that the problem occurs.

    I suppose you were suggesting to use gdb, but I don't think I can use it as I have no network for the moment.

    Where would you place the logs?

    Thank you for your help!

  4. #4
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: X Error: BadRequest (invalid request code or no such operation) 1

    I suppose you were suggesting to use gdb, but I don't think I can use it as I have no network for the moment.
    Why do you need a network for gdb?

    Default Re: X Error: BadRequest (invalid request code or no such operation) 1

    The problem is that the application seems to run correctly, the first "OpenGL frame" is shown correctly, so I see the image drawn by OpenGL, but after a few frames of the animation I get the errors. So, where can I put some logs to debug?
    Not sure how you think any messages could help you in this situation, unless you can intercept the X errors in your code, but then the whole problem is solved?

    My suggestion was not about placing messages, but stepping through the code.
    I assume once you started getting error messages, they come every frame afterworlds.
    So run the application until you start getting the errors, then pause, and put a break point, and start stepping through.
    A good place to place the break point would be a painEvent().
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  5. #5
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: X Error: BadRequest (invalid request code or no such operation) 1

    Because in my toolchain (Sourcery) I only see the tools to use gdb by running a server on my ARM device and connecting to it via TCP. Maybe a should compile gdb for ARM directly to run it locally.

  6. #6
    Join Date
    Jan 2010
    Posts
    190
    Thanks
    18
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: X Error: BadRequest (invalid request code or no such operation) 1

    Ok, I made it work more or less. Now hellogl_es2 seems to work correctly. What I did is compile with various extensions (like xrender etc...). At that point I got a different error message, which led me to some threads speaking about multithreading issues. Thus I placed XInitThreads() at the beginning and seems to work.

    My question is now: why is it necessary? I ported Qt for X11 even on another board, and the example hellogl_es2 was working correctly out of the box without this call.

    I have another question, and maybe I'm OT now: what I see is not good. CPU is working over 60% and the animation is not smooth at all. Not only it is not smooth, it is also slow even if it reports 30FPS. Do you have any clue about why this is happening?

    Thank you very much for your assistance!

Similar Threads

  1. Code Review Request for first small application
    By RurouniJones in forum Newbie
    Replies: 0
    Last Post: 22nd March 2010, 08:22
  2. error: invalid use of void expression
    By ChineseGeek in forum Qt Programming
    Replies: 17
    Last Post: 3rd October 2009, 08:59
  3. error: request for member `ok' in `xxx
    By intek in forum Qt Programming
    Replies: 6
    Last Post: 6th March 2009, 21:16
  4. Designer produces invalid code?
    By Tiansen in forum Qt Programming
    Replies: 7
    Last Post: 4th March 2008, 11:43
  5. error:invalid use of member
    By quickNitin in forum General Programming
    Replies: 4
    Last Post: 19th June 2006, 15:21

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.