Deployment component crash

Hi,

I don't know if anyone else have got this issue.
In the DeploymentComponents the program crash if this sequence is done.

dc.loadComponents("filename.xml")
dc.unloadComponents();
dc.loadComponents("filename.xml")
dc.configureComponents();

The crash seems related to Port connection...

Regards

Deployment component crash

On Wednesday 22 October 2008 18:21:02 faconti [..] ... wrote:
> Hi,
>
> I don't know if anyone else have got this issue.
> In the DeploymentComponents the program crash if this sequence is done.
>
> dc.loadComponents("filename.xml")
> dc.unloadComponents();
> dc.loadComponents("filename.xml")
> dc.configureComponents();
>
> The crash seems related to Port connection...

Could reproduce it. The workaround is to do dc.clearConfigurations() after
dc.unloadComponents().

I'm looking into fixing it...

Peter

Deployment component crash

On Wednesday 22 October 2008 18:57:56 Davide Faconti wrote:
> Thank you very much Peter,
>
> Yes, I have got to the same conclusion. The fault was related to cleaning
> up *root* and *conmap.*
>
> I don't know the philosophy that you apply, but I believe that
> clearConfiguration() does not make sense as stand alone function: whenever
> you unload everything, there is not reason to keep old pointers in conmap
> and old information in root.

Yes you are correct. It is in normal usage quite useless. In the best case, it
just frees up some memory after the application is running, but it will not
allow the application to reconfigure... It would indeed be better to
deprecate and remove it.

>
> By the way, I am implementing the following functions:
>
> - stopComponent(comp_name)
> - cleanupComponent(comp_name)
> - kickOutComponent(comp_name)
>
> unloadComponent(comp_name) already exist but it needs the same fix that
> will apply to unloadComponents() . In this case it will be less trivial,
> since wecan not delete the entire *root* and *conmap.*
>
> I will submit the change to you when they have been tested, if you don't
> mind.

I've attached a patch that fixes this bug cleanly[*] for me. Let me know if
this is what you had in mind...

Peter

[*] Only limited tested though... :-)

Deployment component crash

On Wednesday 22 October 2008 18:21:02 faconti [..] ... wrote:
> Hi,
>
> I don't know if anyone else have got this issue.
> In the DeploymentComponents the program crash if this sequence is done.
>
> dc.loadComponents("filename.xml")
> dc.unloadComponents();
> dc.loadComponents("filename.xml")
> dc.configureComponents();
>
> The crash seems related to Port connection...

It shouldn't crash. If you could pass the -ldebug option and re-do the test
from gdb, mail the backtrace and orocos.log file and it'll be fixed in a
minute.

gdb /usr/local/bin/deployer-gnulinux
(gdb) run -ldebug
... trigger crash
(gdb) bt
... backtrace is printed.

Peter