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

Layout Files Can Cause Loading of Unused Data Files (may lead to crash) #516

Closed
Bartimaeus- opened this issue Sep 11, 2021 · 1 comment
Closed
Assignees

Comments

@Bartimaeus-
Copy link
Contributor

(PlotJuggler 3.3.0 on Windows 10)

Not a showstopping bug but reporting anyways:

Layout files that have the "Save data source" option selected may include files that were previously unloaded when the Layout file was created, and user input on a dialog window can cause PlotJuggler to crash when loading the layout file

How this was discovered:
-Have a Plotjuggler window open from a previous session with data loaded
-Load new data file and have PlotJuggler remove the previous data
-Set up layout for new data and save the Layout file with the "Save data source" option selected ("save custom transformations" also selected in my case but suspect this isn't relevant)
The clip below shows an example of creating the layout file (also see the note below)

PlotJugglerCreateMultiStepLayout.mp4

Note: I tried doing this several different ways and in one attempt (I think if the first file is loaded but you don't do anything with the data before loading the second) the layout file will not include the first file. The example video here may be such a case. I know it is repeatable if you load the first file, create a custom timeseries and plot it and then load the second file and unload the old data.

When the layout file is later loaded, the original file that was open is loaded, and then the second file is loaded and the user is given the following prompt:
image

PlotJuggler will crash if the user selects "No" in this dialog window:

PlotJugglerMultiFileDontUnload.mp4

Selecting "Yes" to remove the previously loaded data will let the second data file load without issue

PlotJugglerMultiFileUnload.mp4

Interestingly the layout file contains multiple files that had been previously loaded during the session, but only the last one to have been unloaded seems to get loaded when opening the layout file in PlotJuggler
image

It seems like the inclusion of files that have been unloaded doesn't serve a functional purpose and is undesirable behavior (this could lead to leaking sensitive information by including file info that was not intended to be shared)

Example files attached:
LayoutMultiFileLoadExample.zip

@facontidavide facontidavide self-assigned this Sep 19, 2021
facontidavide added a commit that referenced this issue Sep 19, 2021
- Don't show more than once "Do you want to delete old data" when
loading multiple files.
- Correctly clean all the data, including _loaded_datafiles
@facontidavide
Copy link
Owner

I just pushed a change that will clean correctly the list of previously loaded files.

Let me know if you have further problems

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