LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Works in IDE but not in exe

And to remove all doubt...

 

Frozen_0-1657051320151.png

 

 

The above code compiled into an exe will cause LV exe to crash & disappear if the PATH input points to a sufficiently large vi that does not contain compiled code.

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 11 of 19
(859 Views)

@Frozen wrote:

@JÞB wrote:

@billko wrote:

The thing that defeats all my possible scenarios is that this doesn't happen all the time...


That's exactly what has had me thinking about the use of Mods.vi.  that property simply makes no sense in an application.   Why would the flag exist inside an exe? 


I am not following your train of thought. The exe is running with LV code as the input file, not another exe.

 

Exactly like you point out here:

 


@JÞB wrote:


 But, I could see a use case to have an exe parse through source code so, it is simply a bad usage or the error being thrown should be thrown more often.

 

I would get rid of the suspect property nodes in the exe.


Unfortunately, it is the open reference that is causing the crash with missing compiled code, as seen in the original post.

My attempt to check for compiled code first (seen below) still causes the exe to crash/disappear ☹️

 

 

Frozen_0-1657050189329.png

 

Guess I will have to put a note into the readme file about the potential crash using dev code. Not an optimum solution.

 


No it is not optimal!  Bug, quite likely! I can wave a hand \/\/


"Should be" isn't "Is" -Jay
0 Kudos
Message 12 of 19
(850 Views)

@Frozen wrote:

wiebe@CARYA wrote:

 


@Frozen wrote:
1) It no longer works during development to debug your code

Why not? You mean debug an executable? I have no issues with debugging during development. Well, a few, but non related to separate compiled code.


To clear things up, it is "running the exe to debug the plug-in code" part that no longer works, since the plug-in code no longer contains the compiled code.

I am not a perfect programmer so there will be bugs. Having to "compile" the code in order to run and debug it will certainly slow things down. Having two "master" code bases (one with compiled code and one without) is certainly not a good idea either. That leaves running the exe in dev mode just so the plug-in code can run.

 

Deploying PPL's sounds like a good idea. Will there be deployment issues calling the vi's inside the PPL? Guess I will have to try it out. Although, I don't see how that solves the development problem or the LV bug.

 

 


While the call you are making may be a bug on LabVIEW's side of things I still think you are going about this wrong. Plugins should be well defined, self contained libraries that can be reused. This means they should be thoroughly tested by themselves before distribution. Can a big make it to the field, of course. We all have run into that. However if you need to go to this level of debugging on production systems your development process is not defined well enough and inadequate testing is being done. In addition, you can build debuggable versions of PPLs.

 

If you are unable to easily test the PPL/library on its own it probably means that the architecture is not correct. If the plugin/PPL/library has lots of external dependencies then the overall architecture is not that good.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
Message 13 of 19
(846 Views)

@Mark_Yedinak wrote:

@Frozen wrote:

wiebe@CARYA wrote:

 


@Frozen wrote:
1) It no longer works during development to debug your code

Why not? You mean debug an executable? I have no issues with debugging during development. Well, a few, but non related to separate compiled code.


To clear things up, it is "running the exe to debug the plug-in code" part that no longer works, since the plug-in code no longer contains the compiled code.

I am not a perfect programmer so there will be bugs. Having to "compile" the code in order to run and debug it will certainly slow things down. Having two "master" code bases (one with compiled code and one without) is certainly not a good idea either. That leaves running the exe in dev mode just so the plug-in code can run.

 

Deploying PPL's sounds like a good idea. Will there be deployment issues calling the vi's inside the PPL? Guess I will have to try it out. Although, I don't see how that solves the development problem or the LV bug.

 

 


While the call you are making may be a bug on LabVIEW's side of things I still think you are going about this wrong. Plugins should be well defined, self contained libraries that can be reused. This means they should be thoroughly tested by themselves before distribution. Can a big make it to the field, of course. We all have run into that. However if you need to go to this level of debugging on production systems your development process is not defined well enough and inadequate testing is being done. In addition, you can build debuggable versions of PPLs.

 

If you are unable to easily test the PPL/library on its own it probably means that the architecture is not correct. If the plugin/PPL/library has lots of external dependencies then the overall architecture is not that good.


The plug-in are fully tested and (mostly) stand-alone... it is that grey area during deployment verification that it would be handy to run it from the exe to verify that the correct parameters are being passed to the plug-in. If I get the PPL deployment working that should solve the potential field crash. Although, that was never an issue with the current process either.

 

But at least we both agree there is "a bug on LabVIEW's side of things" 😁

---------------------------------------------
Former Certified LabVIEW Developer (CLD)
0 Kudos
Message 14 of 19
(842 Views)

Note that although separating compiled code makes your SCC life easier, it isn't a requirement.

 

I have huge projects that don't have compiled code separated. Esp. if you're on your own it isn't that much of a problem (in fact, no problem at all).

0 Kudos
Message 15 of 19
(817 Views)

wiebe@CARYA wrote:

Note that although separating compiled code makes your SCC life easier, it isn't a requirement.

 

I have huge projects that don't have compiled code separated. Esp. if you're on your own it isn't that much of a problem (in fact, no problem at all).


Even on a one man project it will dramatically improve the value of your SCC. If you have some typedef that is used in LOTS of VIs, whenever you modify the typedef SCC will mark every VI that uses it as modified. A week or two down the line when you discover a bug and want to track down what caused it, your SCC logs will shows tons of VIs that have been modified when in reality only a single typedef changed. Now you either have to have a stellar memory to know exactly what you changed or you have to start looking at all of the code that SCC marked as modified. You will also use less disk space which in these days is not a huge issue given the size of discs but it could still be a concern.



Mark Yedinak
Certified LabVIEW Architect
LabVIEW Champion

"Does anyone know where the love of God goes when the waves turn the minutes to hours?"
Wreck of the Edmund Fitzgerald - Gordon Lightfoot
0 Kudos
Message 16 of 19
(809 Views)

@Mark_Yedinak wrote:

wiebe@CARYA wrote:

Note that although separating compiled code makes your SCC life easier, it isn't a requirement.

 

I have huge projects that don't have compiled code separated. Esp. if you're on your own it isn't that much of a problem (in fact, no problem at all).


Even on a one man project it will dramatically improve the value of your SCC. If you have some typedef that is used in LOTS of VIs, whenever you modify the typedef SCC will mark every VI that uses it as modified. A week or two down the line when you discover a bug and want to track down what caused it, your SCC logs will shows tons of VIs that have been modified when in reality only a single typedef changed. Now you either have to have a stellar memory to know exactly what you changed or you have to start looking at all of the code that SCC marked as modified. You will also use less disk space which in these days is not a huge issue given the size of discs but it could still be a concern.


Also, if you modify a subVI, all the VIs that contain it won't recompile, so you don't end up with 100 VIs that changed.

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 17 of 19
(800 Views)

@Mark_Yedinak wrote:

wiebe@CARYA wrote:

Note that although separating compiled code makes your SCC life easier, it isn't a requirement.

 

I have huge projects that don't have compiled code separated. Esp. if you're on your own it isn't that much of a problem (in fact, no problem at all).


Even on a one man project it will dramatically improve the value of your SCC. If you have some typedef that is used in LOTS of VIs, whenever you modify the typedef SCC will mark every VI that uses it as modified. A week or two down the line when you discover a bug and want to track down what caused it, your SCC logs will shows tons of VIs that have been modified when in reality only a single typedef changed. Now you either have to have a stellar memory to know exactly what you changed or you have to start looking at all of the code that SCC marked as modified. 


Well, I don't use type defs that much. Maybe one or two per 1000 VIs.

 

Changing a VI doesn't change all callers, at least, not always. This would mean that callers are changed, and their callers would also change, recursively, which is definitely not happening.

 

Only if the connector pane of a VI changes, or if an input\output pair changes from\to feed through, the callers are changed. Or of course if the scope or reentrancy changes. Obviously if the VI is inlined.

 

Some changes to a type def will change callers even with separate compiled code. Or often they won't change, but break, so they should be changed...

 

In my experience, it didn't really make that much difference. Definitely not dramatic enough to change this on existing projects. I do prefer it on new projects, although it does seem to cause some problems.

 


@Mark_Yedinak wrote:
. You will also use less disk space which in these days is not a huge issue given the size of discs but it could still be a concern.

Locally, in fact you'd use as much or more disk space. The compiled code is still stored, and there's a probably (a tiny bit of) overhead.

 

There's less space used in your repo's, and that could matter as online storage could be expensive. Although it's probably better to focus on things like not storing executables and other binaries like manuals (that aren't source code).

0 Kudos
Message 18 of 19
(780 Views)

@billko wrote:

@Mark_Yedinak wrote:

wiebe@CARYA wrote:

Note that although separating compiled code makes your SCC life easier, it isn't a requirement.

 

I have huge projects that don't have compiled code separated. Esp. if you're on your own it isn't that much of a problem (in fact, no problem at all).


Even on a one man project it will dramatically improve the value of your SCC. If you have some typedef that is used in LOTS of VIs, whenever you modify the typedef SCC will mark every VI that uses it as modified. A week or two down the line when you discover a bug and want to track down what caused it, your SCC logs will shows tons of VIs that have been modified when in reality only a single typedef changed. Now you either have to have a stellar memory to know exactly what you changed or you have to start looking at all of the code that SCC marked as modified. You will also use less disk space which in these days is not a huge issue given the size of discs but it could still be a concern.


Also, if you modify a subVI, all the VIs that contain it won't recompile, so you don't end up with 100 VIs that changed.


That is a myth. AKA as not true.

EDIT: OK, it is a myth that without separate compiled code, if you modify a subVI it's callers need a recompile. Technically, you're not saying that, you're saying that if you do separate compiled code that doesn't happen, which is factual.

 

Not any change to a VI will change it's callers. Not all callers always need a recompile.

 

If that was true, all callers would need a recompile and in turn all their callers would need a recompile, and as a result, the main VI would always need a recompile. It's not true.

 

Iff  (if and only then) a VI changes in a way that potentially effects the caller, the caller needs to be recompiled.

 

This only happens (AFAIK) if the VI is inlined, on scope or reentrancy changes, if the connector pane changes, or an input\output pair changes from\to feed through (like error in\error out).

 

If such a change happens, the callers need to be recompiled. Only if that change effects the connector pane, or feed through of that VI, will callers need to be recompiled. That's rare, so if callers need to be recompiled, that's usually where it stops.

 

Once code settled well, you can make a lot of changes without getting much changes in SCC. Well, I can, and I do it all the time.

0 Kudos
Message 19 of 19
(775 Views)