Delacor Toolkits Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Invalid Refnum in Request and Wait for Reply

Solved!
Go to solution
Highlighted

Invalid Refnum in Request and Wait for Reply

If I call a Request and Wait for Reply Event, I always see this error in the Event Inspector Window of the destination module:

5920	10	79330989	A6E00008	User Event	Get Something Argument	{Wait Notifier => Invalid Refnum - 0x9A000001}

It seems to have no effect on the functionality of the Event (the payload arrives correctly at the tester), but I was wondering why it is invalid and if this can have unwanted consequences. Or maybe it's something known and it is as it should be....

 

I stumbled upon this error while diagnosing a (still unsolved) timeout in a Request and Wait for Reply from a DQMH module to another DQMH module.

 

 

0 Kudos
Message 1 of 6
(809 Views)

Rif.: Invalid Refnum in Request and Wait for Reply

Just as a side note, I solved the timeout problem: I was flushing the MHL queue within another temporally close event thereby preventing the Request's message from being processed by the MHL.

0 Kudos
Message 2 of 6
(803 Views)
Solution
Accepted by topic author carlod80
02-06-2018 11:45 PM

Re: Invalid Refnum in Request and Wait for Reply

I was able to reproduce the 'Invalid Refnum' issue, but it happens with any Notifier or Queue refnum passed as an argument for a user event, no matter whether the refnum is valid or not. So this is not a DQMH issue, it is an Event Inspector Window issue. I think you can safely ignore the 'Invalid Refnum' message.

 

And to reply to your side note, I suggest looking for an alternative to flushing the MHL queue in your application. Usually if someone feels they need to flush the MHL queue, there is probably another issue that needs to be addressed. Perhaps you should be utilizing a helper loop instead of getting in the situation where you need to flush the MHL queue?

 

 

DNatt, LV R&D
Message 3 of 6
(794 Views)

Re: Invalid Refnum in Request and Wait for Reply


 And to reply to your side note, I suggest looking for an alternative to flushing the MHL queue in your application. Usually if someone feels they need to flush the MHL queue, there is probably another issue that needs to be addressed. Perhaps you should be utilizing a helper loop instead of getting in the situation where you need to flush the MHL queue?

 


Darren, thanks for the architectural tip! Indeed, my design is sub-optimal (or simply bad!). Presently, my module is an acquisition module and in the MHL I have a "Start Acquisition" message (1), and "Acquire" message (2) and a "Stop Acquisition" (3) message. The flow is like this: (1) enqueues (2), (2) keeps enqueuing itself until an event in the EHL enqueues (3). When I handle (3) in the MHL I need to flush the queue since even though the EHL has enqueued a priority (3) message, I have not way to make sure that in the MHL other (2) messages get enqueued after (3) - which would mess things up.

 

At first glance, I can't see a way to avoid this with a helper loop, I need some thinking (or some hint if you have one)...

 

The only (naive) thing that comes to my mind is that I could use a boolean flag to stop the acquisition (rather than a MHL message), checking the flag in the (2) event and enqueuing (2) or (3) depending on the flag.

0 Kudos
Message 4 of 6
(780 Views)

Re: Invalid Refnum in Request and Wait for Reply

Maybe this topic on helper loops can point you in the right direction(?).


Joerg Hampel, CLA & LabVIEW Champion | hampel-soft.com
Message 5 of 6
(767 Views)

Re: Invalid Refnum in Request and Wait for Reply

Thanks Joerg, it seems exactly my use case!

0 Kudos
Message 6 of 6
(739 Views)