# firefox crashes



## martins (Jun 27, 2010)

Freebsd 8.0 amd64: Firefox crashes after a few seconds when opening certain websites. I definitely does on my gmail mail account and icanhascheezburger.com.


```
[xtd8865@bsdtop /usr/home/xtd8865]$ firefox3
NP_Initialize
New
open dsp: No such file or directory
SetWindow
SetWindow
NewStream
WriteReady
Write
decoding...
Improper call to JPEG library in state 202
Unable to read JPEG data
###!!! ABORT: X_ShmCreatePixmap: BadImplementation (server does not implement operation); 2 requests ago: file nsX11ErrorHandler.cpp, line 182
Abort trap (core dumped)
```

thank you for your time


----------



## quirxi (Sep 23, 2010)

Got the same problem on FreeBsd 8.1 with Intel Dual Core CPU whenever i open gmail account.


```
> mozilla 
NP_Initialize
New
SetWindow
SetWindow
New
SetWindow
SetWindow
NewStream
WriteReady
Write
decoding...
New block
###!!! ABORT: X_ShmCreatePixmap: BadImplementation (server does not implement operation); 2 requests ago: file nsX11ErrorHandler.cpp, line 182
Abort trap (core dumped)
```

Firefox = Firefox/3.6.10


----------



## wblock@ (Sep 23, 2010)

Are all your ports up to date, particularly linux-f10-flashplayer?  Did you use nspluginwrapper to deinstall and reinstall after updating Flash?


----------



## renice (Sep 24, 2010)

Have you tried to load sem(4)?


[CMD=]# kldload sem[/CMD]


----------



## kenorb (Nov 9, 2010)

The same problem!
http://forums.freebsd.org/showthread.php?p=109165#post109165
I've got sem loaded by default.

```
> firefox3 -v
Mozilla Firefox 3.6.12, Copyright (c) 1998 - 2010 mozilla.org
```

Reported following bugs:
https://bugzilla.mozilla.org/show_bug.cgi?id=610610
https://sourceforge.net/tracker/?func=detail&aid=3105876&group_id=110956&atid=657852

See as well:
https://bugs.launchpad.net/ubuntu/+source/firefox/+bug/607211


----------



## kenorb (Nov 9, 2010)

martins said:
			
		

> Freebsd 8.0 amd64: Firefox crashes after a few seconds when opening certain websites.



As workaround, try to run it directly from console without any global variables:

```
/usr/local/lib/firefox3/firefox-bin
```
Not: /usr/local/bin/firefox3 (which is script).
You can try as well: 

```
firefox3 -safe-mode
```
If it doesn't exist, check which binary is called by:

```
locate firefox-bin | grep bin$
```
or:

```
sh -x `which firefox3`
```

And provide the backtrace:

```
gdb /usr/local/lib/firefox3/firefox-bin
```


----------



## kenorb (Nov 9, 2010)

Backtrace:

```
(gdb) bt
#0  0x0000000804c2beac in kill () from /lib/libc.so.7
#1  0x0000000804c2ae33 in abort () from /lib/libc.so.7
#2  0x0000000801eebbb2 in PR_Abort () from /usr/local/lib/libplds4.so.1
#3  0x0000000801481d37 in NS_GetComponentManager_P () from /usr/local/lib/libxul/libxul.so
#4  0x0000000801481f3e in NS_DebugBreak_P () from /usr/local/lib/libxul/libxul.so
#5  0x0000000800ac6f23 in XRE_LockProfileDirectory () from /usr/local/lib/libxul/libxul.so
#6  0x00000008043261c5 in _XError () from /usr/local/lib/libX11.so.6
#7  0x000000080432c944 in process_responses () from /usr/local/lib/libX11.so.6
#8  0x000000080432ced7 in _XReply () from /usr/local/lib/libX11.so.6
#9  0x000000080432209a in XSync () from /usr/local/lib/libX11.so.6
#10 0x0000000812c02aa2 in NPP_Write () from /usr/local/lib/browser_plugins/flashplugin-mozilla/libnpflash.so
#11 0x00000008012b0a44 in ffi_closure_unix64 () from /usr/local/lib/libxul/libxul.so
#12 0x00000008012b6452 in ffi_closure_unix64 () from /usr/local/lib/libxul/libxul.so
#13 0x0000000800bb0412 in DumpJSStack () from /usr/local/lib/libxul/libxul.so
#14 0x0000000800b53238 in DumpJSStack () from /usr/local/lib/libxul/libxul.so
#15 0x0000000800b53238 in DumpJSStack () from /usr/local/lib/libxul/libxul.so
#16 0x0000000800ba53c2 in DumpJSStack () from /usr/local/lib/libxul/libxul.so
#17 0x0000000800b3db03 in DumpJSStack () from /usr/local/lib/libxul/libxul.so
#18 0x0000000800b3dbff in DumpJSStack () from /usr/local/lib/libxul/libxul.so
#19 0x000000080146643a in NS_StringContainerInit2_P () from /usr/local/lib/libxul/libxul.so
#20 0x000000080147b20a in NS_GetComponentManager_P () from /usr/local/lib/libxul/libxul.so
#21 0x0000000801449963 in nsPrintSession::Release () from /usr/local/lib/libxul/libxul.so
#22 0x000000080139e1fb in JSD_DebuggerOnForUser () from /usr/local/lib/libxul/libxul.so
#23 0x0000000801255744 in std::vector<nsRefPtr<imgCacheEntry>, std::allocator<nsRefPtr<imgCacheEntry> > >::_M_insert_aux () from /usr/local/lib/libxul/libxul.so
#24 0x0000000800ac1fb6 in XRE_main () from /usr/local/lib/libxul/libxul.so
#25 0x00000000004013dd in main (argc=1, argv=0x7fffffffe700) at nsBrowserApp.cpp:158
```


```
> pkg_info -W /usr/local/lib/libplds4.so.1
/usr/local/lib/libplds4.so.1 was installed by package nspr-4.8.6
> pkg_info -W /usr/local/lib/libxul/libxul.so
/usr/local/lib/libxul/libxul.so was installed by package libxul-1.9.2.12
> pkg_info -W /usr/local/lib/browser_plugins/flashplugin-mozilla/libnpflash.so
/usr/local/lib/browser_plugins/flashplugin-mozilla/libnpflash.so was installed by package flashplugin-mozilla-0.4.13_5
```


----------



## kenorb (Nov 9, 2010)

If you need to reinstall nspr, libxul and flashplugin-mozilla with debug symbols, try:

```
sudo portupgrade -fM "WITH_DEBUG=1" nspr libxul flashplugin-mozilla
```

This do for your own risk:

```
sudo portupgrade -fM "WITH_DEBUG=1" libX11
```


----------



## kenorb (Nov 9, 2010)

Solution:

```
sudo pkg_delete -v flashplugin-mozilla\*
sudo portinstall nspluginwrapper linux_base-f10
sudo ln -s /usr/local/lib/npapi/linux-f10-flashplugin/libflashplayer.so /usr/local/lib/browser_plugins/
sudo nspluginwrapper -v -a -i
sudo mount -t linprocfs linproc /usr/compat/linux/proc
echo 'linproc    /usr/compat/linux/proc  linprocfs   rw  0   0' >> /etc/fstab # run from root, to add at boot time
```
Run and check the plugins in aboutlugins
Based on: http://www.freebsd.org/doc/handbook/desktop-browsers.html
See section: 6.2.3 Firefox and MacromediaÂ® Flashâ„¢ Plugin


----------

