EmotiBit / ofxEmotiBit

OpenFrameworks library and examples for the EmotiBit
MIT License
33 stars 7 forks source link

EmotiBitWiFiHost::getDiscoveredEmotiBits() can generate an access violation #231

Open produceconsumerobot opened 4 months ago

produceconsumerobot commented 4 months ago

Describe the bug EmotiBitWiFiHost::getDiscoveredEmotiBits() can generate an access violation

EmotiBitOscilloscope_debug.exe!std::basic_string<char,std::char_traits,std::allocator >::_Construct_lv_contents(const std::basic_string<char,std::char_traits,std::allocator > & _Right) Line 2399 C++ EmotiBitOscilloscope_debug.exe!std::basic_string<char,std::char_traits,std::allocator >::basic_string<char,std::char_traits,std::allocator >(const std::basic_string<char,std::char_traits,std::allocator > & _Right) Line 2131 C++ EmotiBitOscilloscope_debug.exe!std::pair<std::basic_string<char,std::char_traits,std::allocator > const ,EmotibitInfo>::pair<std::basic_string<char,std::char_traits,std::allocator > const ,EmotibitInfo>(const std::pair<std::basic_string<char,std::char_traits,std::allocator > const ,EmotibitInfo> & __that) Line 914 C++ [External Code] EmotiBitOscilloscope_debug.exe!EmotiBitWiFiHost::getdiscoveredEmotibits() Line 809 C++ EmotiBitOscilloscope_debug.exe!ofApp::updateDeviceList() Line 671 C++ EmotiBitOscilloscope_debug.exe!ofApp::updateMenuButtons() Line 1630 C++ EmotiBitOscilloscope_debug.exe!ofApp::update() Line 78 C++

image

Expected behavior no crashy crash

Additional details

To Reproduce Steps to reproduce the behavior:

  1. Let the oscilloscope run data from VS compiled for debug
  2. Get a coffee/beer/kombucha

Suggested Solution Consider adding a mutex to _discoveredEmotibits changes