Description: There are several problems exists with the "WorkflowDebugStatus" class. This class presents the debugger in Workflow Designer. The object of this type is created with each instance of Workflow Designer (WorkflowViewController.cpp, line 274) and dies when a Workflow Designer window is closed (because a "WorkflowView" object is a parent of a "WorkflowDebugStatus" object - you may see that in WorkflowViewController.cpp, line 274). From the other hand, "WorkflowDebugStatus" (as a part of debugging system) should be able to pause and resume workflow task execution, so it definitely should be a part of tasks, which run in Workflow Designer (and it is, "WorkflowRunTask.cpp", line 67 - "WorkflowIterationRunTask" has "WorkflowDebugStatus" as an argument of constructor). So, the problem appears if the workflow execution is still running, but the Workflow Designer window is already closed - because, in this case, "WorkflowDebugStatus" is already destroyed (as a child of "WorkflowView"), but still a member of a "WorkflowIterationRunTask" object (which is still alive).
Possible resolution:
- Rewrite all WorkflowDebugStatus* as QPointer<WorkflowDebugStatus> and check if the member is null before use it.
- "WorkflowDebugStatus" is a child of "WorkflowView", so maybe we can unlink this relation and delete a "WorkflowDebugStatus" object somewhere else (for example, in "WorkflowIterationRunTask"). But, from the other hand, in this case a "WorkflowDebugStatus" will die even if "WorkflowView" is still alive.
- Rewrite all (or some of) WorkflowDebugStatus* as QSharedPointer <WorkflowDebugStatus> (or std::shared_ptr<WorkflowDebugStatus>). In this case a "WorkflowDebugStatus" object dies by itself when all pointer dies.