From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Corrupted INI file

Hi,

 

0 Kudos
Message 1 of 25
(2,835 Views)

I have no idea why that would happen especially since it's intermittent.  If I had to guess, it would be that the file was being manipulated outside of LabVIEW somehow.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 2 of 25
(2,831 Views)

At least, typing NUL with a keyboard would be quite difficult. 🤔

0 Kudos
Message 3 of 25
(2,800 Views)

LOL, too funny - and true.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 25
(2,783 Views)

Is the "corruption" benign, i.e. does everything still work, even if these nulls are there?

 

Also note that the configuration file tools are all plain VIs with (mostly?) accessible diagrams, so you can easily tell if there is anything fishy that would cause this.

0 Kudos
Message 5 of 25
(2,766 Views)

That's never happened to me. I would expect that there's some corruption in the data that's written, unless there's some other process affecting the file as Altenbach mentions.

Probe and double check that you're not writing Section with bad characters, e.g.

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 6 of 25
(2,738 Views)

Thank you for your answers.

 

@billko : Even if they remain very rare, the cases are sufficiently widespread in our production facilities to exclude human modification. NUL also rule out this probability.

 

@Altenbach : Yes, the example shown does not pose any problem and goes completely unnoticed. But, I suppose that this is the starting point for rare cases (2-3/year, about 150 LV applications run on our assembly lines) with the disappearance of the useful data.

 

@Yameada : All of our attempts to reproduce the bug were unsuccessful. This very rare bug has appeared on several applications, versions of Windows and LV. The types of data written/read obviously vary depending on the application. The only common point seems to be the use of NI's library... and our usage of it.

 

I cannot rule out that we are passing on an inappropriate way of doing things from application to application. But this library is very easy to use and the options are not numerous. To this day, I do not know anything about the origin of this corruption. Could it even come from reading? Could this occur if some other process (eg file indexing by OS) accesses this file?

 

If someone could find a file with the same corruption, it would help guide our research. If anyone (from NI) can exclude the library from writing NUL, that would be very helpful as well. If so, obviously also under what circumstances it does so.

 

Wishing you a pleasant weekend

0 Kudos
Message 7 of 25
(2,725 Views)

Sorry, I didn't mean to make it sound trivial because even if it was only one byte that was messing up your ini file, it's still going to cause major headaches.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 8 of 25
(2,708 Views)

You could just copy either the open or close VIs and modify it to drop NULs.  Then use this new version in your apps.  Assuming the issue, whatever it is, is just adding NULs, rather than messing up something else.

0 Kudos
Message 9 of 25
(2,693 Views)

Do any of your multiple apps share common config files?  Possible loss of data can happen due to read-write race conditions.  If I were asked how to improve that NI library, fixing that hole would be my first suggestion.

Message 10 of 25
(2,688 Views)