Closed
Bug 111604
Opened 23 years ago
Closed 23 years ago
Print to a file problem
Categories
(Core :: Printing: Output, defect)
Tracking
()
People
(Reporter: fleury, Assigned: roland.mainz)
Details
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.6) Gecko/20011122
BuildID: 0.9.6
When I try to print a web page to a Postscript page I get an error which say:
There was a problem printing. The output file could not be openend.
The only way to workaround this one is to click on "Choose a file" a follow the
procedure.
Reproducible: Always
Steps to Reproduce:
1.Try to print by any way (by menu, button on the tool bar, ...)
2.Click on "To a file"
3.Click on "Print"
Actual Results: It raise an erro windows with:
There was a problem printing. The output file could not be openend.
Expected Results: Print the postscript version of this page.
Actually, it works perfectly if you choose to go through "Choose a file".
->printing
Assignee: asa → dcone
Component: Browser-General → Printing
QA Contact: doronr → sujay
Comment 2•23 years ago
|
||
do you type in a filename before clicking ok? Or do you just select the file
checkbox and click ok?
Reporter | ||
Comment 3•23 years ago
|
||
Both lead to the same error ! :-/
Comment 4•23 years ago
|
||
Could you try typing in a fully qualified path in the filename box? Like
"/tmp/mozilla.ps"?
I bet that box is defaulting to mozilla's current working directory (ie the
directory the mozilla executable lives in) and you don't have write permissions
to that directory...
Comment 5•23 years ago
|
||
And yes, that would seem to be the problem. Duplicate of "saving mozilla.ps in
install directory is bad"
*** This bug has been marked as a duplicate of 93688 ***
Status: UNCONFIRMED → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Reporter | ||
Comment 6•23 years ago
|
||
Apparently this is could be the problem.
But, when I am clicking on "Choose a file...", it appear to be located
in my home directory.
I just read #93688 and I think this is related.
But I really can find out where mozilla is trying to write this file and how to
change this !!
An strace on this particular problem give:
gettimeofday({1006604032, 854014}, NULL) = 0
gettimeofday({1006604032, 854112}, NULL) = 0
gettimeofday({1006604032, 863412}, NULL) = 0
gettimeofday({1006604032, 863522}, NULL) = 0
old_mmap(0x41f29000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x41f29000
old_mmap(0x41f2a000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x41f2a000
time([1006604033]) = 1006604033
time(NULL) = 1006604033
open("mozilla.ps", O_WRONLY|O_CREAT|O_TRUNC, 0666) = -1 EACCES (Permission denied)
pipe([33, 34]) = 0
fcntl64(33, F_GETFL) = 0 (flags O_RDONLY)
fcntl64(33, F_SETFL, O_RDONLY|O_NONBLOCK) = 0
fcntl64(34, F_GETFL)= 0x1 (flags O_WRONLY)
fcntl64(34, F_SETFL, O_WRONLY|O_NONBLOCK) = 0
uname({sys="Linux", node="yggdrasil", ...}) = 0
But open("mozilla.ps", O_WRONLY|O_CREAT|O_TRUNC, 0666) doesn't say WHERE must be
located mozilla.ps ! :-/
Any clue ????
Comment 7•23 years ago
|
||
Mozilla runs with the install directory as the corrent directory. So that would
be trying to open "/usr/local/bin/mozilla.ps" or something along those lines
(depending on where you have it installed).
The problem is that we should default to the user's home directory instead.
This should be done in the near future.
Comment 8•23 years ago
|
||
Um.... reopening. This is a different problem. I couldn't reproduce it with a
nightly, but it's broken in my cvs build. The problem is that no printer is
selected (or selectable) in the print dialog.
Status: RESOLVED → UNCONFIRMED
Resolution: DUPLICATE → ---
Comment 9•23 years ago
|
||
Over to Roland. This bug is _not_ present in the nightly. It _was_ present in
my cvs build. Removing component.reg fixed it. So I'm not sure this is a bug
(reporter, try deleting dist/bin/component.reg in your mozilla/ directory).
Assignee: dcone → Roland.Mainz
Severity: normal → major
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Comment 10•23 years ago
|
||
Now I am confused.
Reporter, what do you want:
a) Print to a file
OR
b) print to printer (via lpr)
?
Reporter | ||
Comment 11•23 years ago
|
||
I want to print to a file.
The error was probably the right on the default directory.
So, this bug is duplicate. But if you found another bug with this, it's perfect
with me ! :-)
Comment 12•23 years ago
|
||
So.... I suck. :)
Roland's patch _did_ cause similar symptoms in an opt build but that landed
_after_ 0.9.6 so could not be an issue here.
Roland: the problem is that if _any_ error occurs with printing (eg trying to
write to a readonly dir) the error message is that the printer is not available.
Marking duplicate again.... And I've attached a patch to the directory bug. My
apologies for the mess...
*** This bug has been marked as a duplicate of 93688 ***
Status: NEW → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → DUPLICATE
Assignee | ||
Comment 13•23 years ago
|
||
> Roland: the problem is that if _any_ error occurs with printing (eg trying to
> write to a readonly dir) the error message is that the printer is not
> available.
I know that. I added the new "XP print error dialog" long ago - but I did not
change that stupid error checking within the PostScript module because it would
require more testing (incl. all the weired platforms we support - like VMS/BeOS
etc.).
Currently we have the folloing error codes spceifc for the "print to file" task:
-- snip --
NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE
NS_ERROR_GFX_PRINTER_FILE_IO_ERROR
-- snip --
Feel free to file a bug against me for that issue... I'll slaugther that one...
:)
AFAIK I can add more specific sub-error codes to
NS_ERROR_GFX_PRINTER_COULD_NOT_OPEN_FILE - like:
- file already exists
- parent dir write protected (or "no permissions" ?)
- ... more items ?!
You need to log in
before you can comment on or make changes to this bug.
Description
•