Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenravePlugins: destructors not called (nor Destroy) #59

Open
jgvictores opened this issue Dec 26, 2017 · 4 comments
Open

OpenravePlugins: destructors not called (nor Destroy) #59

jgvictores opened this issue Dec 26, 2017 · 4 comments
Labels
dev:OForceEstimator dev:OYPluginLoader dev:OYWorld upstream Issue coming from outside the scope of roboticslab-uc3m, fix it on that end (outside)

Comments

@jgvictores
Copy link
Member

jgvictores commented Dec 26, 2017

This issue is a follow-up on #47 (comment).

OpenraveYarpPluginLoader via main(): plugin destructor not called, for example when exiting via ^C after calling:

openrave /usr/local/share/teo-openrave-models/openrave/teo/teo.robot.xml --module OpenraveYarpPluginLoader "open --device controlboardwrapper2 --subdevice YarpOpenraveControlboard --robotIndex 0 --allManipulators"

Destructors are called in Python scripts, but note that there RaveDestroy() is called explicity.

@PeterBowman
Copy link
Member

There is a signal handler in the openrave CLI utility and it did call RaveDestroy() (ref). However, it was removed in rdiankov/openrave@cbfd27a for the sake of stability to osg viewer.

@PeterBowman
Copy link
Member

The destructor does get called when I restore RaveDestroy(); and s_penv.reset(); in the signal handler. Perhaps we should file an issue upstream. Meanwhile, I'd suggest closing the viewer window by clicking on the corresponding button, which will indeed call the destructor regardless of those two commented lines.


Stack trace of OpenraveYarpPluginLoader's constructor for debugging purposes (upstream at rdiankov/openrave@b2818fb):

Thread #1 [openrave0.9] 13837 [core: 2] (Suspended : Breakpoint)	
	OpenraveYarpPluginLoader::OpenraveYarpPluginLoader() at OpenraveYarpPluginLoader.cpp:42 0x7fffce4437ca	
	CreateInterfaceValidated() at OpenraveYarpPluginLoader.cpp:351 0x7fffce440d64	
	OpenRAVECreateInterface() at plugin.h:75 0x7fffce440634	
	OpenRAVE::RaveDatabase::Plugin::CreateInterface() at plugindatabase.h:292 0x7fffeef882ec	
	OpenRAVE::RaveDatabase::Create() at plugindatabase.h:602 0x7fffeef8b715	
	OpenRAVE::RaveDatabase::CreateModule() at plugindatabase.h:407 0x7fffeef897b5	
	OpenRAVE::RaveCreateModule() at libopenrave.cpp:1,249 0x7fffeef72f08	
	MainOpenRAVEThread() at openrave.cpp:350 0x42d6e8	
	main() at openrave.cpp:280 0x42c9de	

@PeterBowman PeterBowman added the upstream Issue coming from outside the scope of roboticslab-uc3m, fix it on that end (outside) label Dec 26, 2017
@jgvictores
Copy link
Member Author

jgvictores commented Jan 8, 2018

Yes, closing the viewer window by clicking on the corresponding button works for me too.

BTW, a hack yarpmanager used to have was to catch the CTRL-C signal and simply display a message suggesting closing the viewer window by clicking on the corresponding button.

@jgvictores jgvictores changed the title OpenraveYarpPluginLoader via main(): plugin destructor not called OpenravePlugins: destructors not called (as well as Destroy) Jan 21, 2020
@jgvictores jgvictores changed the title OpenravePlugins: destructors not called (as well as Destroy) OpenravePlugins: destructors not called (nor Destroy) Jan 21, 2020
@PeterBowman
Copy link
Member

PeterBowman commented Jan 30, 2023

@jgvictores there has been a recent (OpenRAVE v0.105.0) overhaul in the plugin system that might have a (hopefully) positive effect on this: rdiankov/openrave#1137.

BTW I'm currently reviewing our own plugins since I can't load them at all (edit: fixed in 25034a3).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dev:OForceEstimator dev:OYPluginLoader dev:OYWorld upstream Issue coming from outside the scope of roboticslab-uc3m, fix it on that end (outside)
Projects
None yet
Development

No branches or pull requests

2 participants