You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reported in version: 2.0.10 Reported for operating system, platform: Android (All), ARM
Comments on the original bug report:
On 2019-06-21 12:58:21 +0000, wrote:
Sdl2 version: hg tip 89b3e1e9839c
I am testing kivy app built with python-for-android.
If multisamples is enabled, the app dies with an error:
SDL_GL_CreateContext(self.win): Unable to make EGL context current (call to eglMakeCurrent failed, reporting an error of EGL_BAD_SURFACE)
But i believe that minimal code to reproduce is this:
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLEBUFFERS, 1)
SDL_GL_SetAttribute(SDL_GL_MULTISAMPLESAMPLES, 2)
self.win = SDL_CreateWindow(NULL, x, y, width, height, self.win_flags)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 2)
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0)
self.ctx = SDL_GL_CreateContext(self.win)
The bug is gone when multisamples are disabled in kivy (the first two lines in the code above)
On 2019-06-21 16:58:25 +0000, wrote:
Ah, issue with EGL_BAD_SURFACE is more complicated. For more complex app, even without multisampling the chance of successful start is about 30%
Sylvain, can you look at this ASAP for SDL 2.0.10 release?
Thanks!
On 2019-06-21 20:59:19 +0000, Sam Lantinga wrote:
Whoops, didn't mean to mark this fixed.
On 2019-06-22 06:29:43 +0000, Sylvain wrote:
I tried those flags, and I could always start my app and/or create a GL context.
I tried several times to makes sure about the 30% ratio.
This is not clear, if the issue is with the attributes MULTISAMPLE, it should always happen, right?
But if the issue is with the MakeCurrent failing, so it shouldn't be related to your attributes, and fail with any context ?! And you should check when current is made.
Maybe, you should try with simple C app to reduce the scope of the issue.
On 2019-06-22 12:17:17 +0000, wrote:
Maybe Multisample just makes the bug to appear a bit more reliably, but it is not crucial for the app to crash.
Is there any tutorial of how to build an app for android?
I bisected and tested my app against repo history.
The last known changeset that works fine is this:
Android: make sure surfaceChanged try to enter into 'resumed' state.
Wed, 02 Jan 2019 17:41:33 +0100 (5 months ago)
changeset 12492 fe136f38ab71
Then changesets 12493-12511 crash app because of a different issue, related to concurrency (i think), and throw segfaults.
And then the first changeset that fixes concurrency but experince this topic issue with EGL_BAD_SURFACE is this:
Android: concurrency issue for Android_SetWindowFullscreen()
Wed, 09 Jan 2019 15:18:41 +0100 (5 months ago)
changeset 12512 afc8e5d1d992
So the bug was introduced between 02 Jan and 09 Jan, somewhere in changesets 12493-12512
On 2019-06-22 12:28:50 +0000, Sylvain wrote:
So this commit introduce the issue ? https://hg.libsdl.org/SDL/rev/afc8e5d1d992
It only adds some synchronization to make the function call be atomic.
So this is strange :/
Can you try to use RGB 565 instead of 888 in you KIVY code ?!
I have a device where your .apk fails with: [CRITICAL] [App ] Unable to get a Window, abort. (Samsung S5 Android 6.0.1)
Look about 20 lines above the error - does it say this:
I/python ( 9712): [CRITICAL] [Window ] Unable to find any valuable Window provider. Please enable debug logging (e.g. add -d if running from the command line, or change the log level in the config) and re-run your app to identify potential causes
I/python ( 9712): sdl2 - RuntimeError: b'Unable to make EGL context current (call to eglMakeCurrent failed, reporting an error of EGL_BAD_SURFACE)'
I/python ( 9712): File "/home/u1/.local/share/python-for-android/build/python-installs/paradox/kivy/core/init.py", line 70, in core_select_lib
I/python ( 9712): File "/home/u1/.local/share/python-for-android/build/python-installs/paradox/kivy/core/window/window_sdl2.py", line 152, in init
I/python ( 9712): File "/home/u1/.local/share/python-for-android/build/python-installs/paradox/kivy/core/window/init.py", line 969, in init
I/python ( 9712): File "/home/u1/.local/share/python-for-android/build/python-installs/paradox/kivy/core/window/window_sdl2.py", line 289, in create_window
I/python ( 9712): File "kivy/core/window/_window_sdl2.pyx", line 233, in kivy.core.window._window_sdl2._WindowSDL2Storage.setup_window
I/python ( 9712): File "kivy/core/window/_window_sdl2.pyx", line 75, in kivy.core.window._window_sdl2._WindowSDL2Storage.die
?
On 2019-06-23 20:18:52 +0000, Sylvain wrote:
Yes, same log
On 2019-06-26 04:42:40 +0000, wrote:
Putting Android activity lock around all the sdl calls makes this bug go away
This bug report was migrated from our old Bugzilla tracker.
These attachments are available in the static archive:
Reported in version: 2.0.10
Reported for operating system, platform: Android (All), ARM
Comments on the original bug report:
On 2019-06-21 12:58:21 +0000, wrote:
On 2019-06-21 16:58:25 +0000, wrote:
On 2019-06-21 18:25:44 +0000, wrote:
On 2019-06-21 20:58:49 +0000, Sam Lantinga wrote:
On 2019-06-21 20:59:19 +0000, Sam Lantinga wrote:
On 2019-06-22 06:29:43 +0000, Sylvain wrote:
On 2019-06-22 12:17:17 +0000, wrote:
On 2019-06-22 12:28:50 +0000, Sylvain wrote:
On 2019-06-22 12:41:59 +0000, wrote:
On 2019-06-22 12:47:15 +0000, Sylvain wrote:
On 2019-06-22 12:51:35 +0000, Sylvain wrote:
On 2019-06-22 12:54:52 +0000, Sylvain wrote:
On 2019-06-22 12:55:17 +0000, Sylvain wrote:
On 2019-06-22 13:46:45 +0000, wrote:
On 2019-06-22 15:07:36 +0000, Sylvain wrote:
On 2019-06-22 15:55:16 +0000, wrote:
On 2019-06-22 19:35:08 +0000, Sylvain wrote:
On 2019-06-22 20:10:24 +0000, wrote:
On 2019-06-23 06:58:42 +0000, Sylvain wrote:
On 2019-06-23 07:09:52 +0000, wrote:
On 2019-06-23 13:23:56 +0000, Sylvain wrote:
On 2019-06-23 14:15:11 +0000, Sylvain wrote:
On 2019-06-23 15:09:26 +0000, wrote:
On 2019-06-23 20:18:52 +0000, Sylvain wrote:
On 2019-06-26 04:42:40 +0000, wrote:
On 2019-06-28 14:42:36 +0000, Sylvain wrote:
On 2019-07-01 05:02:35 +0000, wrote:
The text was updated successfully, but these errors were encountered: