Skip to content
Snippets Groups Projects
Commit c4f835b8 authored by MelanieCarriere's avatar MelanieCarriere
Browse files

[test] Fix the stream test

The reader test all frames of a pcap (even the first and the last one by enabling the corresponding option)
So to generate the data, you also need to check "Chow first and last frame options"
In case there is no uncomplete last frame (for a truncated pcap for example) this option create an empty frame at the end of the pcap.

So when you test such a data in stream mode there is a segfault at the last split frame :
There is no point in the last frame,
so a simple call of "split frame" does not push back the current frame in the lidarPacketInterpreter frame buffer
because there is a check on the number of point.

The only way to avoid this segfault is by forcing the splitFrame.
So an empty frame can be push back to the lidarPacketInterpreter frame buffer
parent 0721fc27
No related branches found
No related tags found
1 merge request!137Fix test stream and remove warnings
......@@ -575,7 +575,7 @@ int SendAndTestAllFrames(vtkLidarStream *stream, vtkLidarPacketInterpreter* inte
// check for a potential uncomplete last frame.
if (idFrame < referenceFilesList.size())
{
interpreter->SplitFrame();
interpreter->SplitFrame(true);
vtkPolyData* currentFrame = interpreter->GetLastFrameAvailable();
vtkPolyData* currentReference = GetCurrentReference(referenceFilesList, idFrame);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment