Closed Bug 427385 Opened 12 years ago Closed 10 years ago

april 6th ff3 trunk crash when opening this huge PNG [XError: 'BadAlloc (insufficient resources for operation)']

Categories

(Core :: Graphics, defect, critical)

x86
Linux
defect
Not set
critical

Tracking

()

RESOLVED DUPLICATE of bug 424333

People

(Reporter: mnemo, Assigned: mats)

References

()

Details

(Keywords: crash, platform-parity, testcase)

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080325 Ubuntu/7.10 (gutsy) Firefox/2.0.0.13
Build Identifier: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.13) Gecko/20080325 Ubuntu/7.10 (gutsy) Firefox/2.0.0.13

repro steps:
1. start ff3 minefield 2008-april-06
2. open this (probably corrupt) png:
http://www.kernel.org/pub/linux/kernel/people/gregkh/kernel_history/developer_graph-2.6.22.png
3. crash

When I repro this bug on ubuntu gutsy it prints the following error to the terminal from which I launched ff3:

The program 'firefox-bin' received an X Window System error.
This probably reflects a bug in the program.
The error was 'BadGC (invalid GC parameter)'.
  (Details: serial 14632 error_code 13 request_code 56 minor_code 0)
  (Note to programmers: normally, X errors are reported asynchronously;
   that is, you will receive the error a while after causing it.
   To debug your program, run it with the --sync command line
   option to change this behavior. You can then get a meaningful
   backtrace from your debugger if you break on the gdk_x_error() function.)


Reproducible: Always

Steps to Reproduce:
1.
2.
3.
Breakpad did NOT trigger. Is that a separate bug maybe or is breakpad windows only?
maybe you don't have the ca-certificates package installed?. See bug 407748 
I tried starting ff3, then attaching gdb to ff3 and then reproing the bug. All I got was this:

(gdb) c
Continuing.
[New Thread -1271010416 (LWP 10605)]
[New Thread -1302750320 (LWP 10606)]

Program exited with code 01.
(gdb) bt
No stack.
(gdb) 

---

Also, it seems sylvain is right about the certificates. This is what I see on my machine:
mnemo@gutsyT5:~$ curl https://crash-reports.mozilla.com/submit
curl: (77) error setting certificate verify locations:
  CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
I ran "sudo apt-get install ca-certificates" to see if I could get breakpad running but no luck.
Here is the error code being passed into gdk_x_error(), I have no idea how to improve the readability of the backstrace (im not a frequent gdb user).

---------------

(gdb) break gdk_x_error
Breakpoint 1 at 0xb6eac7d3: file /build/buildd/gtk+2.0-2.12.0/gdk/x11/gdkmain-x11.c, line 614.
(gdb) c
Continuing.

Breakpoint 1, gdk_x_error (display=0x8130000, error=0xbfeaaf08) at /build/buildd/gtk+2.0-2.12.0/gdk/x11/gdkmain-x11.c:614
614     /build/buildd/gtk+2.0-2.12.0/gdk/x11/gdkmain-x11.c: No such file or directory.
        in /build/buildd/gtk+2.0-2.12.0/gdk/x11/gdkmain-x11.c
(gdb) bt
#0  gdk_x_error (display=0x8130000, error=0xbfeaaf08) at /build/buildd/gtk+2.0-2.12.0/gdk/x11/gdkmain-x11.c:614
#1  0xb621a655 in ?? () from /usr/lib/libbonoboui-2.so.0
#2  0x08130000 in ?? ()
#3  0xbfeaaf08 in ?? ()
#4  0x00000056 in ?? ()
#5  0xb6c87b2c in ?? () from /usr/lib/libX11.so.6
#6  0xbfeaafb8 in ?? ()
#7  0xb6c87b2c in ?? () from /usr/lib/libX11.so.6
#8  0xbfeaaf78 in ?? ()
#9  0xb6bd6bfa in _XError () from /usr/lib/libX11.so.6
Backtrace stopped: frame did not save the PC
(gdb) 
gdk_x_error triggers exit() or abort(), we could probably get breakpad to replace and trap it, but that's kinda stupid. we could also try to fix gdk/gtk2/cairo/gecko to handle such errors.

to get useful stacks, you need symbols for glib/gdk/gtk/cairo and a couple of others, you must run w/ --sync as the error indicates, and you should run it under a debugger.
WFM on Mac.
Keywords: crash
Summary: april 6th ff3 trunk crash when opening this PNG → april 6th ff3 trunk crash when opening this huge PNG
Attached file stack
Assignee: nobody → mats.palmgren
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
I have updated the patch in bug 424333 so it fixes this case too.
Component: General → GFX: Thebes
Depends on: 424333
Keywords: pp, testcase
Product: Firefox → Core
Summary: april 6th ff3 trunk crash when opening this huge PNG → april 6th ff3 trunk crash when opening this huge PNG [XError: 'BadAlloc (insufficient resources for operation)']
QA Contact: general → thebes
The RC1 version still crashes on the mentioned PNG, and it also crashes on this PNG as well:
http://libpng.org/pub/png/img_png/16million.png
Flags: blocking1.9?
Same disposition as 424333; won't block no it, will get a fix in for a dot release.
Flags: wanted1.9.0.x+
Flags: blocking1.9?
Flags: blocking1.9-
This is still completely broken in FF 3.5.2 although now the gdk_x_error/BadGC is gone and instead the image refuses to paint scaled to fit and refuses to scroll when zoomed to 100%.
Related to bug 166862 and/or bug 210931?
martin: sorry. completely broken is an absolute mischaracterization.

you filed a bug complaining that firefox crashed. bug 424333 fixed that. you no longer crash.

having the image render in any useful manner will require more effort and a new bug.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 424333
You need to log in before you can comment on or make changes to this bug.