Error 1 When Using Notifiers in LabVIEW

Updated Oct 4, 2023

Reported In

Software

  • LabVIEW

Issue Details

  • My LabVIEW application that uses notifiers is getting me the following error:
Error 1 occurred at Send Notification in Wait on Multiple Notifiers.vi 

Possible reason(s):
LabVIEW: (Hex 0x1) An input parameter is invalid. For example, if the input is a path, the path might contain a character not allowed by the OS such as ? or @.
image.png

Solution

Error 1 occurs when you attempt to access a notifier that has been released already.
In some specific scenarios, such as the following code, developers use this error to stop consumer loops (Notifier Loop 1 and Notifier Loop 2). In these scenarios the error is expected and is part of the process, it is used since there is no other variable associated with the stop condition of the producer loop (Notification Loop) that could make the consumer loops stop. Notice with this approach, errors from these loops are not contemplated in the simple error handle at the end.
image.png

If you are using the error message as a part of the process either follow any of the following alternatives:
  • Omit these error messages from the consumer loops by not wiring the errors to the process that continues after these loops.
  • Handle the error locally using the Clear Errors VI and delete Error 1.
If you would prefer to avoid using errors to stop consumer loops, you would need to pass the stop message between loops. In this case, a secondary notifier could be the best fit for passing the Notification. See the example below:
image.png

Note: Both code snippets were extracted from LabVIEW shipping examples. To access these examples go to LabVIEW Help>>Find Examples. Notifier's examples are under the Synchronization Directory.