View Issue Details

IDProjectCategoryView StatusLast Update
0000063FreeCADBugpublic2010-04-10 09:58
Reporterwmayer Assigned ToJriegel 
PrioritynormalSeveritymajorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9 
Summary0000063: Crash in Robot module
DescriptionWhen creating a robot object and a trajectory without filling up, select both and run the simulation the app crashes.
TagsNo tags attached.
FreeCAD Information

Activities

Jriegel

2010-01-08 16:46

administrator   ~0000129

I use it at the moment all the time... I need more information.
You have the latest trunk?

wmayer

2010-01-08 20:29

administrator   ~0000130

1. New document
2. Insert Robots > Kuka IR500
3. Create trajectory
4. Select both and run Simulate a trajectory

=> Crash in Trajectory_Composite::Pos() because "traj = vt[vt.size()-1];" is wrong if vt is empty.

The methods
* Trajectory::getLength
* Trajectory::getDuration
* Trajectory::getVelocity
have probably the same problem.

Jriegel

2010-01-09 08:25

administrator   ~0000131

Ahh,
I never tried to simulate a empty trajectory ;)

I fix it!
Thanks

wmayer

2010-01-09 09:25

administrator   ~0000132

So far there exists no method to query the size of "vt" but checking the path length with pcTrajectory->GetPath()->PathLength() does pretty much the same. So, if the length is 0 an empty placement can be returned.

The implementation can look like this:

Placement Trajectory::getPosition(double time)const
{
    if (pcTrajectory && pcTrajectory->GetPath()->PathLength() > 0.0)
        return Placement(toPlacement(pcTrajectory->Pos(time)));
    else
        return Placement();
}

The same applies to the other questionable methods I have listed.

Jriegel

2010-01-12 18:35

administrator   ~0000144

fixed with 2851

wmayer

2010-01-17 12:29

administrator   ~0000150

This bug is still not properly fixed. When inserting exact one position the crash sill occurs.

Jriegel

2010-04-08 09:44

administrator   ~0000200

fixed with 3079

Issue History

Date Modified Username Field Change
2010-01-08 16:44 wmayer New Issue
2010-01-08 16:44 wmayer Status new => assigned
2010-01-08 16:44 wmayer Assigned To => Jriegel
2010-01-08 16:46 Jriegel Note Added: 0000129
2010-01-08 16:46 Jriegel Status assigned => feedback
2010-01-08 20:29 wmayer Note Added: 0000130
2010-01-09 08:25 Jriegel Note Added: 0000131
2010-01-09 09:25 wmayer Note Added: 0000132
2010-01-12 18:35 Jriegel Note Added: 0000144
2010-01-12 18:35 Jriegel Status feedback => closed
2010-01-12 18:35 Jriegel Resolution open => fixed
2010-01-17 12:29 wmayer Note Added: 0000150
2010-01-17 12:29 wmayer Status closed => assigned
2010-01-17 12:29 wmayer Resolution fixed => reopened
2010-04-08 09:44 Jriegel Note Added: 0000200
2010-04-08 09:44 Jriegel Status assigned => resolved
2010-04-08 09:44 Jriegel Resolution reopened => fixed
2010-04-10 09:58 wmayer Status resolved => closed