Last Comment Bug 351944 - Printing has issues on Linux
: Printing has issues on Linux
Status: RESOLVED WORKSFORME
:
Product: Calendar
Classification: Client Software
Component: Printing (show other bugs)
: Trunk
: x86 Linux
: -- normal with 1 vote (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-09-09 08:12 PDT by Sebastian Schwieger
Modified: 2007-04-13 10:31 PDT (History)
4 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments

Description Sebastian Schwieger 2006-09-09 08:12:13 PDT
When creating a fresh profile I have the following error when trying to print

Error: uncaught exception: [Exception... "Component returned failure code: 0x80004005 (NS_ERROR_FAILURE) [nsIDOMWindowInternal.outerWidth]"  nsresult: "0x80004005 (NS_ERROR_FAILURE)"  location: "JS frame :: chrome://global/content/dialogOverlay.js :: moveToAlertPosition :: line 70"  data: no]

additionally there is a dialog "Printing" (Progress: Preparing...) but nothing happens.

After restart of Sunbird this is not happening.

Steps to reproduce:

1. Create fresh profile
2. create some events (not neccesarry)
3. Go to Print, dont enter title, press print
4. Choose printer (this happens with real printer (CUPS driver) and postscript printer), press print

Results: Dialog (Printing) and Error message. No printing

Note: This is also in error console (only first start of profile):
Failed to load XPCOM component: /home/Schwieger/bin/sunbird20060909/components/libimgicon.so

done using: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060909 Calendar/0.3a2+
Comment 1 Sebastian Schwieger 2006-09-09 10:27:25 PDT
Additional information: 
1. trying to print for a second time right after the error occured (without restart) gives the following dialog: "You cannot print while in print preview", no additional error message in the console.

2. the error needs to occur once. Just restarting the application with clean profile is not enough. The error occurs on the first try to print. On the second try (after restart) printing works. 
Comment 2 Matthew (lilmatt) Willis 2006-09-14 15:15:39 PDT
Can we find out if this is:
1) Linux-specific
2) related to the other "printing works on 2nd try" bug?

-> qawanted
Comment 3 Dan Mosedale (:dmose) 2006-09-14 16:06:50 PDT
This is really high visibility.  We might want this to block 0.3.
Comment 4 Stefan Sitter 2006-09-17 06:15:31 PDT
I confirm this issue with new profile and Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a1) Gecko/20060916 Calendar/0.3a2+.

After application restart and using same profile:
Print sometimes worked
Print sometimes crashed, Talkback ID: TB23389291Y, TB23389729X, TB23390078W
Print once failed with the same error and behavior as above

I have not seen this issue on Windows 2000.
Comment 5 Stefan Sitter 2006-09-17 08:52:33 PDT
Doing more print tests I saw this issue multiple times with existing profile too.
In console I found the following message: "Trying to position a sizeless window; caller should have called sizeToContent() or sizeTo(). See bug 75649."
Comment 6 cmtalbert 2006-10-26 10:21:50 PDT
It sounds like this is a linux specific issue. We know that the Mozilla print subsystem has odd behaviors w.r.t. linux specifically, and we have seen none of these issues on windows or mac. There are a few reproducible cases here for this defect. So, my recommendation is to clear the QAWanted flag.

If you disagree, please comment with what further details you would like QA to provide.
Comment 7 cmtalbert 2006-11-02 10:29:59 PST
Removing qawanted and calrelnote since this has been qa'd and since we have released 0.3.
Comment 8 Matthew (lilmatt) Willis 2006-12-12 06:37:16 PST
We still want the relnote until this is fixed.
Comment 9 Daniel Boelzle [:dbo] 2007-01-19 05:46:28 PST
What Andreas and I found out:
The cause seems to be that the dialog is closed too early (even with the document listener patch). If you patch the code keeping it open while printing, all works fine.
Further it seems that multiple printing device contexts have been created which doesn't work on Unix (NS_ERROR_GFX_PRINTER_PRINT_WHILE_PREVIEW issued in gfx/src/ps/nsDeviceContextPS.cpp).
Any guru help appreciated.

BTW: A workaround for this may at least be to change the dialog's "Cancel" mimic to "Close". A bit helpless, I admit...
Comment 10 Matthew (lilmatt) Willis 2007-03-08 09:06:58 PST
I think this is fixed by bug 351944.  I'd like QA to verify.
Comment 11 Matthew (lilmatt) Willis 2007-03-23 16:40:40 PDT
Not going to make the 0.5 train.
Comment 12 cmtalbert 2007-04-12 14:24:33 PDT
This is Fixed by the other printer fixes like bug 351957 and bug 312084.

Very happy to be marking this as WFM.

I used Sunbird: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.4pre) Gecko/20070412 Calendar/0.5pre

On Red Hat Enterprise 9.  I used a PostScript HP 3020 Laser Jet printer.
Comment 13 Sebastian Schwieger 2007-04-13 10:31:23 PDT
Yes, printing works now, due to a workaround introduced in bug 35197. I filed bug 377414 to keep care of the workaround.

Note You need to log in before you can comment on or make changes to this bug.