Firefox Crash

  1. 在本系統中 Firefox 經常 Crash,更換版本還是無效,最後查得原因為字型設定問題。預設 Sans-serif 中文字型優先使用 AR PL UMming TW 會造成 crash,尤其簡體字型 gb-xxxxx 編碼,改成 AR PL UMing TW MBE 後網頁不 crash。
    [dywang@dywnb ~]$ grep '<family>Sans-serif' -A9 -B1 .fonts.conf 
    <alias>
            <family>Sans-serif</family>
            <prefer>
                    <family>DejaVu Sans</family>
                    <family>DejaVu Serif</family>
                    <family>DejaVu Sans Mono</family>
                    <family>AR PL UMing TW MBE</family>
                    <family>AR PL UMing TW</family>
                    <family>AR PL UMing CN</family>
            </prefer>
    </alias>
    
  2. 根本解決是刪除 sans-serif 字型的中文使用,不過如此則網頁預設字型為楷書。
    [dywang@dywnb ~]$ grep '<family>Sans-serif' -A6 -B1 .fonts.conf 
    <alias>
            <family>Sans-serif</family>
            <prefer>
                    <family>DejaVu Sans</family>
                    <family>DejaVu Serif</family>
                    <family>DejaVu Sans Mono</family>
            </prefer>
    </alias>
    
  3. 調整中文字明體先於楷書,結果 firefox 還是常 crash。
    [root@dywnb ~]# vim /etc/fonts/conf.d/65-nonlatin.conf
    
  4. 最後找到原因為 AR PL UMing TW 字型大於 11 且 16 的字型進行 antialias 導致 firefox 部分網頁 crash。
    [dywang@dywnb ~]$ diff -uN .fonts.conf.orig .fonts.conf
    --- .fonts.conf.orig	2016-06-04 18:57:17.304273658 +0800
    +++ .fonts.conf	2016-06-05 06:28:42.796140649 +0800
    -<match target="font">
    -       <test qual="any" name="family" compare="eq">
    -              <string>AR PL UMing TW</string>
    -              <string>AR PL UMing CN</string>
    -       </test>
    -       <test name="pixelsize" compare="more_eq">
    -              <double>11</double>
    -       </test>
    -       <test name="pixelsize" compare="less_eq">
    -              <double>16</double>
    -       </test>
    -       <edit name="antialias" mode="assign">
    -              <bool>false</bool>
    -       </edit>
    -</match>
    
  5. hp probook 430 g3 + firefox 經常 crash,xorg-x11-drv 更新到 CentOS 6.8 版後穩定。
    [root@dywnb Packages]# yum update xorg-x11-drv-* --enablerepo=centos
    
  6. Youtube 影片,Hangouts 視訊 Xorg CPU 使用率非常高,關閉 gfx.xrender.enabled 後解決,但 firefox 的 CPU 使用率還是非常高,但螢幕比較不會卡住。
    about:config
    gfx.xrender.enabled flase
    
  7. firefox 使用 flash-plugin。
    [dywang@dywIssd ~]$ firefox 
    Vector smash protection is enabled.
    
    [root@dywIssd ~]# strings /usr/lib64/flash-plugin/libflashplayer.so | grep smash 
    Vector smash protection is enabled.
    
    about:config
    dom.ipc.plugins.flash.disable-protected-mode
    
  8. firefox 無法使用 AnonymoX。
    about:config
    xpinstall.signatures.required false