-
Notifications
You must be signed in to change notification settings - Fork 186
Closed
Description
System:
OS: Ubuntu 20.04, 64-bit
Kernel: 5.13.0-28-generic
nidaqmx: 0.6.1
Chassis: cDAQ9189
Module: NI 9477
Details:
I am currently using nidaqmx for some automated functional testing on one of my systems, and I encountered the strangest problem. After calling the start()
method on the task that I have set up, any subsequent calls to subprocess result in a segfault. Even if the task is not started but a line is written to in the DO task, the subprocess calls will fail. I am not sure if this is an issue with nidaqmx or subprocess, but it's relatively simple to replicate. Obviously, the line name has to be accurate to your setup.
Code:
#!/usr/bin/env python3
"""Simple NI DAQ Test Script."""
import subprocess
import nidaqmx
def main():
task = nidaqmx.Task('test')
task.do_channels.add_do_chan('cDAQ9189-2005203Mod1/port0/line10')
subprocess.check_output(['ls'])
task.start()
subprocess.check_output(['ls'])
if __name__ == '__main__':
main()
Output:
Traceback (most recent call last):
File "./github.py", line 19, in <module>
main()
File "./github.py", line 15, in main
subprocess.check_output(['ls'])
File "/usr/lib/python3.8/subprocess.py", line 415, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 516, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ls']' died with <Signals.SIGSEGV: 11>.
Metadata
Metadata
Assignees
Labels
No labels