Problem with updating widget

24 views
Skip to first unread message

Aleksey

unread,
May 27, 2021, 9:26:18 AM5/27/21
to Kivy users support

Hello! Sorry for my bad English. I Just started to learn this language)

I made some interface for Raspberry pi 3 B+ (raspberry os lite latest version) and have a problem.
Interface is runtime generated (based on data from external device). All widgets are stored in a list. Ten times per second I update all widgets in this list.
After some time (from 10 seconds to 2 hours) some widgets (usually one, sometimes second stop updating after some time to) stop updating. I apply a new value to it, but it does not change it's image. If I try to read the value - _ get proper (updated) value. I catched this moment and tried to debug it. I see that widget get new value and kivy-side start to use it, but this is my first python project and kivy code is to difficult to debug for me.
Can you advise what logs should I check to find cause of this issue? or maybe you know solution for this situation?

Thank you/

Elliot Garbus

unread,
May 27, 2021, 10:25:17 AM5/27/21
to kivy-...@googlegroups.com

Try to create a minimal executable example that represents your issue.

 Here are some thoughts:

Kivy creates a log in a .kivy/logs directory.  See if there is any useful information in the log.

 

I assume you are adding widgets to the widget tree by calling add_widget(), Are you removing the wigdgets from the widget tree prior to adding more widgets – or are you just adding widgets?  Failure to remove widgets and just adding widgets could result in an out of memory or stack overflow.

 

 

If possible, I would recommend you reduce the update frequency.  You are currently updating the UI, 10 times per second.  Drop this to once a second or even once every 3 or 5 seconds or more.

 

As a debugging suggestion, walk the widget tree and print out the widgets after each update (use walk()).  Make sure the widget tree is as you expect – and not growing.

--
You received this message because you are subscribed to the Google Groups "Kivy users support" group.
To unsubscribe from this group and stop receiving emails from it, send an email to kivy-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/kivy-users/a68cd23a-3429-4841-88f8-da791b96f5b5n%40googlegroups.com.

 

Reply all
Reply to author
Forward
0 new messages