Results 1 to 6 of 6

Thread: XLib Resource/Window creation problem

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    So, I've done some looking and it seems that the BadAccess is supposedly caused by trying to make an opengl current while it is being used by another thread. However - the same binary works fine on most desktop environments (cinnamon, gnome 2.x and 3.x, IceWM (with metacity running)) but not on unity and lxde (sometimes - this one is hit and miss).

    Thus, I tested it in a single threaded program - with exactly the same results under the troublesome desktop environments. GDB is of no use at all as it thinks the program terminated successfully and thus refuses to give me a trace of any kind.

    Is anyone aware of anything that could cause this behaviour to happen or of some technical reason why some desktop environments are causing this/ The only workaround for the time being is to switch to the SDL backend which is slow, buggy and lacking (no FBOs and such).
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  2. #2
    Quote Originally Posted by code_glitch View Post
    So, I've done some looking and it seems that the BadAccess is supposedly caused by trying to make an opengl current while it is being used by another thread. However - the same binary works fine on most desktop environments (cinnamon, gnome 2.x and 3.x, IceWM (with metacity running)) but not on unity and lxde (sometimes - this one is hit and miss).

    Thus, I tested it in a single threaded program - with exactly the same results under the troublesome desktop environments. GDB is of no use at all as it thinks the program terminated successfully and thus refuses to give me a trace of any kind.
    Another thread doesen't just mean another thread of your application. It could mean another thread of any application even the OS for that mater. And based on my short survey Unity shell is GPU acelerated. So there is a remote posibility that your application can't sucsessfully get OpenGL hande becouse the OS already has one.

    Just my thoughts. They might be compleetly off since I have no expirience with Linux development.

  3. #3
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    Ah, thats some useful insight... That said - gnome 3 and cinnamon are also gpu accelerated so I guess it would be a unity issue.

    Though the problem has gotten to the point of being enough of a nuisance to prompt me to rewrite the entire X11 code seeing as I can't get any work done until this is fixed. Once thats done, I'll see if I can get it to replicate the behaviour on the new X11 implementation to see what causes this because my code seems to be very similar to numerous xlib/opengl tutorials on the internets...
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

  4. #4
    I might know what your problem is. I reread your first post a few times and if I understand you correctly you don't encounter problems when you have Metacity running. Now based on Wikipadia Metacity is default Window manager used in Gnome 2 Desktop enviroment but it was replaced with Mutter in Gnome 3.
    http://en.wikipedia.org/wiki/Metacity
    http://en.wikipedia.org/wiki/Mutter_(window_manager)
    Cinnamon uses Muffin which is a fork of Gnome 3 Mutter Windows manager.
    http://en.wikipedia.org/wiki/Cinnamon_(software)

    So all of your problems might be the result of changed default Window manager which probably requires a different code to work.

  5. #5
    PGD Staff code_glitch's Avatar
    Join Date
    Oct 2009
    Location
    UK (England, the bigger bit)
    Posts
    933
    Blog Entries
    45
    That does make sense - which means I might be doing something that only metacity allows and other WMs do not... Thus, once I finish the rewrite of the code and get it working, I'll do a quick compare to see whats throwing things for a loop.
    I once tried to change the world. But they wouldn't give me the source code. Damned evil cunning.

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
  •