debugging trace_free crash