Bug 803284

Summary: firefox is crashing while printing to pdf file
Product: [Fedora] Fedora Reporter: Jaswinder Singh <jsingh>
Component: firefoxAssignee: Martin Stransky <stransky>
Status: CLOSED WORKSFORME QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: ankit, billwilliams839, gecko-bugs-nobody, lijli, orion, stransky
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-12-21 10:39:47 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:
Attachments:
Description Flags
Firefox is crashing while printing to pdf file
none
details file
none
patch none

Description Jaswinder Singh 2012-03-14 11:26:11 UTC
Description of problem:
Opened site http://pa.wikipedia.org/ in firefox.

Firefox is crashing while printing to pdf file.

Got error on terminal:

    [jassy@localhost ~]$ firefox
    Gtk-Message: Failed to load module "pk-gtk-module"
    Gtk-Message: Failed to load module "pk-gtk-module"
    firefox: cairo-pdf-surface.c:1913: _cairo_pdf_surface_emit_image: Assertion `image->format == CAIRO_FORMAT_RGB24 || image->format == CAIRO_FORMAT_ARGB32 || image->format == CAIRO_FORMAT_A8 || image->format == CAIRO_FORMAT_A1' failed.



Version-Release number of selected component (if applicable):
firefox-10.0.1-1.fc17

How reproducible:
100%

Steps to Reproduce:
1. start firefox in local lang
2. open http://5abi.com/
3.print the page to pdf file
  
Actual results:
firefox application is crashing. Also tried in english local to print English page, and got same result.


Expected results:
application should not crash

Additional info:

Comment 1 Martin Stransky 2012-03-14 11:46:45 UTC
Do you use any virtualization or is it a bare metal? Can you attach a backtrace?(http://fedoraproject.org/wiki/Debugging_guidelines_for_Mozilla_products)

Comment 2 Lijun Li 2012-03-19 07:28:49 UTC
Reproduced on ja locale, 
Open http://ja.wikipedia.org and print the page to pdf file.
Please refer to the attached screenshot and details file.

Comment 3 Lijun Li 2012-03-19 07:29:51 UTC
Created attachment 571033 [details]
Firefox is crashing while printing to pdf file

Comment 4 Lijun Li 2012-03-19 07:32:41 UTC
Created attachment 571034 [details]
details file

Comment 5 Lijun Li 2012-03-19 07:33:45 UTC
Add-ons: langpack-ja.org:10.0.1,{972ce4c6-7e08-4474-a285-3208198ce6fd}:10.0.1
BuildID: 20120209085459
CrashTime: 1332141224
EMCheckCompatibility: true
FramePoisonBase: 7ffffffff0dea000
FramePoisonSize: 4096
InstallTime: 1332140841
Notes: GLXtest process failed (exited with status 1): VENDOR
VMware, Inc.
RENDERER
Gallium 0.4 on llvmpipe (LLVM 0x300)
VERSION
2.1 Mesa 8.0.1
TFP
TRUE
X error occurred in GLX probe, error_code=8, request_code=72, minor_code=0


ProductName: Firefox
ReleaseChannel: default
SecondsSinceLastCrash: 267
StartupTime: 1332141194
Theme: classic/1.0
Throttleable: 1
Vendor: Mozilla
Version: 10.0.1

This report also contains technical information about the state of the application when it crashed.

Comment 6 Jaswinder Singh 2012-03-19 07:40:18 UTC
(In reply to comment #1)
> Do you use any virtualization or is it a bare metal? Can you attach a
> backtrace?(http://fedoraproject.org/wiki/Debugging_guidelines_for_Mozilla_products)

Yes I got this problem on VM.

Comment 7 Orion Poplawski 2012-03-20 15:54:48 UTC
I'm now seeing this on F16 with updates-testing in Firefox and Thunderbird (10 and 11) when printing to a printer.

Comment 8 Orion Poplawski 2012-03-20 15:59:42 UTC
#5  0x4e7aec34 in _cairo_pdf_surface_emit_image (surface=0xa53e5000, image=0x9e09cb80, 
    image_res=0xbfe4b438, filter=CAIRO_FILTER_GOOD) at cairo-pdf-surface.c:1910
1910        assert (image->format == CAIRO_FORMAT_RGB24 ||
(gdb) list
1905        /* These are the only image formats we currently support, (which
1906         * makes things a lot simpler here). This is enforced through
1907         * _cairo_pdf_surface_analyze_operation which only accept source surfaces of
1908         * CONTENT_COLOR or CONTENT_COLOR_ALPHA.
1909         */
1910        assert (image->format == CAIRO_FORMAT_RGB24 ||
1911                image->format == CAIRO_FORMAT_ARGB32 ||
1912                image->format == CAIRO_FORMAT_A8 ||
1913                image->format == CAIRO_FORMAT_A1);
1914
(gdb) print image->format
$2 = CAIRO_FORMAT_RGB16_565


Ah, I know why I started seeing this - I recently changed my X color depth to 16 for testing.

Comment 9 Martin Stransky 2012-08-29 10:47:46 UTC
Yes, the screen color depth is supposed to be 24 or 32 bit. 16 bit color modes are not supported by cairo - we can implement the CAIRO_FORMAT_RGB16_565 format for printing.

Comment 10 Martin Stransky 2012-09-03 14:57:48 UTC
Hm, I'm unable to reproduce it, even with the 16bit color depts. How did you changed the color-depth to 16b?

Comment 11 Martin Stransky 2012-09-04 12:13:20 UTC
Created attachment 609659 [details]
patch

WIP patch

Comment 12 Orion Poplawski 2012-09-04 14:51:01 UTC
It's been a long time, but I think I change the DefaultDepth to 16 in my xorg.conf file.

Comment 13 Martin Stransky 2012-12-21 10:39:47 UTC
I'm unable to reproduce it too. We can reconsider that if it appears again.

Comment 14 billwilliams839 2012-12-27 20:58:32 UTC
I was able to reproduce it just now, and wasn't trying.  Just wanted to print to a pdf before I submitted a form in case the form didn't work.  Joke's on me.

Firefox 17.0.1
Windows 7   64bit
Website where it happened: codecanyon

Comment 15 Martin Stransky 2013-01-02 08:10:46 UTC
Thanks, but this bug is about linux version of Firefox. Please file the Windows bug at bugzilla.mozilla.org.