openframeworks / openFrameworks

openFrameworks is a community-developed cross platform toolkit for creative coding in C++.
http://openframeworks.cc
Other
9.83k stars 2.56k forks source link

[critical bug fix] Osc scope2 #7981

Closed artificiel closed 1 month ago

artificiel commented 1 month ago

replaces #7978 which had a garbled commit

NickHardeman commented 1 month ago

Small thing, but is this commit needed for this PR? https://github.com/openframeworks/openFrameworks/pull/7981/commits/7109a9734be51df3e32681adf6b6318b5aee71f4

artificiel commented 1 month ago

yes I noticed in the GitHub actions some platforms were failing because of missing include (although macOS somehow has it without the explicit include)

NickHardeman commented 1 month ago

Just tested on Windows 10 and VS 2022 using the StressofxOscReceiver test and did not encounter any issues. :)

NickHardeman commented 1 month ago

When I add a ofxOscReceiver rc; to the setup() function, it prints "ready to roll" but hangs. Is this an issue that is addressed in another PR?

#ifdef INSTANTLY_OUT_OF_SCOPE
    ofLogNotice("will hang");
    ofxOscReceiver r;
    ofLogNotice("will hang if thread problem");
    std::unique_ptr<ofxOscReceiver> r = std::make_unique<ofxOscReceiver>();
    r = std::make_unique<ofxOscReceiver>();

    ofxOscReceiver rc;
#endif
    ofLogNotice("ready to roll");
artificiel commented 1 month ago

is that on windows? if so, please try #7979

if not I will try to reproduce.

NickHardeman commented 1 month ago

Yeah on Windows; #7979 fixes it!

artificiel commented 1 month ago

phew! thanks for pulling this together it was a bit tricky to get all parts.

note that once this (#7981 etc) is merged, #7925 should then pass all tests, and contains a ofxTest that has a case for this recent thread stuff.

ofTheo commented 1 month ago

Thanks @artificiel @NickHardeman !!!!