Bug 803284 - firefox is crashing while printing to pdf file
firefox is crashing while printing to pdf file
Status: CLOSED WORKSFORME
Product: Fedora
Classification: Fedora
Component: firefox (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Martin Stransky
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-14 07:26 EDT by Jaswinder Singh
Modified: 2013-03-03 21:19 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-21 05:39:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
Firefox is crashing while printing to pdf file (275.41 KB, image/png)
2012-03-19 03:29 EDT, Lijun Li
no flags Details
details file (740 bytes, application/octet-stream)
2012-03-19 03:32 EDT, Lijun Li
no flags Details
patch (4.80 KB, patch)
2012-09-04 08:13 EDT, Martin Stransky
no flags Details | Diff

  None (edit)
Description Jaswinder Singh 2012-03-14 07:26:11 EDT
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 07:46:45 EDT
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 03:28:49 EDT
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 03:29:51 EDT
Created attachment 571033 [details]
Firefox is crashing while printing to pdf file
Comment 4 Lijun Li 2012-03-19 03:32:41 EDT
Created attachment 571034 [details]
details file
Comment 5 Lijun Li 2012-03-19 03:33:45 EDT
Add-ons: langpack-ja@firefox.mozilla.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 03:40:18 EDT
(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 11:54:48 EDT
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 11:59:42 EDT
#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 06:47:46 EDT
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 10:57:48 EDT
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 08:13:20 EDT
Created attachment 609659 [details]
patch

WIP patch
Comment 12 Orion Poplawski 2012-09-04 10:51:01 EDT
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 05:39:47 EST
I'm unable to reproduce it too. We can reconsider that if it appears again.
Comment 14 billwilliams839 2012-12-27 15:58:32 EST
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 03:10:46 EST
Thanks, but this bug is about linux version of Firefox. Please file the Windows bug at bugzilla.mozilla.org.

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