Closed growlitheharpo closed 2 years ago
Thanks for the detailed analysis of the problem! I don't think that ISavable part is necessary, but I'd be happy to merge the fix with the Dispose call if you could separate this change out.
Thanks for the detailed analysis of the problem! I don't think that ISavable part is necessary, but I'd be happy to merge the fix with the Dispose call if you could separate this change out.
Done in the latest version 🙂
When using the "Report a bug" feature targeting a network storage, we were experiencing file corruption issues when loading back the saved capture:
When debugging the issue, I noticed that the files saved out manually using the Save button vs the file from the Report Bug button were different sizes:
I eventually found that this was caused by not calling
Dispose
on theGZipStream
created byCapture.Create
. Reading the documentation onGZipStream
, it's not totally clear why this becomes necessary, but the issue is a solid repro without theDispose
and I have not been able to repro with it.~Before finding this issue, I also found that the Save button leads to
TimeLine.Save
/TimeLine.ForEachResponse
which appears as if it could save out more data that may be missed inTaskTrackerViewModel.SetGroup
. My fix is to introduce a new interface,ISavable
. TheFrameGroup
now has a reference back to theTimeLine
as an ISavable and this is used to save the capture if available. I didn't confirm this was a "real" issue, so I can drop this part of the change if desired. If nothing else, it ensures that the two methods of saving follow a more similar code path.~ Dropped with b6ae6f1