From: Frederic Suter Date: Thu, 12 Jul 2018 14:34:11 +0000 (+0200) Subject: fix #285 X-Git-Tag: v3_21~478 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b3273ad0ab4c873a63fe6efb046ca6a9525f1f2d fix #285 --- diff --git a/src/instr/instr_platform.cpp b/src/instr/instr_platform.cpp index ff63c714cd..d46659ef6b 100644 --- a/src/instr/instr_platform.cpp +++ b/src/instr/instr_platform.cpp @@ -298,11 +298,12 @@ static void instr_actor_on_creation(simgrid::s4u::ActorPtr actor) root->type_->by_name_or_create("ACTOR_LINK", actor_type, actor_type); root->type_->by_name_or_create("ACTOR_TASK_LINK", actor_type, actor_type); + std::string container_name = instr_pid(actor.get()); actor->on_exit( - [](int status, void* actor) { + [container_name](int status, void* actor) { if (status == SMX_EXIT_FAILURE) // kill means that this actor no longer exists, let's destroy it - simgrid::instr::Container::by_name(instr_pid(static_cast(actor)))->remove_from_parent(); + simgrid::instr::Container::by_name(container_name)->remove_from_parent(); }, actor->get_impl()); }