Skip navigation.

Posts tagged with "Firefox"

Troubleshooting Firefox (Iceweasel) Segmentation Fault

I use Firefox (Iceweasel) on Debian testing. I have the the following annoying problem for about a year: Firefox just crashes when visiting some chinese website. Sometimes I have to use Ephipany to visit those sites. Today I decide to spend some time to fix the problem. Here are the steps:

1. Use gdb to debug Firefox.It took me some while to figure out how to debug firefox using gdb. After reading this post, I got it
bob@subjam:/usr/lib/iceweasel$ ./iceweasel -g firefox-bin -d gdb

And I get the following debug information
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1222703424 (LWP 14958)]
0x08381259 in nsTextFrame::Paint (this=0x9e3a310, aPresContext=0x91d2728, 
aRenderingContext=@0x938be00, aDirtyRect=@0xbfb9b980, 
aWhichLayer=eFramePaintLayer_Overlay, aFlags=0) at nsTextFrame.cpp:594
594     nsTextFrame.cpp: No such file or directory.
        in nsTextFrame.cpp


2. After googling "nsTextFrame.cpp:594", I read this post and find several bug reports in Debian: Debian Bug report logs - #404686, Debian Bug report logs - #367956,Debian Bug report logs - #425228

3. I tried three solutions
First one: ICEWEASEL_DSP="aoss" in /etc/iceweasel/iceweaselrc --- Did not solve the problem

Second one: export MOZ_DISABLE_PANGO=1 --- Solve the problem, however, ugly rendering for some websites

Third one: apt-get install msttcorefonts --- Did not solve the problem

UPDATE: problem solved!
First I resolved all dangling symlink in /var/lib/defoma (caused by debian package update and some manually installed fonts). Then, I used
strace -f -eopen -o /tmp/somefile iceweasel

to debug firefox. After checking the dumped file from strace, I found out that one ttf (true type font) file's access permission is not properly set. Firefox crash problem solved after changing the access permission.