question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Kivy app not responding well or too slow to respond

See original GitHub issue

Versions

  • Python: v3.7.4
  • OS: Windows 10
  • Kivy: v1.11.1
  • Kivy installation method: pip install

Description

I’m trying to run a simple kivy app (from ping pong tutorial), but after it open a window it seems to not respond to any event or more like it’s too slow to respond. It takes more than 10s for it to even get the minimize button get hovered. Sometimes, it can’t even move the window at all.

GVkYGas9np

At first I thought it’s because I open many applications that it become slow, but it seems that’s not the case, it’s normal for other application.

Code and Logs

from kivy.app import App
from kivy.uix.widget import Widget


class PongGame(Widget):
    pass


class PongApp(App):
    def build(self):
        return PongGame()


if __name__ == '__main__':
    PongApp().run()
[WARNING] [Config      ] Older configuration version detected (0 instead of 21)
[WARNING] [Config      ] Upgrading configuration in progress.
[INFO   ] [Logger      ] Record log in C:\Users\Amatarazatas\.kivy\logs\kivy_19-12-04_0.txt
[INFO   ] [deps        ] Successfully imported "kivy_deps.glew" 0.1.12
[INFO   ] [deps        ] Successfully imported "kivy_deps.sdl2" 0.1.22
[INFO   ] [Kivy        ] v1.11.1
[INFO   ] [Kivy        ] Installed at "C:\Users\Amatarazatas\AppData\Local\pypoetry\Cache\virtualenvs\kivy-test-project-py3.7\lib\site-packages\kivy\__init__.py"
[INFO   ] [Python      ] v3.7.4 (tags/v3.7.4:e09359112e, Jul  8 2019, 20:34:20) [MSC v.1916 64 bit (AMD64)]
[INFO   ] [Python      ] Interpreter at "C:\Users\Amatarazatas\AppData\Local\pypoetry\Cache\virtualenvs\kivy-test-project-py3.7\Scripts\python.exe" [INFO   ] [Factory     ] 184 symbols loaded
[INFO   ] [Image       ] Providers: img_tex, img_dds, img_sdl2, img_gif (img_pil, img_ffpyplayer ignored)
[INFO   ] [Window      ] Provider: sdl2
[INFO   ] [GL          ] Using the "OpenGL" graphics system
[INFO   ] [GL          ] GLEW initialization succeeded
[INFO   ] [GL          ] Backend used <glew>
[INFO   ] [GL          ] OpenGL version <b'4.0.0 - Build 10.18.10.4358'>
[INFO   ] [GL          ] OpenGL vendor <b'Intel'>
[INFO   ] [GL          ] OpenGL renderer <b'Intel(R) HD Graphics'>
[INFO   ] [GL          ] OpenGL parsed version: 4, 0
[INFO   ] [GL          ] Shading version <b'4.00 - Build 10.18.10.4358'>
[INFO   ] [GL          ] Texture max size <16384>
[INFO   ] [GL          ] Texture max units <16>
[INFO   ] [Window      ] auto add sdl2 input provider
[INFO   ] [Window      ] virtual keyboard not allowed, single mode, not docked
[INFO   ] [Base        ] Start application main loop

Issue Analytics

  • State:open
  • Created 4 years ago
  • Reactions:1
  • Comments:16 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
arqecocommented, May 11, 2020

Hi @AnonymousX86

I’m using Kivy 1.11.1 and Python 3.7.7. Could anybody help me?

Read my post above and try to create a new virtualenv with current kivy_deps.sdl2 and kivy_deps.glew:

python -m venv venv
.\venv\Scripts\activate
python -m pip install --upgrade pip virtualenv
python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2 kivy_deps.glew
python -m pip install kivy

As an alternative try Kivy2.0.0rc, but I believe with just the updated kivy_deps it will work fine.

1reaction
arqecocommented, Apr 25, 2020

Another test made here with good results.

I followed the instructions to install the stable version but avoided using the pinned versions of the libraries and It worked very well.

python -m venv venv
.\venv\Scripts\activate
python -m pip install --upgrade pip virtualenv
python -m pip install docutils pygments pypiwin32 kivy_deps.sdl2 kivy_deps.glew
python -m pip install kivy

The problem must be in kivy_deps.sdl2==0.1.* or kivy_deps.glew==0.1.*. The current versions of both is 0.2.0. My laptop have two graphics cards and maybe it’s related too.

This doc should be corrected https://kivy.org/doc/stable/installation/installation-windows.html#installing-the-kivy-stable-release I looked for the source of the page but could not find it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Kivy isn't fast enough" - Google Groups
filechooser is fast enough in desktop but very slow in android,even in S6 and swipes are unresponsive as well. Do we have any...
Read more >
Is Kivy widgets creation really so slow or am I doing it wrong?
Here is his answer: Widget creation is relatively slow, especially depending on what the widget contains.
Read more >
FAQ — Kivy 1.10.1 documentation
Most of time, this issue is due to the usage of old graphics drivers. Install the latest graphics driver available for your graphics...
Read more >
7 Major Reasons Why Your Android App is Performing Slow
But there may be problems with the libraries and Software Development Kit provided by the trader which are out of the control of...
Read more >
Deploying Your Kivy/Python App to Android with Buildozer
Follow along with me as I deploy a simple Hello World Python / Kivy application to an Android phone. I used a Windows...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found