Quantcast
Channel: bugs, errors - openFrameworks
Viewing all articles
Browse latest Browse all 636

"No matching overloaded function" in ofEvent.h because I try to call ofRegisterURLNotification?

$
0
0

@Drazinut wrote:

Why does adding ofRegisterURLNotification(this) to my ofApp::setup() cause ofEvent.h to fail with “no matching overloaded function”?

I’m trying to follow the instructions for receiving urlResponse events as shown in the only example I’ve found, here: https://openframeworks.cc/documentation/utils/ofURLFileLoader/#show_ofLoadURLAsync

I’ve followed all the steps, and am getting a compilation error in ofEvent.h line 535:
Error C2672 'ofEvent<ofHttpResponse,std::recursive_mutex>::addNoToken': no matching overloaded function found

The error goes away if I don’t do step 3: ofRegisterURLNotification(this); in ofApp::setup. However then when I actually make an Async call, the call happens but after a second or two I get an unhandled exception trying to create an event to an unallocated address.

I am trying to place an HTTP PUT with ofURLFileLoader::handleRequestAsync(), but so far it always throws an exception after doing the PUT, I’m guessing trying to fire an event that isn’t registered?

That is, I get:

Exception thrown: read access violation.
_Mtx_internal_imp_t::_get_cs(...)-> was 0xDDDDDDDD.

At mutex.c line 99.

Which further up the stack is in ofEvent.h line 479, higher up same file line 97, i.e. Function::notify()

My program manages to make an HTTP PUT just fine with nearly identical code using ofURLFileLoader::handleRequest() … but I don’t want to block until the requests I’m making return.

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 636

Trending Articles