The problem of transferring the client application to another computer

Hello everyone.

I developed a C ++ client application in Qt5 using qtango on a computer running Ubuntu 18.04. When running on this computer, the client application is compiled and works correctly. However, when I try to transfer this application to another computer running Debian 9 or Ubuntu 16.04, it does not work. There are no errors when compiling; however, when I try to start the application, an error occurs that causes the program to crash:

terminate called after throwing an instance of 'Tango::DevFailed'

The full message in the “application output” window looks like:

15:01:01: Starting
/home/alex/Documents/build-SG384qTangoClient-Desktop_Qt_5_12_2_GCC_64bit-Release/SG384qTangoClient…
terminate called after throwing an instance of 'Tango::DevFailed'
15:01:01: The program has unexpectedly finished.
15:01:01: The process was ended forcefully.
15:01:01:
/home/alex/Documents/build-SG384qTangoClient-Desktop_Qt_5_12_2_GCC_64bit-Release/SG384qTangoClient
crashed.

Another client application developed on a Debian 9 computer using Qt5 and qtango runs correctly on all three computers with different Linux (Debian 9, Ubuntu 16.04, Ubuntu 18.04).

Has anyone faced the similar problem? Can you suggest any options for solving it?

Regards,
Aleksei
Hi Aleksei,

in general you can't just copy a C++ application from distro A to distro B and expect it to work.
You have to compile it against the QT version available on the target computer. I would think that you just got lucky until now.

My approach is to have either a virtual machine with the target distro and compile my application there for it, or even better do it during CI.
It looks like your program is crashing because it received an unexpected and uncaught DevFailed exception.
I would surround your client code with a big try/catch block and add a line to display the DevFailed Exception message:

int main(int , char **)
{
try
{
/// your code
}
catch(const Tango::DevFailed &e)
{
Tango::Except::print_exception(e);
}
}


I agree with t-b.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new.
Maybe I did not put it quite correctly.
When I talk about transferring an application to another computer, I mean that I transferred the source files and recompiled. The target computer is set to the Qt development environment and with it I launch the project and compile it. There are no errors when I compile the program. The error that leads to the crash of the program occur when I trying to run it.
Now I have figured out what causes the error. The problem was in the unexpected and uncaught DevFailed exception.
Thank you all for your help!

Regards,
Aleksei
 
Register or login to create to post a reply.