Jump to content

"Input parameter is invalid..." on built EXE launch


Recommended Posts

I suspect I'm seeing the same problem as mentioned previously in this thread, but my symptomology is a bit different and the fix mentioned in that thread doesn't apply to my situation.

I have an EXE built in LV85. It's fairly complicated, with a couple dozen classes, several levels of inheritance, a couple VI server-spawned VIs, an external DLL or two, and some various config files (and these all come from a handful of .lvlib files along the way). When I run the built application from the Destination Directory specified in the Build Spec, everything is fine.

However, when I move the EXE (and all its components) to another directory, I get the following error dialog on launch:

post-2992-1191431720.png?width=400

Now, the really frustrating thing is that after displaying that dialog, the application goes on to run just fine.

The problem does not appear to be related to the particular directory I copy the app to, as I've reproduced the problem in multiple directories on multiple computers and even tried building the app on multiple computers just to make sure it's not something weird on my development machine.

Does anyone have any insight on this? What could the RTE (or the app) be looking for that throws that error in anything but the original Build Destination directory?

Link to comment

I LOATHE THAT ERROR MESSAGE.

The message you are seeing is the message for error code #1. Error code 1 is "bad input to function." It is the least helpful error message in LabVIEW. In an attempt to make it more helpful, someone added the information about looking for a badly formatted path. Now everyone assumes that this error has something to do with paths. It doesn't. You can get that error code from lots of places. The Enqueue primitive returns it if you try to enqueue into a refnum that has already been released, for example. :headbang:

Having said all that... this one probably is path related. :rolleyes:

The "addendum" onto the standard error text says

The file '' is not a valid LabVIEW file.

My guess is this... there's something that your exe is linking to (probably a DLL) that is the problem. Your EXE was built and saved in a directory something like c:\alpha\beta\gamma\MyApp.exe. The DLL was located in c:\XYZ.DLL. So the EXE stored the path "..\..\..\XYZ.DLL" . Now you move your app to another directory such as c:\muchhigher\MyApp.exe. When LV tries to change directories up three levels to find the DLL, it ends up with an empty path that it can't do anything with.

Now, all this is just a guess. But I'd look around for something like this.

Link to comment

QUOTE(Michael_Aivaliotis @ Oct 4 2007, 04:36 AM)

I don't believe it! Stephen actually admitted that LabVIEW is not perfect.

:D I've heard Stephen admit that LabVIEW isn't perfect previously, but, as my Ma says, "I'm not perfect, but I'm as close as anyone you'll ever meet." ;)

  • Like 1
Link to comment
QUOTE(Michael_Aivaliotis @ Oct 3 2007, 01:36 PM)
I would suggest that I do frequently admit to LV's deficiencies, but my reaction to them is too mild for your tastes. Your declarations tend to be "this is not perfect, therefore this is not usable." It's the "this is not usable" part that I usually take issue with. Generally, if it only affects the developer of LV, I'm a lot more comfortable with it than if it affects the end user of a program written in LV. Curiously enough, the parts of LV that are, to me, our greatest points of shame almost never come up in these forums. Like our lack of support for ctrl+Insert, shift+Insert and shift+Delete on the PC. That one has bugged me for years. Every other PC program supports those shortcuts (copy, cut, and paste respectively), but not LV. Or ctrl+shift+arrow keys behavior inside string controls. Those actually affect end users, not just developers. That distinction is related to the distinction I draw between "LV the programming language" and "LV the development environment." The environment can be rough as long as the end result is beautiful. If the end result has problems, that really raises my hackles. That error message is borderline, since it isn't really something you'd display to an end user, but it is nonetheless a runtime dialog. In any case, I loathe it.QUOTE(crelf @ Oct 7 2007, 03:04 PM)

:D

I've heard Stephen admit that LabVIEW isn't perfect previously, but, as my Ma says, "I'm not perfect, but I'm as close as anyone you'll ever meet."
;)

I propose a variation: "The software had a user interface that only its developer could love." :shifty:

Link to comment

QUOTE(Aristos Queue @ Oct 3 2007, 11:28 AM)

At the risk of taking the discussion too far off-track, where does this one rank in comparison?

http://lavag.org/old_files/monthly_10_2007/post-2992-1191863686.png' target="_blank">post-2992-1191863686.png?width=400

This one also appears after trying to launch an EXE that both runs fine in the development environment and seems to build OK.

Link to comment

QUOTE(Justin Goeres @ Oct 8 2007, 12:16 PM)

This one also appears after trying to launch an EXE that both runs fine in the development environment and seems to build OK.

Actually, that one is my dialog. It's terrible too. It was one of the first changes I made to the LV source code years ago.

But -- here's the joke -- it's actually great considering that before I changed that code, each one of those messages was, get this, a separate dialog requiring you to hit "Ok." :headbang:

Perhaps someday someone should revisit that code and actually make that dialog usable...

Link to comment

QUOTE(Aristos Queue @ Oct 9 2007, 01:06 PM)

But -- here's the joke -- it's actually great considering that before I changed that code, each one of those messages was, get this, a separate dialog requiring you to hit "Ok." :headbang:

Well, it does save me a trip to the Task Manager, since the likelihood of me sitting through all 40 (or whatever) of those dialogs is pretty much zero. :wacko:

QUOTE

Perhaps someday someone should revisit that code and actually make that dialog usable...

Yes, for the Love of Dog, please. (Although I'd settle for an upstream fix for whatever weirdness in the dev environment or the app builder causes me to run into that dialog in the first place ;) )

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.