OrebroUniversity / hiqp

GNU General Public License v3.0
9 stars 2 forks source link

Segfault when removing tasks #15

Closed rtkg closed 7 years ago

rtkg commented 7 years ago

Sometimes (though not always) a segfault happens when calling the service to remove all tasks. The function that crashes is TaskManager::getTaskMonitoringData(std::vector<hiqp::TaskMonitoringData, std::allocator >&).

Can it be that for some reason the controller tries to publish the monitoring data although the task doesn't exist any more ...?

neckutrek commented 7 years ago

There are changes made to this on devel that are more recent than what you seem to be running. Could you try the same thing on devel?

rtkg commented 7 years ago

Ah, ok - I'll try after merging devel to my hacking branch

rtkg commented 7 years ago

Nope, error still happens - also observed in Task::update(RobotStatePtr robot_state) when trying to update the task dynamics:

dyn_->update(robot_state, def_->e_, def_->J_)

In this case it wasn't a segfault but "terminate called without an active exception". I think there's an update called on a task which was removed already.

neckutrek commented 7 years ago

I added mutex locka to all service calls. Latest is on devel.

neckutrek commented 7 years ago

Forgot to add it to the update iteration of task manager. Now it's there, see devel.

neckutrek commented 7 years ago

I added more mutex locks as I ran in to the problem again. Now also rendering of primitives, and task monitoring is under mutex locks.

rtkg commented 7 years ago

The mutex slugfest seems to have solved the problem. Close issue ...?

neckutrek commented 7 years ago

Yes close it

Le 14 déc. 2016 22:14, "Robert Krug" notifications@github.com a écrit :

The mutex slugfest seems to have solved the problem. Close issue ...?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/neckutrek/hiqp/issues/15#issuecomment-267158513, or mute the thread https://github.com/notifications/unsubscribe-auth/ADmjhcAJKugy34RiEHjRtUhjCeFzcmAuks5rIFw2gaJpZM4LLr2p .