Page MenuHome

Crash when an operator returns PASS_THROUGH instead of RUNNING_MODAL
Closed, ArchivedPublic

Description

System Information
Win 7 x64

Blender Version
Broken: Blender 2.63
Worked: unknown

If a script which displays its properties in a pop-up returns PASS_THROUGH when it should return RUNNING_MODAL, Blender will crash when trying to execute it.

Exact steps for others to reproduce the error

  1. Open
  2. Run Script
  3. Invoke operator and click OK

Event Timeline

Tom Edwards (artfunkel) raised the priority of this task from to 90.
Tom Edwards (artfunkel) updated the task description. (Show Details)
Tom Edwards (artfunkel) edited a custom field.
Brecht Van Lommel (brecht) lowered the priority of this task from 90 to 50.Dec 10 2013, 8:13 PM
Campbell Barton (campbellbarton) changed the task status from Unknown Status to Unknown Status.Dec 18 2013, 6:27 PM

This is a known limitation, whats happening is the popup opens (holding a reference to the operator), then frees the operator when PASS_THROUGH is returned.

This could be made to work by having blender check if any operators are used in popups before freeing, but I think this is not so good (or the popup could check the operator isnt freed, or we could introduce ref-counting to operators and have operator users).

In this case you should really should use return context.window_manager.invoke_props_dialog(self)