robocomp / dsr-graph

Development of new DSR shared graph
4 stars 12 forks source link

Error using DSR agents in Ubuntu 20.04 #11

Closed DarkGeekMS closed 4 years ago

DarkGeekMS commented 4 years ago

DSR agents unexpectedly shut down, when trying to run them on Ubuntu 20.04, with no error message.

Only Startup check is printed.

However, when I disable startup check :

this->startup_check_flag = 0;

Everything seems to be running fine : Screenshot from 2020-08-28 11-48-11

Somehow, the startup check always times out.

orensbruli commented 4 years ago

Thank you @DarkGeekMS Could you make some debug for us? This flag should be set to false in initialization and to true only if --startup-check option is given. You can see this in the main.cpp file of the components. You can look for this // Search in argument list for --test argument (if exist) to find where it's set to true and bool startup_check_flag = false; to find where it's created and set. Could you make some debug of this in your Ubuntu 20.04?

DarkGeekMS commented 4 years ago

Sure thing, I'm working on it.

DarkGeekMS commented 4 years ago

@orensbruli I have debugged the issue for a while and I think the problem is that startup_check_flag is not initialized.

Nothing changes startup_check_flag but class initialization, so when I print the value of startup_check_flag in the class constructor, I found that it's set to a random integer, which means true :

public:
    idserver (QString prfx) { prefix = prfx.toStdString(); std::cout << startup_check_flag << std::endl; }

An uninitialized boolean is supposed to be set to false though, which happens in Ubuntu 18.04, but not in Ubuntu 20.04.

So, I initialized startup_check_flag to false :

private:
    void initialize();
    std::string prefix;
    TuplePrx tprx;
    bool startup_check_flag = false;
orensbruli commented 4 years ago

Great! And with this change, the component starts as expected, right? As far as these changes looks good for all the ubuntu versions I think you can make a Pull Request of this.

DarkGeekMS commented 4 years ago

Yes, it works fine with all Ubuntu versions. I will create a PR to change it in the components. Also, I think it should be fixed in the code generator as well.

orensbruli commented 4 years ago

@DarkGeekMS I'm fixing this in robocompdsl, thx.

DarkGeekMS commented 4 years ago

I updated and tested the components in this PR : https://github.com/robocomp/dsr-graph/pull/12