Jump to content


Photo
- - - - -

ogpatch_librarian_bugfix-1.0-1 may "break" libraryn.llb

labview 7.0 librarian build error 1003

  • Please log in to reply
7 replies to this topic

#1 Bob Schor

Bob Schor

    Active

  • Members
  • Pip
  • 10 posts
  • Version:LabVIEW 2012
  • Since:2007

Posted 23 December 2011 - 03:50 PM

I think there may be a bug in the OpenG utility "ogpatch_librarian_bugfix-1.0-1". I believe this is intended to rename the VI "Copy From Folder to Folder" in vi.lib\Utilities\libraryn.llb (by adding the suffix "__buggy") and replace it with a VI of the same name that corrects a race condition issue.

I've got more than half-a-dozen Windows XP machines (some "real", some VMs running on Windows 7 PCs) that are running LabVIEW 7.0, and using VIPM 3.0 or VIPM 2010 to install the OpenG packages. In most cases, the installations are a year old (or older), and haven't been updated (i.e. no new packages have been added). In all but two cases, it appears that an error occurred during the package installation (and either not noticed or simply ignored, as VIPM didn't "complain loudly"), the net result being that Copy From Folder to Folder was simply deleted from libraryn.llb, and not replaced.

In a number of cases, this "missing file" was not noticed, and the user was none-the-wiser. However, when I attempted to use the Application Builder to create an executable (from any code, even from a simple While Loop with a Stop button inside), I would get an Error 1003 with a message referring to a protected file in the App Builder. It turned out, however, that the real error was the missing Copy From Folder to Folder VI (another example of a misleading error message!).

I've tried to duplicate this bug by taking an existing VM, cloning it, removing LabVIEW 7.0, VIPM, and OpenG, and then reinstalling them as I usually do. I was not able to reproduce the error -- the Librarian Bugfix Patch worked, replacing and renaming the VI in libraryn.llb. So I don't have a "smoking gun" proving that this patch is, itself, buggy, but the fact that most of the LabVIEW 7.0/OpenG installations I've examined have (a) a missing file in libraryn.llb, (b) an indication that VIPM has installed all the OpenG patches except the Librarian BugFix (and the Notifier BugFix -- hmm, maybe the problem is in the Notifier Bugfix ...), and © there is an Error log with cryptic messages saying that VIPM failed during an installation (though the message doesn't clearly identify what package was being installed).

I have left extensive documentation of this issue on the JKI Support Site. I'm following up here in case other LabVIEW 7.0 users might have this "silent" problem. To see if you are affected, simply open the libraryn LLB and see if you have the file Copy From Folder to Folder. If you have 1 copy, then the OpenG patch was never applied. If you have two copies (one with the suffix __buggy), the patch was applied successfully. If you have no copies, the patch failed to install, and may have "clobbered" this VI. A fix is to replace the libraryn.llb file with a "good" copy.

Bob Schor

#2 jgcode

jgcode

    LabVIEW Renegade

  • OpenG
  • PipPipPipPipPipPip
  • 2,407 posts
  • Location:Australia
  • Version:LabVIEW 2009
  • Since:2005

Posted 23 December 2011 - 04:50 PM

Hi Bob

I don't have LabVIEW 7.0 installed but I just downloaded the packages from SF and had a look at for you.
I ran all the Librarian Patch pre/post un/install scripts (I just had to modify one case statement to install in LabVIEW 2009) and it all worked correctly.
Additionally I checked the Notifier package and neither the spec nor the scripts interact with the Librarian destination - so I don't think this would be an issue (unless there was an error passed along during a multiple package install - but I don't think VIPM works like that?)
Seems weird you are missing this Vi across multiple installs you have tested (I was initially thinking some folder/write permissions issues)?

My recommendation is that you unzip the package and try a manual install - move the "bugix" file to its installed folder, run each script in order and see if it reports any errors etc... this is what I just did above. That may shed some light on your issues.

Look forward to hearing what you uncover.

Cheers
-Jon

<edit>

I have left extensive documentation of this issue on the JKI Support Site.


Can you provide a cross link for this post?
I could not find it by searching your topics in the JKI forums.

#3 Bob Schor

Bob Schor

    Active

  • Members
  • Pip
  • 10 posts
  • Version:LabVIEW 2012
  • Since:2007

Posted 26 December 2011 - 06:47 PM

Jon,
Thanks for looking into the code. I've tried to duplicate the "bug" a few times, but it is in the nature of things that when you are looking for errors, they "run and hide". The best evidence, although indirect at best, that there's a real problem is that (a) I've done a few dozen installations of LabVIEW 7.0 on WinXP systems and have successfully built executables (meaning the missing Librarian file isn't "missing"), (b) since about a year ago I've done several more installs, all following the same pattern, and most (but not all!) of these are missing the Librarian file, and hence give me 1003 errors when I build an executable, and © one of my students did an independent install of LabVIEW 7.0, and while he has not (yet) tried to build an executable, I've looked and he is also missing the Librarian file. In addition, we all have been installing the OpenG packages the same way -- install/open VIPM, select all of the appropriate packages, and do an en masse install. On those systems that I've checked, the "missing file" or 1003 error is also associated with VIPM showing the two bug-fix patches are not installed, and there are some entries in the VIPM "error" Application folder.

It seems very unlikely to me that this could be a "permissions" thing, as everything is being installed in the "correct" directories, and everything else works.

I can well-believe that a "careful" installation of the OpenG packages can successfully install the Librarian patch, thereby allowing the user to build executables without encountering an obscure 1003 error. My point in posting this is that it is much easier to "install in a logical manner" and discover, maybe months later, that something went awry. I'm hoping that someone is able to deduce what went wrong, and post a better notification than my somewhat vague description of the symptom of what I think is a problem, but meanwhile, those LabVIEW 7.0 (and later? can't say) users who also use OpenG should check their systems (if you don't want to poke around inside vi.lib, try to build an executable out of anything, even a While Loop surrounding a Stop button -- if it works, you're OK).

BS

#4 jgcode

jgcode

    LabVIEW Renegade

  • OpenG
  • PipPipPipPipPipPip
  • 2,407 posts
  • Location:Australia
  • Version:LabVIEW 2009
  • Since:2005

Posted 27 December 2011 - 02:05 AM

Thanks for looking into the code.

No probs

In addition, we all have been installing the OpenG packages the same way -- install/open VIPM, select all of the appropriate packages, and do an en masse install... ...I can well-believe that a "careful" installation of the OpenG packages can successfully install the Librarian patch,

What is the definition of careful?
Are you able to install the patch as a single-package install after it has failed in the original-multiple-package install?
If not what happens?

On those systems that I've checked, the "missing file" or 1003 error is also associated with VIPM showing the two bug-fix patches are not installed, and there are some entries in the VIPM "error" Application folder.

Posting these specific errors could be helpful?

I've tried to duplicate the "bug" a few times, but it is in the nature of things that when you are looking for errors, they "run and hide". The best evidence, although indirect at best, that there's a real problem is that (a) I've done a few dozen installations of LabVIEW 7.0 on WinXP systems and have successfully built executables (meaning the missing Librarian file isn't "missing"), (b) since about a year ago I've done several more installs, all following the same pattern, and most (but not all!) of these are missing the Librarian file

Ok. so thinking logically but with limited information I am making the following assumptions based on that
  • You are getting errors in the install
  • You are missing the VI where it should be
  • From what you have said
So it seems logical to conclude that on your failed systems the following is happening:
  • The pre install script is renaming the original VI to _buggy
  • The post install script is not renaming and moving the patch VI
  • The post install script must be generating an error
  • This error may report back to VIPM and thus VIPM is stating the package had a failed install
Here is the code from the scripts (its pretty simple code):

Pre-Install Code

pre.png

Post-Install Code (I am assuming this is the code failing)
.
code.png

So I was trying to work out what was happening- this would be a good starting point.
Let us know what you find out.

Cheers
-JG

#5 Darren

Darren

    Extremely Active

  • NI
  • 452 posts
  • Location:Austin, TX
  • Version:LabVIEW 2013
  • Since:1999

Posted 28 December 2011 - 10:39 PM

Can y'all point me to a post somewhere describing the race condition with the Copy from Folder to Folder VI? I own the libraryn VIs, so I wanted to investigate to see if something is CAR-worthy.
  • jgcode likes this

#6 jgcode

jgcode

    LabVIEW Renegade

  • OpenG
  • PipPipPipPipPipPip
  • 2,407 posts
  • Location:Australia
  • Version:LabVIEW 2009
  • Since:2005

Posted 29 December 2011 - 12:32 AM

Hi Darren

The patch was for LabVIEW 6.1, 7.0 and 7.1 only so I am assuming it was fixed (by NI) along the way (but I don't know the history of this package).
However attached is the bugfix (which is from this package) which you could compare.

bugfix.png

Cheers
-JG


Attached File  Copy From Folder To Folder__bugfix.vi   69.98KB   78 downloads

#7 Darren

Darren

    Extremely Active

  • NI
  • 452 posts
  • Location:Austin, TX
  • Version:LabVIEW 2013
  • Since:1999

Posted 30 December 2011 - 05:15 PM

Thanks, JG. I just confirmed that this bug was present in LabVIEW 7.1, and fixed in LabVIEW 8.0.

#8 jgcode

jgcode

    LabVIEW Renegade

  • OpenG
  • PipPipPipPipPipPip
  • 2,407 posts
  • Location:Australia
  • Version:LabVIEW 2009
  • Since:2005

Posted 31 December 2011 - 12:44 AM

No probs.

Thanks for the update.