LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Verify plugin (source distribution) after build

Dear LabVIEW community,

 

let me ask you about the following.

 

Recently I've faced the following issue. I have exe, which uses plugins, which are distributed as source distribution (because I couldn't make easily working Actors as ppl, but with source distribution there were no problems).

 

Later on, when I've added new plugin, built it, and called from exe, LabVIEW simply crashed. From crash log file was seen, that some of plugin's VIs are broken. When I opened them in LabVIEW, everything was fine. Run from exe - crash of LabVIEW again.

 

Then I read crash log file more precisely, and found that it states, which VI dependency causes issue - it was VI from OpenG toolkit. And reason was clear then - source distribution excludes VIs from vi.lib; and those functions are not used in exe. 

 

But how one could nicely avoid this issue? How to test source distribution, before calling it from exe? Open in LabVIEW and check - would not help, b/c LabVIEW would load dependencies from vi.lib. Moreover, crash log file stated just the first dependency issue; after it was fixed (included to exe), the second one appeared - the second type of function was missing in exe, and was excluded from source distribution.

 

I know, that most probably with ppl I could avoid this issue, b/c dependencies could be inside it, but ppl - are not the best solution for me, because of many other issues and caveats with them...

Does anyone have some ideas, please, how to nicely and easy check such types of plugins?

What comes to my mind - is dummy exe, which will load plugin, and execute it. But it would help just in case, if dummy exe would contain all dependencies, which "real" exe would contain...

 

Thanks a lot in advance,

 

sincerely, kosist90.

0 Kudos
Message 1 of 4
(2,492 Views)

I'd expect (haven't tried) that when configuring the source distribution, the Additional Exclusions tab would allow including external libraries. Simply untag " Exclude VI's from .vilib"?

0 Kudos
Message 2 of 4
(2,457 Views)

It is possible to include externals, but it is not recommended, because such externals as vi.lib, user.lib, etc. - are mostly shared between plugin and exe; and then size of plugin will be much bigger. It's a workaround, and not a solution...
According to guidelines, I always try to keep the shared part in exe, so that plugin would contain after distribution just plugin-related code. It's easy to do with project items, b/c I see them in dependencies, and could separate them. But there is a lot of dependencies from vi.lib for instance, so it's difficult to figure out which are already used for exe, and which are not.
So that's my concern - how to verify plugin after build, that it includes everything what is needed...

0 Kudos
Message 3 of 4
(2,454 Views)

@kosist90 wrote:

So that's my concern - how to verify plugin after build, that it includes everything what is needed...


Load the plugin in the exe, if it doesn't work, not everything is included. If it works everything it needs is included.

 

That would effectively verify the plugin after build. You're already doing that successfully.

 

What you seem to ask for goes a bit further. You seem to be asking how to include everything in the plugin that the plugin needs and that is not included in the executable.

 

 

I think you should be able to do that if you build the exe and plugin in one go. Haven't tried it, but in an exe build spec you can make a new destination that is a llb or project library. Then in source file settings, you can add all included items to that llb or project library.

 

Usually, plugins are used to add functionality after building the exe. To check what VI's are missing in a plugin when run in an executable you probably need some heavy scripting.

0 Kudos
Message 4 of 4
(2,450 Views)