Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sdl2 - RuntimeError: Failed creating OpenGL pixel format, real bug or something else? #3372

Closed
Gillu13 opened this issue May 17, 2015 · 11 comments

Comments

@Gillu13
Copy link

Gillu13 commented May 17, 2015

I am not sure if this is an issue that should be reported here but I am wondering if the error I encountered while trying to run the "Hello world" program on Mac OS X Yosemite is related to the recent shift to SDL2 or just to my poor installation (I don't know something like OpenGL extension?).

Here is the error message I get:

[INFO   ] [Logger      ] Record log in /Applications/Kivy.app/Contents/Resources/.kivy/logs/kivy_15-05-17_10.txt
[INFO   ] [Kivy        ] v1.9.0
[INFO   ] [Python      ] v2.7.6 (default, Sep  9 2014, 15:04:36) 
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)]
[INFO   ] [Factory     ] 173 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_imageio, img_dds, img_gif, img_sdl2 (img_pil, img_ffpyplayer ignored)
[INFO   ] [Text        ] Provider: sdl2
[INFO   ] [OSC         ] using <multiprocessing> for socket
[INFO   ] [Window      ] Provider: sdl2
[CRITICAL] [Window      ] Unable to find any valuable Window provider at all!
sdl2 - RuntimeError: Failed creating OpenGL pixel format
  File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/core/__init__.py", line 65, in core_select_lib
    cls = cls()
  File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/core/window/window_sdl2.py", line 137, in __init__
    super(WindowSDL, self).__init__()
  File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/core/window/__init__.py", line 616, in __init__
    self.create_window()
  File "/Applications/Kivy.app/Contents/Resources/kivy/kivy/core/window/window_sdl2.py", line 187, in create_window
    self.fullscreen, resizable, state)
  File "kivy/core/window/_window_sdl2.pyx", line 87, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window (kivy/core/window/_window_sdl2.c:1611)
    self.die()
  File "kivy/core/window/_window_sdl2.pyx", line 21, in kivy.core.window._window_sdl2._WindowSDL2Storage.die (kivy/core/window/_window_sdl2.c:954)
    raise RuntimeError(<bytes> SDL_GetError())

[CRITICAL] [App         ] Unable to get a Window, abort.
 Exception SystemExit: 1 in 'kivy.properties.dpi2px' ignored
[CRITICAL] [App         ] Unable to get a Window, abort.

Just so you know it seems that I am not the only one to have encountered the issue, even though we are not that many and it was before the 1,9 release. That's why I am not sure if it is a bug or missing library on my computer or something like an incompatibility.

Cheers

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@Alamot
Copy link

Alamot commented Aug 25, 2015

I had the same problem in a Hackintosh, but -there- it was a driver problem. You can test if OpenGL functions correctly in your system using some tools like:

  1. http://www.geeks3d.com/20121113/gputest-0-2-0-cross-platform-opengl-benchmark-furmark-lands-on-linux-and-os-x/
  2. http://www.realtech-vr.com/glview/

You have to test using HARDWARE renderer and not a software renderer! When I had only software renderer available kivy throwed this message you wrote.

@tito
Copy link
Member

tito commented Sep 20, 2015

Agreed to what @Alamot. There is nothing much we can do if you don't have hardware acceleration, or at least one of the pixel format required for Kivy. This kind of error indicate your hardware is too old and can't be used.

If you were in software rather than hardware, that might be your solution :)

@tito tito closed this as completed Sep 20, 2015
@Areopagitics
Copy link

Areopagitics commented Feb 2, 2018

I am getting the same error when running Mac OS on VirtualBox; I am guessing it has to do with missing OpenGL drivers as well. I tested the glview software recommended by Alamot and it works fine. I also tried running the Mac OS Vbox with 3D acceleration enabled, but no luck. Any help would be appreciated.

`[INFO ] [OSC ] using for socket
[INFO ] [Window ] Provider: sdl2
[CRITICAL] [Window ] Unable to find any valuable Window provider.
sdl2 - RuntimeError: Failed creating OpenGL pixel format
File "/Users/areopagitics/Desktop/kivy/env/lib/python2.7/site-packages/kivy/core/init.py", line 67, in core_select_lib
cls = cls()
File "/Users/areopagitics/Desktop/kivy/env/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 140, in init
super(WindowSDL, self).init()
File "/Users/areopagitics/Desktop/kivy/env/lib/python2.7/site-packages/kivy/core/window/init.py", line 960, in init
self.create_window()
File "/Users/areopagitics/Desktop/kivy/env/lib/python2.7/site-packages/kivy/core/window/window_sdl2.py", line 272, in create_window
self.fullscreen, resizable, state)
File "kivy/core/window/_window_sdl2.pyx", line 217, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
File "kivy/core/window/_window_sdl2.pyx", line 66, in kivy.core.window._window_sdl2._WindowSDL2Storage.die

[INFO ] [Text ] Provider: sdl2
[CRITICAL] [App ] Unable to get a Window, abort.`

@kjetiljd
Copy link

I ran into this on Mac when using a Dell D6000 USB docking station that uses DisplayLink, disconnecting the docking station, starting gource and then connecting it again is a work-around.

@ikus060
Copy link
Contributor

ikus060 commented Mar 18, 2024

Hello @Areopagitics @Alamot @Gillu13

Did any of you manage to find a workaround to make this work in a Hackintosh ? I have MacOS running in a VM for testing and I ran into this problem. Your help would be appreciated.

@Areopagitics
Copy link

Hello @Areopagitics @Alamot @Gillu13

Did any of you manage to find a workaround to make this work in a Hackintosh ? I have MacOS running in a VM for testing and I ran into this problem. Your help would be appreciated.

sorry, I haven't used kivy in a long time

@ikus060
Copy link
Contributor

ikus060 commented Mar 19, 2024

I would like to reanimate this issue.

It seams possible using glfw to support software rendering on MacOS.
See here. glfw/glfw#2080
And here https://github.com/WerWolv/ImHex/pull/708/files

Is that something that could be consider adding in Kivy ?

@misl6
Copy link
Member

misl6 commented Mar 19, 2024

Hi @ikus060,

Feel free to reach out and discuss about it on Discord.

Did you had the chance to test the master version which uses ANGLE (via Metal backing renderer) by default on macOS and iOS ?

You can find nightly builds at: https://kivy.org/downloads/ci/osx/kivy/

(Are nightly builds of the branch used for the 3.0.0 development, so is super-subject to changes, and we will break things)

@ikus060
Copy link
Contributor

ikus060 commented Mar 19, 2024

@misl6

Did you had the chance to test the master version which uses ANGLE (via Metal backing renderer) by default on macOS and iOS ?

I tough Angle was only available on Windows. If available on MacOS, I'm not sure how to enabled it.

@misl6
Copy link
Member

misl6 commented Mar 19, 2024

ANGLE is now the default EGL/GL provider for macOS and iOS (support has been added ~1 week ago), so you do not have to activate it on master branch.

Here you can find how to disable it instead: https://kivy.org/doc/master/gettingstarted/installation.html#from-source

@Gillu13
Copy link
Author

Gillu13 commented Mar 19, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants