psi icon indicating copy to clipboard operation
psi copied to clipboard

checking and fixing broken PsiStore when using PsiStore importer

Open xiangzhi opened this issue 5 years ago • 1 comments

There currently isn't any indication for when I open a broken PsiStore in code. For example, if the store that I open below is broken, the code will just execute with no indication of error.

var store = PsiStore.Create(p, "BodyMergerTest", @"C:\Data\Store\BodyMergerTest");
var input = PsiStore.Open(p, "record-pipeline", @"C:\Data\Store\Recording\record-pipeline.0013");
var bodies1 = input.OpenStream<List<AzureKinectBody>>("azure1.bodies");
bodies1.Write("bodies1", store);
p.Run();

However, when you open the newly saved PsiStore in PsiStudio, the message will now have message creation time of when the code is executed instead of an offset to the PsiStore's originating time. There are also other problems such as other components' message not passing, etc. I traced the problem back to the broken PsiStore have broken streammetas which didn't update the Pipeline's replay time correctly.

The workaround right now is to fix the PsiStore with PsiStudio first then loading it. Since PsiStudio can recognize the problem, I think having PsiStore.Open do the same thing or convey to the programmer there is a problem will be helpful.

xiangzhi avatar Nov 20 '20 16:11 xiangzhi

Thanks for reporting this!

chitsaw avatar Nov 21 '20 06:11 chitsaw