02-09-2017 11:09 AM
Thank you for taking time looking into this issue.
My testing environment has mac only, so I have to stay with OS X. I need to get the company approval on Budget to switch to Windows.
02-14-2017 02:25 PM
Sorry it has taken me awhile to get back. I did not have my Mac with me. What software are you using for your coding?
02-21-2017 10:34 AM
Are you asking about the IDE? If so, I am using the Xcode command line tools.
02-23-2017 04:39 AM
Dear all, I am expariencing the same problems. You can use this to reproduce the error. Hope this can help. My compute is a MacBook Pro 15" just bought with Sierra and Nidaqmx base 15.
I used the examples provided by NI in the ai subfolder with an USB 6216 which is correctly recognized by lsdaq
NI USB-6216: "Dev1" (USB0::0x3923::0x733B::0166EF64::RAW)
The example compiles without problems
gcc -O2 -arch x86_64 -F/Library/Frameworks -Wno-format -framework nidaqmxbase -framework nidaqmxbaselv acquireNScan.c -o nScan
but when I run it I get the error
Creating task
2017-02-23 11:32:25.765 oneScan[18003:2921915] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff9ba56e7b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffb0640cad objc_exception_throw + 48
2 AppKit 0x00007fff99c793fd -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4471
3 LabVIEW 15.0 Runtime 0x0000000113a14b91 WEventAvail + 833
4 LabVIEW 15.0 Runtime 0x00000001137aea7e Exec + 1246
5 LabVIEW 15.0 Runtime 0x00000001137a3f8a _Z16DoBackgroundExeci + 202
6 LabVIEW 15.0 Runtime 0x000000011393be6a _ZN12BGAppTask_MG11HandleTasksEi + 138
7 LabVIEW 15.0 Runtime 0x000000011392cfe3 _ZN15BGAppTask_MacUI21CheckAndHandleBGEventEv + 51
8 LabVIEW 15.0 Runtime 0x000000011392fc6d _Z33BGAppTasksRunLoopObserverCallbackP19__CFRunLoopObservermPv + 301
9 CoreFoundation 0x00007fff9b9ec397 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
10 CoreFoundation 0x00007fff9b9ec307 __CFRunLoopDoObservers + 391
11 CoreFoundation 0x00007fff9b9ccf5a __CFRunLoopRun + 906
12 CoreFoundation 0x00007fff9b9cc974 CFRunLoopRunSpecific + 420
13 LabVIEW 15.0 Runtime 0x000000011392b387 _ZN19MainLoop_MacCocoaUI3RunEv + 279
14 LabVIEW 15.0 Runtime 0x0000000112c96a46 _Z6MGMainiPKPKc + 294
15 LabVIEW 15.0 Runtime 0x0000000112c9750d _Z11SysUIThreadPv + 13
16 LabVIEW 15.0 Runtime 0x0000000113a8b03e _Z15ThreadCoverProcPv + 94
17 libsystem_pthread.dylib 0x00007fffb113baab _pthread_body + 180
18 libsystem_pthread.dylib 0x00007fffb113b9f7 _pthread_body + 0
19 libsystem_pthread.dylib 0x00007fffb113b1fd thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
10-28-2017 05:09 PM
Do you have any luck resolving this issue. After upgrading to sierra, the previous compiled examples are working, however if I compile new ones they crash with the same error:
2017-10-28 23:48:06.222 acquireNScans[1234:37253] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff8d63f57b __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fffa28a01da objc_exception_throw + 48
2 AppKit 0x00007fff8b82ae82 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4480
3 LabVIEW 15.0 Runtime 0x000000010ebc1b91 WEventAvail + 833
4 LabVIEW 15.0 Runtime 0x000000010e95ba7e Exec + 1246
5 LabVIEW 15.0 Runtime 0x000000010e950f8a _Z16DoBackgroundExeci + 202
6 LabVIEW 15.0 Runtime 0x000000010eae8e6a _ZN12BGAppTask_MG11HandleTasksEi + 138
7 LabVIEW 15.0 Runtime 0x000000010ead9fe3 _ZN15BGAppTask_MacUI21CheckAndHandleBGEventEv + 51
8 LabVIEW 15.0 Runtime 0x000000010eadcc6d _Z33BGAppTasksRunLoopObserverCallbackP19__CFRunLoopObservermPv + 301
9 CoreFoundation 0x00007fff8d5d5de7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
10 CoreFoundation 0x00007fff8d5d5d57 __CFRunLoopDoObservers + 391
11 CoreFoundation 0x00007fff8d5b6b2a __CFRunLoopRun + 906
12 CoreFoundation 0x00007fff8d5b6544 CFRunLoopRunSpecific + 420
13 LabVIEW 15.0 Runtime 0x000000010ead8387 _ZN19MainLoop_MacCocoaUI3RunEv + 279
14 LabVIEW 15.0 Runtime 0x000000010de43a46 _Z6MGMainiPKPKc + 294
15 LabVIEW 15.0 Runtime 0x000000010de4450d _Z11SysUIThreadPv + 13
16 LabVIEW 15.0 Runtime 0x000000010ec3803e _Z15ThreadCoverProcPv + 94
17 libsystem_pthread.dylib 0x00007fffa339a93b _pthread_body + 180
18 libsystem_pthread.dylib 0x00007fffa339a887 _pthread_body + 0
19 libsystem_pthread.dylib 0x00007fffa339a08d thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
10-28-2017 10:32 PM
No, no luck at all. so I stopped using NI's product. I suggest to use MCC DAQ, which uses open-source libusb and libhid, and works way better.
02-22-2018 12:20 AM
Hey I am facing the same error on my macos high sierra 10.13.3
Any solutions?
And what is the alternative API for macos?
mcd daq does not seem to have macos support
02-23-2018 09:57 AM
If you are using NI-DAQmx Base 15, Mac OS X 10.13.13 is not officially supported (see the description tab): http://www.ni.com/download/ni-daqmx-base-15.0/5648/en/.
What version of LabVIEW are you using? LabVIEW 2017 SP1 does support Mac OS 10.13.
Lastly, even though you are encountering a similar issue, you may gain more visibility by creating a new forum post.
02-18-2019 06:08 AM
I have the same problem with High Sierra. This simple program produces the same error message.
#include <stdio.h> #include <NIDAQmxBase.h> int main(void) { TaskHandle task; int ret_code; ret_code = DAQmxBaseCreateTask("", &task); printf("ret_code = %d\n", ret_code); return 0; }
Result:
% ./Essai 2019-02-18 13:08:34.858 Essai[3223:51476] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!' *** First throw call stack: ( 0 CoreFoundation 0x00007fff45c9e23b __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fff6cf2fc76 objc_exception_throw + 48 2 AppKit 0x00007fff43949297 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4167 3 LabVIEW 15.0 Runtime 0x00000001117c1b91 WEventAvail + 833 4 LabVIEW 15.0 Runtime 0x000000011155ba7e Exec + 1246 5 LabVIEW 15.0 Runtime 0x0000000111550f8a _Z16DoBackgroundExeci + 202 6 LabVIEW 15.0 Runtime 0x00000001116e8e6a _ZN12BGAppTask_MG11HandleTasksEi + 138 7 LabVIEW 15.0 Runtime 0x00000001116d9fe3 _ZN15BGAppTask_MacUI21CheckAndHandleBGEventEv + 51 8 LabVIEW 15.0 Runtime 0x00000001116dcc6d _Z33BGAppTasksRunLoopObserverCallbackP19__CFRunLoopObservermPv + 301 9 CoreFoundation 0x00007fff45c362f7 __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23 10 CoreFoundation 0x00007fff45c3621f __CFRunLoopDoObservers + 527 11 CoreFoundation 0x00007fff45c187b3 __CFRunLoopRun + 1267 12 CoreFoundation 0x00007fff45c18033 CFRunLoopRunSpecific + 483 13 LabVIEW 15.0 Runtime 0x00000001116d8387 _ZN19MainLoop_MacCocoaUI3RunEv + 279 14 LabVIEW 15.0 Runtime 0x0000000110a43a46 _Z6MGMainiPKPKc + 294 15 LabVIEW 15.0 Runtime 0x0000000110a4450d _Z11SysUIThreadPv + 13 16 LabVIEW 15.0 Runtime 0x000000011183803e _Z15ThreadCoverProcPv + 94 17 libsystem_pthread.dylib 0x00007fff6de61661 _pthread_body + 340 18 libsystem_pthread.dylib 0x00007fff6de6150d _pthread_body + 0 19 libsystem_pthread.dylib 0x00007fff6de60bf9 thread_start + 13 ) libc++abi.dylib: terminating with uncaught exception of type NSException Abort trap: 6
02-18-2019 07:16 AM
I have found some additional information. If the same code is compiled with -arch i386, then I get a warning but it does not crash and appears to work.
Here is the warning:
2019-02-18 14:15:18.868 Essai32[4872:81953] pid(4872)/euid(501) is calling TIS/TSM in non-main thread environment, ERROR : This is NOT allowed. Please call TIS/TSM in main thread!!!
Any idea why the discrepency between 32-bits and 64-bits libraries ?