caja-python-object.c: Remove the extra reference on the PyObject file wrappers when adding them to the python list.#64
Open
mtwebster wants to merge 1 commit intomate-desktop:masterfrom
Conversation
file wrappers when adding them to the python list. PyObjects start with a refcount of 1. Adding them to a PyList adds a second - which gets removes during the list's destruction. The additional ref was keeping its associated CajaFile from ever being finalized. Steps to reproduce problem: 1) Install python-caja and some python MenuProvider extension. 2) Create a folder with a couple of image files inside. Be sure to allow thumbs to generate. 3) Enter the folder, select one or more files (so menus are generated). De-select and leave the folder (but do not close caja). If you were to watch for the files' finalize to run, you'd notice it does not. 4) touch or otherwise modify one of the image files from a terminal 5) Re-enter the folder in caja. 6) See that loading runs forever, modified file(s) never display. Note: even if you only modify one file, it could cause all of the files to fail to load, depending on their order during enumeration. When no more views are displaying a file, that file should be finalized. When it's not it ends up in an undefined state, as it has no monitors flag it as needing to be updated
Member
|
What would be usable extensions for this? I am totally unfamiliar with most of the python extensions (I have just one and don't have problems with image files) but this sounds nasty |
Author
|
caja-rename will trigger this, or folder-color-caja |
mtwebster
added a commit
to mtwebster/caja
that referenced
this pull request
May 16, 2021
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
pushed a commit
to mate-desktop/caja
that referenced
this pull request
May 19, 2021
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
Member
|
Note that mate-desktop/caja#1528 fixed a related problem with thumbnails not loading after video files were rendered to the desktop, a job which takes several minutes. Those files are not readable until they are done, thus delaying thumbnail generation and usually blocking creation of the thumbnail prior to that |
raveit65
pushed a commit
to mate-desktop/caja
that referenced
this pull request
Jul 21, 2022
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
Member
|
What is the status of this? I don't have anything installed that could be used to test it and don't know enough about python to evaluate the code. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PyObjects start with a refcount of 1. Adding them to a PyList adds
a second - which gets removes during the list's destruction. The
additional ref was keeping its associated CajaFile from ever being
finalized.
Steps to reproduce problem:
allow thumbs to generate.
generated). De-select and leave the folder (but do not close
caja). If you were to watch for the files' finalize to run,
you'd notice it does not.
display. Note: even if you only modify one file, it could cause
all of the files to fail to load, depending on their order during
enumeration.
When no more views are displaying a file, that file should be finalized.
When it's not it ends up in an undefined state, as it has no monitors
flag it as needing to be updated