bjustice Posted June 10 Report Posted June 10 I have a LabVIEW-built DLL. (2021 SP1, 64-bit, Linux) I am calling this DLL cyclically by a RUST application over FFI. Never on the first DLL call, but sometimes on subsequent DLL calls, I am hitting a segfault: LabVIEW caught fatal signal 21.0.1f6 - Received SIGSEGV Reason: address not mapped to object Attempt to reference address: 0x170 I can't seem to figure out why this is happening. It has something to do with the fact that I am needing to call the DLL several times, with little wait time in-between calls. I suspect that the DLL is unloading, and then reloading between each call. And I suspect that this unloading might be creating a weird race condition with the runtime engine, where the runtime engine is still busy unloading the DLL from the first call, when the 2nd call happens. Any ideas are welcome. Scratching my head on this one. Quote
Rolf Kalbermatter Posted June 16 Report Posted June 16 (edited) And are you sure your Rust FFI configuration is correct? What is the LabVIEW API you call? Datatypes, multiple functions? Basically your Rust FFI is the equivalent to the Call Library Node configuration in LabVIEW. If it is anything like ctypes in Python, it can do a little more than the LabVIEW Call Library Node, but that only makes it more complex and easier to mess things up. And most people struggle with the LabVIEW Call Library Node already mightily. Edited June 16 by Rolf Kalbermatter Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.