-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Kivy crashes after setting system clock back in time #3952
Comments
Thanks for the report. There was a pr which fixes this in some cases: #2906. It didn't always work, and produced this exception (#3797): I/python (14014): File "...main.py", line 18, in
I/python (14014): File ".../kivy/app.py", line 319, in
I/python (14014): File ".../kivy/base.py", line 29, in
I/python (14014): File ".../kivy/clock.py", line 278, in
I/python (14014): File ".../kivy/clock.py", line 258, in libc_clock_gettime_wrapper
I/python (14014): File ".../python2.7/ctypes/__init_.py", line 369, in getattr
I/python (14014): File ".../ctypes/init.py", line 374, in getitem
I/python (14014): AttributeError: undefined symbol: clock_gettime Currently we fall back to the old implementation when there is an exception: @matham pointed out this solution, it would be cross-platform, but it only applies to python 3: |
Thanks for the quick answer. I updated my Kivy environment to version 1.9.1-dev0 / Python 2.7.10 and I found out Kivy still hangs. After debugging I saw it went directly to the fallback implementation. After some googling found out that OS X El Capitan moved the libc library, they can now be accessed using the following path:
I will check later today if everything works on ubuntu 14.04. |
Here is a cross-platform solution: https://pypi.python.org/pypi/monotonic. |
I'd ask @matham which path seems best. |
I note that |
Some additional info for the future: In Python 3.11,
Basically, now Python almost follows our approach, but by using a monotonic clock. Idea 💡: Better to use |
I'm currently developing an app on OSX (Version 10.11.3) which displays a analog clock, so i'm testing how the clock updates when the system time is adjusted for summer/winter time. I found out when adjusting the system time by adding an hour fire's all events, which is inconvenient but not a problem for me. However setting the system time back with one hour crashes Kivy. I also tested this in an unrelated Kivy app which also crashed, so I think this problem is universal for Kivy on OSX.
I did not had the time yet to determine if this problem exists an all platforms or just OSX. It would be nice to know if this is the case. Attached to this issue you'll find the stack trace I get when aborting the debug session.
The text was updated successfully, but these errors were encountered: