Maybe a bug of no corresponding ofRemoveListener for ofURLFileLoaderImpl::start()

Author: zhangewCreated Jan 22, 2026Updated Jan 22, 2026

Hi,

I noticed an runtime exception that raised in ofURLFileLoaderImpl::update(), after I finished a correct downloading process and deleted the ofURLFileLoader instance in my object.

It seems that the framework was trying to callback the handler(ofURLFileLoaderImpl::update) which has already gone.

So I checked the source code of ofURLFileLoader.cpp, and noticed there is: void ofURLFileLoaderImpl::start() { if (!isThreadRunning()) { ofAddListener(ofEvents().update, this, &ofURLFileLoaderImpl::update); startThread(); } }

But there isn't corresponding ofRemoveListener() anywhere.

And it seems a bug? So I've tried using ofURLFileLoader as singleton, and no error occurs, and it can also explains the above source code, the callback does always exist.

Sorry for no call stack info and I have no proper environment for testing the above guess, but if the info helps, it might be fixed after the thread ends?

Thanks a lot!

Source: openframeworks/openFrameworks