Crash when an operator returns PASS_THROUGH instead of RUNNING_MODAL #37771

Closed
opened 2013-12-10 18:47:21 +01:00 by Tom Edwards · 4 comments

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

Invoke operator and click OK

**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** - Open [operator_crash.blend](https://archive.blender.org/developer/F38263/operator_crash.blend) - Run Script # Invoke operator and click OK
Author

Changed status to: 'Open'

Changed status to: 'Open'
Campbell Barton was assigned by Tom Edwards 2013-12-10 18:47:21 +01:00
Author

Added subscriber: @artfunkel

Added subscriber: @artfunkel

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

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)

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)`
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#37771
No description provided.