Remotery: rmt_UnbindOpenGL blocks indefinitely

after creating Remotery and OpenGL context on the same thread, and issuing rmt_BindOpenGL on the same thread. Placing a call to rmt_UnbindOpenGL before shutting down Remotery blocks indefnintely in Remotery_BlockingDeleteSampleTree because of the following code:

            // Wait around until the Remotery server thread has sent all sample trees
            // of this type to the client
            while (sample_tree->allocator->nb_inuse > 1)
                msSleep(1);

The only way to get the application to close is to load up the Remotery web console in a webbrowser and wait for all the events to be sent to it. Is there a way to “jump the gun” and terminate the application even if there is samples pending?

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 53

Commits related to this issue

Most upvoted comments

EDIT: I think THIS particular issue is a build issue. When I built remotery into a dll shutdown crashes, when i build my project statically it works. So I blame this on my build system.

Remotery uses a global variable to keep the public API clean. When you call rmt_CreateGlobalInstance from your main program you must propagate the returned Remotery object to any DLLs using rmt_SetGlobalInstance.