[Bug 499] New: Segmentation fault in Deployment component

For more infomation about this bug, visit
Summary: Segmentation fault in Deployment component
Product: OCL
Version: trunk
Platform: All
OS/Version: All
Status: NEW
Severity: critical
Priority: P2
Component: Deployment
AssignedTo: orocos-dev [..] ...
ReportedBy: francois [..] ...
CC: orocos-dev [..] ...
Estimated Hours: 0.0

By accident I discovered the following fault:

fcauwe@Titan:~/Project/orocos/deploy$ deployer-gnulinux
Switched to : Deployer

This console reader allows you to browse and manipulate TaskContexts.
You can type in a command, event, method, expression or change variables.
(type 'help' for instructions)
TAB completion and HISTORY is available ('bash' like)

In Task Deployer[S]. (Status of last Command : none )
(type 'ls' for context info) :cd engine.
engine.engine engine.marshalling engine.scripting engine.this
(type 'ls' for context info) :cd engine.engine.Segmentatiefout (core dumped)
fcauwe@Titan:~/Project/orocos/deploy$

How to reproduce:

start deployer-gnulinux
type: cd engine.engine.(tab)

[Bug 499] Segmentation fault in Deployment component

For more infomation about this bug, visit

Peter Soetens
<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED

--- Comment #2 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-02-05 10:52:08 ---
Fix applied on trunk/ocl.

$ svn di
Index: TaskBrowser.cpp
===================================================================
--- TaskBrowser.cpp (revision 28904)
+++ TaskBrowser.cpp (working copy)
@@ -196,6 +196,10 @@
if ( startpos == std::string::npos || startpos+1 ==
line.length() || i->find( line.substr(startpos+1)) == 0 )
completes.push_back( path + *i );
}
+ // Stop here if 'cd'
+ if (line.find(std::string("cd ")) == 0)
+ return;
+ // Add objects for 'ls'.
v = peer->getObjectList();
for (TaskContext::PeerList::iterator i = v.begin(); i != v.end();
++i) {
std::string path;
sspr@lt00129:~/src/Orocos/trunk/ocl/taskbrowser
$ svn ci -m"Fixes bug #499: Segmentation fault in Deployment component. Do not
try to complete objects when using 'cd'."
Sending taskbrowser/TaskBrowser.cpp
Transmitting file data .
Committed revision 28910.

[Bug 499] Segmentation fault in Deployment component

For more infomation about this bug, visit

Peter Soetens
<peter [dot] soetens [..] ...> changed:

What |Removed |Added
--------------------------------------------------------------------------
Status|NEW |ASSIGNED
Component|Deployment |TaskBrowser
CC| |peter [dot] soetens [..] ...
Target Milestone|--- |1.4.1

--- Comment #1 from Peter Soetens
<peter [dot] soetens [..] ...> 2008-01-22 11:20:33 ---
Ok. I can reproduce this. It's a bug in the tab completion of the TaskBrowser
component.