Bug#712936: iceweasel: can't print to file in the $HOME folder

Vincent Lefevre vincent at vinc17.net
Mon Feb 17 14:32:26 UTC 2014


Control: retitle -1 iceweasel: when printing to file to latest (default) Save folder, tmp PDF file is unlinked without being copied to this folder

On 2014-02-17 14:08:15 +0100, Sylvestre Ledru wrote:
> I cannot reproduce this issue. Do you have more information on the bug ?
> (error in the terminal for example) ?

No errors in the terminal, but the behavior has slightly changed:
the last Save folder is now remembered. If I print to file without
changing the Save folder, everything seems fine, but the PDF file
doesn't appear in this folder. For instance:

0. Default Save folder is A.
1. I print to file, without changing the Save folder.
   -> The file doesn't appear in A.
2. I print to file, changing the Save folder to B.
   -> The file appears in B. OK.
3. I remove the file from B.
4. I print to file, without changing the Save folder.
   -> The file doesn't appear in B.
5. I print to file, changing the Save folder to A.
   -> The file appears in A. OK.
6. I remove the file from A.
7. I print to file, without changing the Save folder.
   -> The file doesn't appear in A.

I'm wondering whether this is a bug in iceweasel, because there
was no major upgrade recently. Perhaps a bug in some gtk library
(the one that provides the print feature?). I'm wondering whether
I could test with another gtk2 application that uses the print
feature.

This may be a problem related to how the Save folder is remembered.
Perhaps it is OK in the dialog box, but it is not remembered
correctly for the save operation.

> Are you sure this is not trigger by one of your extensions ?

I've just done the test with a new profile (so, no extensions except
DOM Inspector), and I can still reproduce the bug.

I can see a difference in the strace -f output. Below, the "write"
corresponds to the generation of the PDF file, apparently in some
temporary file under /tmp (see 3rd line of each trace).

When I changed the Save folder to home:

[...]
1551  write(77, "%EOF\n", 5)            = 5
1551  close(77)                         = 0
1551  open("/tmp/G2KGBX.tmp", O_RDONLY) = 77
1551  fstat(77, {st_mode=S_IFREG|0600, st_size=68049, ...}) = 0
1551  lseek(77, 0, SEEK_SET)            = 0
1551  open("/home/vlefevre/mozilla.pdf", O_WRONLY|O_CREAT|O_EXCL, 0666) = 78
[...]

When I do not change the Save folder:

[...]
1476  write(42, "%EOF\n", 5)            = 5
1476  close(42)                         = 0
1476  open("/tmp/CCRDBX.tmp", O_RDONLY) = 42
1476  fstat(42, {st_mode=S_IFREG|0600, st_size=70156, ...}) = 0
1476  lseek(42, 0, SEEK_SET)            = 0
1476  stat("/tmp/CCRDBX.tmp", {st_mode=S_IFREG|0600, st_size=70156, ...}) = 0
1476  lstat("/tmp/CCRDBX.tmp", {st_mode=S_IFREG|0600, st_size=70156, ...}) = 0
1476  unlink("/tmp/CCRDBX.tmp")         = 0
1476  close(42)                         = 0
[...]

i.e. the temporary PDF file is removed without an attempt to copy
it to the Save folder first!

-- 
Vincent Lefèvre <vincent at vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)



More information about the pkg-mozilla-maintainers mailing list