You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During our migration from Iron to Jazzy I ran into the issue of having random segfaults during startup in one of our hardware interfaces.
The cause of the issue seems to be that the read/write methods are called before the on_activate method has finished (It is actually random what is executed first). The segfault in our case was a pointer being accessed in the the read method that is initialized in the on_activate method
To Reproduce
Write a hardware interface, and simply check if read/write or on_activate is called first.
Expected behavior
on_activate should be called and should have finished before the read/write methods of a hardware interface are called.
Environment (please complete the following information):
AFAIK, the idea was that joint values are sent only in activated mode but all non-joint interfaces are read/written from configured on. But I think this distinction is not implemented yet and always sent.
Describe the bug
During our migration from Iron to Jazzy I ran into the issue of having random segfaults during startup in one of our hardware interfaces.
The cause of the issue seems to be that the read/write methods are called before the on_activate method has finished (It is actually random what is executed first). The segfault in our case was a pointer being accessed in the the read method that is initialized in the on_activate method
To Reproduce
Write a hardware interface, and simply check if read/write or on_activate is called first.
Expected behavior
on_activate
should be called and should have finished before the read/write methods of a hardware interface are called.Environment (please complete the following information):
Preliminary solution
I added a
std::atomic_bool active_
flag to my hardware interface which I set afteron_activate
has finished.In the read/write methods I then check it and return early if nessary
The text was updated successfully, but these errors were encountered: