Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Opening a CSV File With Duplicate Header Entries Makes PlotJuggler Crash #524

Closed
Bartimaeus- opened this issue Sep 25, 2021 · 2 comments
Closed
Assignees

Comments

@Bartimaeus-
Copy link
Contributor

Attempting to open a csv file that contains two or more header entries with the same contents causes PlotJuggler to crash without warning

Example header:
timestamp,A,A,C,D

Attached is the command line output when PlotJuggler crashes:

PlotJuggler_CSV_MultipleHeader_Crash_Print_Outputs.txt

Having PlotJuggler check the header for duplicate entries and either aborting the file load with an informational message or appending a sequential number to the end of the duplicate entries to make them unique would be great.

Having non-unique header entries in a csv is definitely not good practice, in this case the csv file that caused this issue was generated from a data analysis software that was exporting separate time columns for each data series:

Time,Data1,Time,Data2,Time,Data3

Multiple time axis from the same csv is definitely not a format that PlotJuggler currently supports, the intent was to ignore the time columns and use the row number as the time axis.

@facontidavide
Copy link
Owner

Nice catch. I will fix it soon.

The correct behavior is, in my opinion, to simply forbid column with identical names (and stop loading such files).

In the example you provided Time,Data1,Time,Data2,Time,Data3, an option could be to append some automatic suffix to identical columns, but i don't think plotjuggler should handle this.

@facontidavide
Copy link
Owner

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants