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.

LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Application doesn't give the same result according to the computer

Solved!
Go to solution

Hello everyone,

 

My problem is very blurred for me so I'll try to explain it the best I can ...

 

So I've almost finished my project, and I want to try it on another computer.

In my project, I generate txt file thanks to several datas, then I use this file to display some graphical informations on a graph. It works fine.

So I made a Distribution kit following this tutorial : http://www.howtocvi.net/2011/12/how-to-make-distribution-kit.html

I installed the .exe on the other computer, and I launched the program.

 

My problem is that for the same data I used before, the program doesn't have the same behaviour.

My traces on the graph don't look like they should be.

 

I don't know what causes that because both programs are using the same algorithm...

 

If you have a clue, I'll take it !

 

Thanks for your answers,

Regards,

Jérôme.

 

 

0 Kudos
Message 1 of 9
(4,790 Views)

Maybe one of the computers has a newer run-time engine than distributed with your application... you can make sure by checking the versions of the RTE on both computers

0 Kudos
Message 2 of 9
(4,779 Views)
As I'm not really familiar with CVI, this may not apply to your case, but could it be a race conditions on one of your variable ?
CLAMaxime -- Kudos are a great way to say thank you
0 Kudos
Message 3 of 9
(4,774 Views)

I forgot to precise that LabWindows/CVI is not installed on the second computer, so I don't think that's it !

Thanks anyway !

0 Kudos
Message 4 of 9
(4,771 Views)

@ml927 What do you call "a race conditions" ?

0 Kudos
Message 5 of 9
(4,768 Views)

Supposing you are comparing a debug application on the development machine with a standalone executable on the target machine, the behaviour of them can be different due to additional informations and precautions that are present in the debug application. The best option is to test the executable in the development machine and see if it behaves correctly: if it exposes the same wrong behaviour than on target machine you must check the differences between these two applications. See for example this tip from Wendi L.

 

If on the contrary the executable runs correctly in the development machine you must double check that execution environment is the same, including support files you are using in both machines. You can also try to remotely debug the program on the target machine, see this tutorial for an explanation of remote debugging facilities included with CVI.



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 6 of 9
(4,714 Views)

Thanks for your answer Roberto !

 

I tried to launch executable from my development machine, and there is the same problem than in my target computer. It is a small step forward ^^ !

So I watched the example you gave me but I don't really understand what I should do because I tried to generate a map file but I can't see it.

Moreover, in the exercise 1 it says that the project should crashe when I compile in release mode except it doesn't...

 

I'm sorry but I'm a little bit lost !

I'm not used to CVI !

0 Kudos
Message 7 of 9
(4,699 Views)
Solution
Accepted by jerome_gab

Well, the example was just to stress out that debug and release can behave differently, I wasn't thinking it could apply directly to your situation.

 

If I were you I would start checking the inizialization of variables, since this is one of the bigger differences between those two scenarios.

After that I would add some DebugPrintf to print out relevant variables during program life: DebugPrintf output can be seen in Debug Output window while developing the program and in utilities like DebugView while running the executable, so you can compare its output in both situations.

Normally after some trial and error the situation clarifies and the appropriate corrections can be made in the code.

 



Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
Message 8 of 9
(4,659 Views)

After 5 hours of research, I finaly found the variable that wasn't initialized !

Now It works !

 

Thant you very much Roberto for your helpful advice !

 

Regards,

Jérôme.

0 Kudos
Message 9 of 9
(4,619 Views)