-
-
Notifications
You must be signed in to change notification settings - Fork 15
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-python-object.c: Remove the extra reference on the PyObject file wrappers when adding them to the python list. #64
base: master
Are you sure you want to change the base?
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
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 |
caja-rename will trigger this, or folder-color-caja |
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
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 |
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
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. |
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