leadedge/Spout2

Spout 2.007 : SpoutSender / SpoutSenderNames crashing

Closed this issue · 5 comments

datee commented

[ Windows 10, x64 application, OpenGL application ]
For some reason i cant get SpoutSender to work. Its always crashing when it tries to set up the sender.

I've tracked the issue down to being accessing m_senders in SpoutSenderNames. So - the spoutSenderNames::UpdateSender function will crash at : m_senders->find(namestring) here :

if (m_senders->find(namestring) == m_senders->end()) {
. The sendername seems ok - im not sure whats going on.

SpoutReceiver works just fine! Anything that could cause this?

That looks OK, but maybe the equality can't be tested like that, such as an example from documentation.

std::unordered_setstd::string::const_iterator foundSender = m_senders.find (namestring);

if ( foundSender == m_senders.end() )

Also elsewhere we have -

auto foundSender = m_senders->find(namestring);

datee commented

Seems there was a stack issue here - though the error was a bit strange i was able to fix it. Thanks!

I am not sure exactly what the problem was or if other people might have the same trouble.

Is the problem isolated to your project or should I do something here. I can clean it up to use
auto foundSender = m_senders->find(namestring);
Also I would check for empty namestring.

datee commented

Hm, no i dont think the equality itself was the issue here, since I had crashes with all kinds of access to m_senders. (and only to m_senders , and m_senders->begin() was the exception point) Hard to say if anyone else will have the same issue -since this unexpected behaviour only happens in certain scenarios when im creating a sender object on the stack. Closed this for now until i can say for sure why the problem occurs.

OK that's good information and I will look into it a little. Of course please come back if anything comes up.