LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Deny Access function with invalid file refnum causes LabVIEW to crash

Hi folks,

I have LabVIEW 8.5, and today encountered something interesting that consistently causes LabVIEW to crash.  Essentially, if you find the "Deny Access" function under the advanced file IO palette and wire up an invalid refnum, Windows (XP in my case) reports that LabVIEW has to close.  I checked in task manager, and the LabVIEW process is still active and using a disproportionate amount of the CPU.

To reproduce the issue, simply drop the function on your block diagram, create a constant from the refnum input terminal, and run the VI.  Has anyone else seen this behavior?

Thanks,

Jim
0 Kudos
Message 1 of 6
(3,138 Views)
Me too.
I suggest you file a bug report

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 2 of 6
(3,133 Views)
Thanks for the sanity check, Ton.  I'll proceed to report it.
0 Kudos
Message 3 of 6
(3,129 Views)
Hi Jim,
 
I agree that this is definitely a bug. I have reported the issue so that R&D can take a closer look at it and get it fixed. The Corrective Action Request ID is 95756 in case you want to track it in the future. Unfortunately, I cannot give you a timeframe for when this will be fixed or in which version of LabVIEW. However, if you tell us a bit more about your application, we can help you find an appropriate work-around in the meantime. Thanks again for reporting this bug!
 
Carla
National Instruments
Applications Engineer
0 Kudos
Message 4 of 6
(3,104 Views)
Hi Carla,

I'm glad to help, and thanks for looking into it.  The way I ran into the bug was while I was working on an action engine VI to log certain text values (see attached picture).  While logging, I didn't want other programs to access the file.  When a new file had to be generated, I wanted to stop denying access and close the reference.  However, if the value on the shift register was invalid, LabVIEW crashed instead of throwing an error (I guess a crash qualifies as an error).

If you look at the attached picture, my workaround was to use the "Not A Number/Path/Refnum?" function.  If the reference is bad, I don't try to use the "Deny Access" funtion or close the file.  That worked just fine and seems like a good solution for now.

Jim



0 Kudos
Message 5 of 6
(3,100 Views)
Hi Jim,
 
Thanks for sharing the work-around with us and thanks again for telling us about this bug!
 
Carla
National Instruments
Applications Engineer
0 Kudos
Message 6 of 6
(3,082 Views)