JKISoftware / JKI-State-Machine-Objects

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

enumerateStaticDependencies stopped working for me with release 1.1.15 #36

Closed thomasliebenau closed 7 years ago

thomasliebenau commented 7 years ago

Hello,

i have created a SMO for an ethernet IO-node. This SMO was used as shared resource in multiple SMOs representing pneumatic subsystems in my environment. I used enumerateStaticDependencies to define dependancies and this worked very well. I could start the different pneumatic SMOs in parallel using their test launcher. Finally i started composing my machine controller using the pneumatic SMOs. This also worked well.

Since release 1.1.15 i only can start 1 pneumatic SMO successfully. Even the machine controller composition can't launch the dependencies successfully.

The release 1.1.15 changed the output of smo.lvclass:ListDependencies.vi. The output now is filtered by a component shared key. The shared key is calculated from a SecretKey and GUID and changes every time an input changes. So I never get my component shared to other SMOs.

How do i have to implement my shared dependencies now?

francois-normandin commented 7 years ago

Hi Thomas,

List Dependencies was a private method before 1.1.15 and has only been made protected to allow more specific SMOs to list the dependencies created and started by their ancestor. It should not have changed the behavior. That being said, I see that it does filter shared dependencies that would have been started by another component in the system even if it was aggregated as defined in enumerateStaticDependencies. I believe we can correct that with an addition in the ListDependencies method as follows:

I use this mechanism a lot and have not seen this issue with 1.1.15 but I think I am using the "ListSharedResource" method instead of "ListDependencies" to find those references... thanks for reporting this issue.

francois-normandin commented 7 years ago

I confirm this bug. The proposed fix is also confirmed. This will be fixed in the next release.

thomasliebenau commented 7 years ago

Hello Francois,

i can confirm that your suggested solution fixes my issue with shared resources.

thanks for fixing that (and for this powerful framework)

francois-normandin commented 7 years ago

Fixed in 1.1.17.