What is causing error: "Warning, too much iteration done before the next frame" in Kivy?

What is causing error: "Warning, too much iteration done before the next frame" in Kivy?

我试图设置一个由嵌套的 BoxLayouts 组成的屏幕布局。不幸的是,当我尝试设置两个底部按钮的大小时(使用 size_hint: 0.5,0.5)我得到这个错误:

[严重] [时钟] 警告,在下一帧之前完成了太多迭代。检查您的代码,或增加 Clock.max_iteration 属性。

然而,我得到了预期的结果:Two bottom buttons are in expected place,但过了一会儿应用程序崩溃了。

.kv 文件

<Window2>:
    name: 'Window2'
    
    MDBoxLayout:
        orientation: 'vertical'
        size: root.width, root.height

        MDBoxLayout:
            orientation: 'vertical'
            size_hint: 1, 0.5
            
            MDLabel:
                id: label_id
                text: 'Text'
                
            MDDropDownItem:
                id: drop_item
                text: 'Condition'
                pos_hint: {'center_x': 0.5}
                font_size: 32
                on_release: 
                    root.menu.open()

        MDBoxLayout:
            orientation: 'horizontal'
            size_hint: 1, 0.5
        
            MDRaisedButton:
                text: 'Back'
                size_hint: 0.5, 0.5 # this line is causing the problem
                on_release: 
                    app.root.current = 'Window1'
                    root.manager.transition.direction = 'left'
            
            MDRaisedButton:
                text: 'Continue'
                size_hint: 0.5, 0.5 # this line is causing the problem
                on_release: 
                    app.root.current = 'Window3'
                    root.manager.transition.direction = 'left'

好的,我通过将按钮从 KivyMD RaisedButtons 更改为标准 Kivy 按钮解决了我的问题。