{"action":"reopened","issue":{"url":"https://api.github.com/repos/robotology/yarp/issues/624","labels_url":"https://api.github.com/repos/robotology/yarp/issues/624/labels{/name}","comments_url":"https://api.github.com/repos/robotology/yarp/issues/624/comments","events_url":"https://api.github.com/repos/robotology/yarp/issues/624/events","html_url":"https://github.com/robotology/yarp/issues/624","id":113402495,"number":624,"title":"If YARP_CLOCK env variable is set, yarp complains that it is not initialized","user":{"login":"traversaro","id":1857049,"avatar_url":"https://avatars.githubusercontent.com/u/1857049?v=3","gravatar_id":"","url":"https://api.github.com/users/traversaro","html_url":"https://github.com/traversaro","followers_url":"https://api.github.com/users/traversaro/followers","following_url":"https://api.github.com/users/traversaro/following{/other_user}","gists_url":"https://api.github.com/users/traversaro/gists{/gist_id}","starred_url":"https://api.github.com/users/traversaro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/traversaro/subscriptions","organizations_url":"https://api.github.com/users/traversaro/orgs","repos_url":"https://api.github.com/users/traversaro/repos","events_url":"https://api.github.com/users/traversaro/events{/privacy}","received_events_url":"https://api.github.com/users/traversaro/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-10-26T17:01:48Z","updated_at":"2015-11-12T15:00:18Z","closed_at":null,"body":"~~~\r\nMakas-Pro:iDynTree makaveli$ YARP_CLOCK=/clock yarp\r\nyarp: YARP not initialized; create a yarp::os::Network object before using ports\r\nyarp: Anonymous port active at tcp://192.168.36.36:60657\r\nyarp: Receiving input from /clock to /192.168.36.36:60657 using tcp\r\nThis is the YARP network companion.\r\nCall with the argument \"help\" to see a list of ways to use this program.\r\nyarp: Removing input from /clock to /192.168.36.36:60657\r\n~~~\r\n\r\nThis happened because the `NetworkClock` object is created before the `__yarp_is_initialized` variable is increased\r\n(see https://github.com/robotology/yarp/blob/83466b733d89d2f3687542b047bcd5185d3f9299/src/libYARP_OS/src/Network.cpp#L622 ). \r\n\r\nThis issue was introduced by https://github.com/robotology/yarp/pull/609 because before the actual creation of the `NetworkClock` was delay until the clock was actually used, typically long after the `NetworkBase::initMinimum()` method had returned. \r\n\r\ncc @barbalberto "}}