- xbt_assert(t_simdata->isused == 0,
- "This task is still being used somewhere else. You cannot send it now. Go fix your code!");
+ if (t_simdata->isused != 0) {
+ if (msg_global->multiple_backtraces){
+ XBT_ERROR("This task is already used in there:");
+ xbt_backtrace_display(t_simdata->isused);
+ THROWF(unknown_error, 0, "And you try to reuse it from here. You cannot send it now. Go fix your code!");
+ } else {
+ THROWF(unknown_error, 0, "This task is still being used somewhere else. You cannot send it now. Go fix your code! (use --cfg=msg/multiple_backtraces:on to get the backtrace of the other process)");
+ }
+ }