Bug 566304

Summary: Qt and KDE applications crash when trying to print when a CUPS printer has no PPD assigned
Product: [Fedora] Fedora Reporter: nucleo <alekcejk>
Component: qtAssignee: Kevin Kofler <kevin>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 11CC: dr.diesel, kevin, ltinkl, rdieter, redhat-bugzilla, than
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: qt-4.6.2-3.fc11 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-03-02 01:07:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 529182    
Attachments:
Description Flags
Okular crash backtrace none

Description nucleo 2010-02-17 20:49:34 UTC
Created attachment 394819 [details]
Okular crash backtrace

Description of problem:
Okular, konqueror, opera are crashes when I press Ctrl+P.


Version-Release number of selected component (if applicable):
qt-4.6.1-3.fc11.i586.rpm

How reproducible:
Every time.

Steps to Reproduce:
1. Open for document in okular.
2. Press Ctrl+P.
  
Actual results:
Crash.

Expected results:
No crash.

Additional info:

Comment 1 nucleo 2010-02-17 21:08:55 UTC
I have two local printers.
First and default is virtual cups-pdf and second is real printer.

Comment 2 Kevin Kofler 2010-02-28 02:37:24 UTC
The offending line is added by our qt-cups-1.patch (in 2 places, they probably both need the same fix):
+    	// set default color
+    	if( cups->currentPPD()->color_device )
+    	  options.color->setChecked(true);
+    	else
+    	  options.grayscale->setChecked(true);
and later:
+    	// set default color
+    	if( cups.currentPPD()->color_device )
+	  setColorMode(Color);
+    	else
+	  setColorMode(GrayScale);

They should be changed to:
   	if ( cups->currentPPD() )
   	  {
   	    // set default color
   	    if( cups->currentPPD()->color_device )
   	      options.color->setChecked(true);
   	    else
   	      options.grayscale->setChecked(true);
   	  }
and:
   	if ( cups.currentPPD() )
   	  {
   	    // set default color
   	    if( cups.currentPPD()->color_device )
   	      setColorMode(Color);
   	    else
   	      setColorMode(GrayScale);
   	  }
(I matched the coding style of the surrounding code.)

I'm going to try changing this.

Comment 3 Kevin Kofler 2010-02-28 04:39:26 UTC
This should be fixed in 4.6.2-3 which I just committed to devel. I'm going to issue updates.

Comment 4 Kevin Kofler 2010-02-28 17:43:07 UTC
*** Bug 569196 has been marked as a duplicate of this bug. ***

Comment 6 nucleo 2010-02-28 18:16:05 UTC
This build http://koji.fedoraproject.org/koji/buildinfo?buildID=159091 fixes bug.

Comment 7 Fedora Update System 2010-02-28 18:25:35 UTC
qt-4.6.2-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/qt-4.6.2-3.fc13

Comment 8 Fedora Update System 2010-02-28 18:25:59 UTC
qt-4.6.2-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/qt-4.6.2-3.fc12

Comment 9 Fedora Update System 2010-02-28 18:26:23 UTC
qt-4.6.2-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/qt-4.6.2-3.fc11

Comment 10 Ralf Ertzinger 2010-02-28 18:56:58 UTC
*** Bug 569189 has been marked as a duplicate of this bug. ***

Comment 11 Fedora Update System 2010-03-01 01:37:56 UTC
qt-4.6.2-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2010-03-02 00:51:20 UTC
qt-4.6.2-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 13 Fedora Update System 2010-03-02 01:07:52 UTC
qt-4.6.2-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.