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

caja-directory.c: Fix memory leak. #1528

Merged
merged 1 commit into from
May 19, 2021

Conversation

mtwebster
Copy link
Contributor

When creating a new file (using a template, for instance), file->
details->is_added could potentially be FALSE, and cause this file to
not be finalized along with other files if the view directory is
destroyed.

This can cause issues when re-entering that directory, with the file
being in an undefined state, and could prevent the view from fully
loading the location (this is identical behavior to that described
in mate-desktop/python-caja#64.

To reproduce:

  • Create an svg file and save in ~/Templates.
  • Right-click, Create document-> svg file, name it whatever.
  • Navigate out of the folder.
  • Modify the file in a visible manner.
  • Re-enter the folder, note that it never finishes loading.

Ref:
linuxmint/nemo#2736

When creating a new file (using a template, for instance), file->
details->is_added could potentially be FALSE, and cause this file to
not be finalized along with other files if the view directory is
destroyed.

This can cause issues when re-entering that directory, with the file
being in an undefined state, and could prevent the view from fully
loading the location (this is identical behavior to that described
in mate-desktop/python-caja#64.

To reproduce:
- Create an svg file and save in ~/Templates.
- Right-click, Create document-> svg file, name it whatever.
- Navigate out of the folder.
- Modify the file in a visible manner.
- Re-enter the folder, note that it never finishes loading.

Ref:
linuxmint/nemo#2736
@lukefromdc
Copy link
Member

When cropping an image to a different shape with gimp and having navigated out of the directory, it loaded right back up when I navigated back into that directory. I don't have Templates so i used another, though that should have no effect. Thus I could not duplicate the bug

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Builds and runs fine, no problem with reloading the thumbnail after changing the file contents, though that worked with master as well on my system. Someone who can duplicate the issue should test this

@lukefromdc
Copy link
Member

This may have fixed another similar problem, which may have been an instance of the test case: when rendering out a video file to the desktop or doing another job where a file is not readable until an extended job is done (including some transfers to flash media), the thumbnail would never finish loading and hang on the "clock" thumbnail. With this installed, the thumbnail came up as soon as a test video render job finished. Thus we now have duplication of the issue and this fixed it.

@lukefromdc
Copy link
Member

Will merge this as it works and nobody else seems to be paying attention to it

@lukefromdc
Copy link
Member

Travis error is same Fedora problem

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

Successfully merging this pull request may close these issues.

2 participants