[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUG] Viewing large images
- From: Boruch Baum <boruch_baum@xxxxxxx>
- Date: Fri, 23 Feb 2018 10:03:41 -0500
- X-ml-name: emacs-w3m
- X-mail-count: 12926
I seem to have hit a dead end trying to figure out the reason for this
"Sometimes" images fail to load in an external program when running
`w3m-lnum-view-image' (bound to `I' or the combination `L I').
Emacs 25.2 nox in debian
SUSPICIONS AND FINDINGS
1] It seems to be an issue loosely related to the size of the image.
2] I suspect the issue is related to something not waiting for an
asynchronous operation to complete.
3] When this bug happens, a file named `fd:6' is created in my ~/.w3m
directory. When the file is renamed to `foo.jpg', it is revealed to
be a legitimate image file, and can be opened in a viewer.
3.1] The filename seems to be a reference to a 'file descriptor',
maybe because at the time of the completion of the download,
the w3m temporary file name had been lost or unset.
3.2] Sometimes, while testing, these `fd' files will accumulate with
4] Function `w3m-external-view-file' includes a feature to delete a
downloaded file. When that is disabled and the bug is then tested, a
file with an image name is created ~/.w3m, however it is not a
legitimate image file, and is much smaller than the `fd:6' file.
4.1] To do this in the latest version of w3m.el, replace line 7439:
"(delete-file file))" with "t);(delete-file file))".
Compare the results of the main image links at following urls
Url #1 produces a very large `fd:6' "image" of 658k, which NEVER
displays using the w3m command.
Url #2 produces an 'fd:6' image file of 153K and a w3meXXXXX.jpg
temporary file of 29k. SOMETIMES this displays using the w3m command.
URL #3 ALWAYS displays using the w3m command. It produces only a single
57k file in ~/.w3m, in the form w3meXXXXX.jpg
Since this may be a timing issue, your internet speed may affect your
ability to reproduce the bug with the listed urls. If you can't, try to
find some huge image file, and test with that.
CA45 09B5 5351 7C11 A9D1 7286 0036 9E45 1595 8BC0