12-02-2016 03:06 AM
Hi.
My code is sat in a loop performing a UDPRead instruction with a timeout set (1000mS) waiting for a remote node to power up and send a message.
UDPRead(hSocket, pResponseBuf, responseSize, 1000, pSourcePort, pRemoteIP);
This code works fine as it will repeatedly timeout until the remote node powers up and the expected message is recieved
I have recently set the debugging level to Extended and this code breaks on the timeout reporting a NON-FATAL RUN TIME ERROR (-6808).
I have tried adding
SetBreakOnProtectionErrors(0)
UDPRead
SetBreakOnProtectionErrors(1)
but this has not helped.
In my opinion this is not a runtime error as the function provides a valid option to timeout but breaks before I get a chance to process the returned error value of the timeout.
Can anybody please suggest a way to locally supress the error without having to turn off extended debuging.
Thanks
Solved! Go to Solution.
12-05-2016 05:05 AM
Hello Stephen
The runtime error -6808 indicates that the timeout has expired. This is due to Extended debugging taking longer to execute than normal debugging mode (analogous to LabVIEW's Highlight Excecution).
You can disable run-time error by going Run -> Break On ->Library Errors. You can also try using SetBreakOnLibraryError() instead of SetBreakOnProtectionError(), and see if that has any effect.
If the issue persists, you can try using the debug library found here:
http://forums.ni.com/t5/LabWindows-CVI-User-Group/LabWindows-CVI-Tip-Debugging-Release-Executables/t...
I hope some of these solutions help.
Thank you
12-05-2016 06:09 AM
Thanks for your post.
The SetBreakOnLibraryError has fixed the issue.
Though UDPRead is a CVI call, I guess that it is calling down into WinSock and that is throwing the actual exception on timeout.
This is now working as I expected.
Thanks