Hi Gabriel,
First a question: what operating system are you using?
Second question: when your shared library gets unloaded, do any other
shared library's get unloaded as well? On windows I can imagines your
dll being linked to an osg part that will install callbacks in the
scengraph, (osgAnimation.dll as a possible example), while your main
application has no such link. On unloading the dependencies can be
unloaded as well, causing the callback to call an invalid memory location.
Regards, Laurens.