From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

What am I doing wrong with asynchronous call and forget?


@mcduff wrote:

Mine stays yellow, right click and then you see the option.


Worked in 2024Q1 as well.

 

To bring information back from the thread in the 2024 Beta board, I was still getting the freeze if a menu was open.  I'm concluding that Weibe has not installed the patch yet which had a fix for the run-time type propagation.  Him not seeing the freeze appears to be an artifact of that bug.  So one bug squashed, but another, smaller one, instantly takes its place.

 

Using the secret ini token and enabling the "run in any thread" option fixed the freeze issue for me.  I'm lucky I have yet to run into the situation which would cause this, probably because I would be launching these clones at initialization, likely with no GUI visible.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 21 of 34
(402 Views)

@crossrulz wrote:

@mcduff wrote:

Mine stays yellow, right click and then you see the option.


Worked in 2024Q1 as well.

 

To bring information back from the thread in the 2024 Beta board, I was still getting the freeze if a menu was open.  I'm concluding that Weibe has not installed the patch yet which had a fix for the run-time type propagation.  Him not seeing the freeze appears to be an artifact of that bug.  So one bug squashed, but another, smaller one, instantly takes its place.


Yes, no patch yet. Too bad it stopped working.

 


@crossrulz wrote:

Using the secret ini token and enabling the "run in any thread" option fixed the freeze issue for me.  I'm lucky I have yet to run into the situation which would cause this, probably because I would be launching these clones at initialization, likely with no GUI visible.


The key isn't really a convenient option, unless I can set it at run time. If not, a check in check out could change functionality.

0 Kudos
Message 22 of 34
(390 Views)

@mcduff wrote:

wiebe@CARYA wrote:.

Also keep in mind that Open VI Reference needs the root loop to be free when opening a strict VI.

There is an INI token you can change and have the option of running at any loop. See https://lavag.org/topic/23800-dynamic-calling/?do=findComment&comment=173305
The Open VI Reference will block on UI Rootloop even in the first (top) one.


This gave me an idea how to "block" Call & Forget. If inside of the called VI something will block UI thread for the long time (for example, DLL called in UI Thread and stays inside - for example, its sufficient to call Sleep for few seconds from kernel32.dll), then in second iteration the main loop will be definitively blocked. 

0 Kudos
Message 23 of 34
(365 Views)

@mcduff wrote:

wiebe@CARYA wrote:.

Also keep in mind that Open VI Reference needs the root loop to be free when opening a strict VI.

There is an INI token you can change and have the option of running at any loop. See https://lavag.org/topic/23800-dynamic-calling/?do=findComment&comment=173305


The semi-official Ni statement is to not use it and stop telling about it.

 

Go fish.

 

Dynamic VIs are simply not a production ready technology.

 

To be honest, in 95% of the use cases, it can be done better without VI Server. Sadly, the remaining 5% is a problem.

0 Kudos
Message 24 of 34
(320 Views)

wiebe@CARYA wrote:

To be honest, in 95% of the use cases, it can be done better without VI Server. Sadly, the remaining 5% is a problem.


Curious. Would you mind giving some examples where it is used incorrectly?

0 Kudos
Message 25 of 34
(304 Views)

@mcduff wrote:

wiebe@CARYA wrote:

To be honest, in 95% of the use cases, it can be done better without VI Server. Sadly, the remaining 5% is a problem.


Curious. Would you mind giving some examples where it is used incorrectly?


It's not so much incorrect (there are no rules), it's that there are consequences. Consequences that can be avoided.

 

Anywhere you use Open VI Reference (strict) or the Run VI method, while the user can trigger a menu, popup (messagebox, file dialog), resize a FP, you could have a problem you don't even know about. Because if any of those things happen (in any VI), the root loop is blocked for Open VI Reference (strict) and Run VI method.

 

In general, dynamic VIs make things more complicated. More complicated than a simple SubVI that's running, and stops running if the caller stops.

 

There's for instance the problem where clones keep running, and there's no (decent) way to get their references if you lost them.

 

Dynamic VI references are only unavoidable if you have an unknown number of things to start or unknown objects to start (like plugins). Any other situation you don't have to use VI Server to get run time functionality.

 

However, it might be convenient to start something dynamically to get edit time advantages. For instance, so you can stop code independently of the rest.

Message 26 of 34
(304 Views)

@Andrey_Dmitriev wrote:

wiebe@CARYA wrote:

@Andrey_Dmitriev wrote:


Oh, sorry, I was busy with gif creation, didn't catch this, should refresh comments before posting


That's quite useful, how did you create it?

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

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 27 of 34
(204 Views)

@Yamaeda wrote:

@Andrey_Dmitriev wrote:

wiebe@CARYA wrote:

@Andrey_Dmitriev wrote:


Oh, sorry, I was busy with gif creation, didn't catch this, should refresh comments before posting


That's quite useful, how did you create it?


Using ScreenToGif (https://www.screentogif.com😞

Screenshot 2024-04-02 09.10.58.png

Message 28 of 34
(200 Views)

@Andrey_Dmitriev wrote:

@Yamaeda wrote:

@Andrey_Dmitriev wrote:

wiebe@CARYA wrote:

@Andrey_Dmitriev wrote:


Oh, sorry, I was busy with gif creation, didn't catch this, should refresh comments before posting


That's quite useful, how did you create it?


Using ScreenToGif (https://www.screentogif.com😞


I use ScreenToGif too. It's very easy to use.

0 Kudos
Message 29 of 34
(188 Views)

@Andrey_Dmitriev wrote:

@Yamaeda wrote:

@Andrey_Dmitriev wrote:

wiebe@CARYA wrote:

@Andrey_Dmitriev wrote:


Oh, sorry, I was busy with gif creation, didn't catch this, should refresh comments before posting


That's quite useful, how did you create it?


Using ScreenToGif (https://www.screentogif.com😞


Nice tool! I've always used OBS to do that, what a pain for such a simple task 😅.

0 Kudos
Message 30 of 34
(174 Views)