JKISoftware / JKI-State-Machine-Objects

Object-oriented framework for LabVIEW based on the JKI State Machine
BSD 3-Clause "New" or "Revised" License
95 stars 54 forks source link

Dynamically launched SMOs from inside the Callee's Process causes intermittent errors during StopProcess call #83

Closed francois-normandin closed 2 years ago

francois-normandin commented 2 years ago

Describe the bug Dynamically launched SMOs from inside the Callee's Process causes intermittent errors during StopProcess call

To Reproduce

  1. Launch Dynamic Processes within an SMO's process VI, after the Process:Sync has been executed (SMO started)
  2. Stop SMO

Expected behavior All dynamically launched SMOs should terminate before the Process that called them completes the Stop process and syncs with other components of the hierarchy.

Screenshots The execution order allows the Process VI to leave memory before any dynamically launched SMOs from within that process have terminated. This does not seem to affect the dynamically launched SMOs from outside the process VI. image

Proposed Fix Move the Stop Dependencies before the process sync.

image

francois-normandin commented 2 years ago

Thanks @gcodetechnology and @ciozi137 for the reports and @gcodetechnology for the example code that reproduced the issue!

francois-normandin commented 2 years ago

Unit Test created which demonstrates failure. image

francois-normandin commented 2 years ago

build 1.4.0.68 fixes this issue