LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Wrong millisecond time format causes LabVIEW hang

I was using Format Into String to format a timestamp and I accidentally used the format string "%<%H.%M.%S%.3u>T" instead of "%<%H.%M.%S%3u>T" (added an extra '.' into the millisecond specifier). I would expect of course that it wouldn't work if I used the wrong format, but what I didn't expect was HOW it wouldn't work.

 

If you run the attached example, you will see that there is no error on the error out wire, but an error pop up:

error.png

 

When I had this in my application (not at the top level), I didn't even get this error message, LabVIEW just hung and would not go past that point in code. This made it really hard for me to debug and find my mistake.

 

Does anyone know why this happens? I think it would be much better if the Format Into String node returned with an error on error out, rather than hanging in cases like this.

Message 1 of 5
(1,852 Views)

Any chance you can save that as an earlier version?  Many of us don't update to the newest or second-newest versions.  Saving 3 versions back from the most recent release (2020 - 3 = 2017) is pretty standard.

0 Kudos
Message 2 of 5
(1,823 Views)

I experience the same error with your .vi as well in LabVIEW 2020. I see that this behavior is listed in the following document as a bug that was fixed in LabVIEW 2015. Looks like it wasn't completely fixed!

 

https://www.ni.com/en-us/support/documentation/bugs/15/labview-2015-bug-fixes.html

 

437915 When converting a Timestamp into a string with the Format into String primitive, certain incorrect format strings will cause the End of file encountered error.
0 Kudos
Message 3 of 5
(1,814 Views)

I wasn't sure if the issue was version specific to 2019 or not (should have mentioned that), but it looks like it's not just 2019, so here's a 2015 version.

0 Kudos
Message 4 of 5
(1,806 Views)

Same thing happens to me in 2018.

 

I suspect that if you open a case with NI via their support, attaching your VI showing the problem and referencing the previous problem's CAR number, they'll re-open it and with luck sometime in the next 2 years you'll see it in the patch notes of resolved issues.

 

 

0 Kudos
Message 5 of 5
(1,788 Views)