Skip to content

MLC106: stop_condition combined with frozen_frame=True

qual reports MLC106 when a confirmed Scene.wait call passes both a non-None stop_condition and a literal frozen_frame=True.

A stop condition needs a dynamic wait that re-renders and re-evaluates the condition every frame; frozen_frame=True explicitly freezes the wait to a single repeated frame. The two options contradict each other and Wait raises ValueError.

  • Default severity: error
  • Minimum confidence: certain
  • Implementation phase: 1
  • Fix: changing to frozen_frame=False is offered as an UNSAFE suggestion

An explicit stop_condition=None restates the default and does not fire.

Wrong

class Demo(Scene):
    def construct(self):
        self.wait(stop_condition=lambda: cond(), frozen_frame=True)
class Demo(Scene):
    def construct(self):
        self.wait(stop_condition=lambda: cond())