Last-minute events coming through the engine could cause the goroutine iterating over engineEvents to write to displayEvents after it has already been closed by the main goroutine.
WriteString
tools/GenWriter