(Please note that I guessed at the component, as suggested)
I do not fully understand the stack trace in the URL, however, the Firefox developers are convinced that UIM is responsible for causing Firefox to routinely crash on my system.
I got to this point because Firefox would crash within minutes every time I ran it. There was no predictor of exactly when and why it would crash, but it would definitely crash if given enough time, which wasn't very long.
So I first reported it to the Ubuntu developers, who suggested that I take it to the Firefox developers. They asked me to run some stack trace bug reports, like the one linked to, and they were absolutely convinced that the stack traces showed clearly that UIM caused the crash. (Specifically im-uim.so)
I had my doubts, but I have tried temporarily removing UIM from my system, and so far Firefox is now running okay again.
Please note that when Firefox crashes, it is not when I actually enter any text, or interact with UIM in any way that I know of. It seems that the mere presence of UIM on my system causes Firefox to be unstable.
I hope this bug can get resolved, because I much prefer to use UIM for inputting Japanese than other systems on Ubuntu.
Thank you, and I hope to hear from you soon.
There is also a bug report on this issue in the GNOME Bugzilla.
(In reply to comment #1)
In the Gnome bug report you link to, it says:
"Reverting this commit causes firefox to function correctly. Verified with
gtk+-2.18.0 and 2.18.3."
I don't understand the terminology, but is "reverting" the "commit" something I can do on my system to prevent the bug from happening, or is it something that needs to be fixed in the code?
For a workaround, please install nspluginwrapper. It will prevent flashplayer from crashing even with uim's gtk+ imput method module.
As I don't have enough time to hack these days, the real fix will take some time, perhaps.
For additional note, another workaround for the Firefox problem is to set IM_UIM_USE_SNOOPER 1 and IM_UIM_USE_TOPLEVEL 0 in gtk/gtk-im-uim.h and compile im-uim.so.
(In reply to comment #4)
Unfortunately, installing nspluginwrapper does not seem to solve the problem for me.
I don't know how to compile im-uim.so, so I guess that means I will have to wait for a fix, however long that turns out to be.
(In reply to comment #5)
> Unfortunately, installing nspluginwrapper does not seem to solve the problem
> for me.
Oh, really. I'll install ubuntu and check later.
> I don't know how to compile im-uim.so, so I guess that means I will have to
> wait for a fix, however long that turns out to be.
It's really easy.
$ tar zxvf uim-1.5.6.tar.gz
$ cd uim-1.5.6
$ ./configure --prefix=/usr # assume you've already installed libtool and libgtk2.0-dev
$ gedit gtk/gtk-im-uim.h # edit line 54 and 55 in that file
$ cd gtk
$ sudo make install
(In reply to comment #6)
> It's really easy.
> $ tar zxvf uim-1.5.6.tar.gz
> $ cd uim-1.5.6
> $ ./configure --prefix=/usr # assume you've already installed libtool and
Oops, intltool not libtool.
> $ gedit gtk/gtk-im-uim.h # edit line 54 and 55 in that file
> $ make
> $ cd gtk
> $ sudo make install
> That's it!
(In reply to comment #7)
Your instructions were as easy as promised.
I edited gtk/gtk-im-uim.h so that it had these lines:
/* select either of these two, or filter key event will be used */
define IM_UIM_USE_SNOOPER 1
define IM_UIM_USE_TOPLEVEL 0
I ran the build, make, and install instructions without any errors. I rebooted my machine afterward to make sure I was running the newly compiled UIM.
Unfortunately, it seems that has not solved the problem. Firefox still crashes.
(In reply to comment #8)
> I ran the build, make, and install instructions without any errors. I rebooted
> my machine afterward to make sure I was running the newly compiled UIM.
> Unfortunately, it seems that has not solved the problem. Firefox still crashes.
Hmm, that's interesting.
Anyway, about the nspluginwrapper workaround, I found you need to setup nspluginwrapper manually after installing it on Ubuntu.
$ sudo nspluginwrapper -i /usr/lib/flashplugin-installer/libflashplayer.so
I think you can see npwrapper.libflashplayer.so is used after restarting Firefox (by inputting "about:plugins" in the URL box). Please let me know if it solves the crashes.
(In reply to comment #9)
Thanks for helping to solve this bug.
I ran the following command:
sudo nspluginwrapper -i /usr/lib/flashplugin-installer/libflashplayer.so
And it returned without errors.
However, I don't know if it installed, because if I look at "about:plugins", I can't find any listing for npwrapper.libflashplayer.so, or any mention of npwrapper at all.
Firefox continues to crash.
(In reply to comment #10)
> I ran the following command:
> sudo nspluginwrapper -i /usr/lib/flashplugin-installer/libflashplayer.so
> And it returned without errors.
> However, I don't know if it installed, because if I look at "about:plugins", I
> can't find any listing for npwrapper.libflashplayer.so, or any mention of
> npwrapper at all.
OK. On Ubuntu, it seems another two additional operation is needed to activate the npwrapper for flashplugin (I'm new to Ubuntu/Debian, so I'm not sure this is a proper way though).
$ sudo nspluginwrapper -i /usr/lib/flashplugin-installer/libflashplayer.so
$ cd /usr/lib/xulrunner-addons/plugins
$ sudo rm flashplugin-alternative.so
$ cd /usr/share/ubufox/plugins
$ sudo rm libflashplayer.so
Then restart Firefox and check whether wrapper is working.
I tested Ubuntu 9.10 on VMWare, and both of my two workaround seems to prevent Firefox crashing.
(In reply to comment #11)
I ran the following commands, which returned no errors:
> $ sudo nspluginwrapper -i /usr/lib/flashplugin-installer/libflashplayer.so
> $ cd /usr/lib/xulrunner-addons/plugins
> $ sudo rm flashplugin-alternative.so
> $ cd /usr/share/ubufox/plugins
> $ sudo rm libflashplayer.so
I restarted Firefox and ensured that the change took place by finding nspluginwrapper was listed in "about:plugins".
However, there is a problem.
The good news: Firefox seems to be more stable, and has not crashed since running the above commands.
The bad news: Videos no longer play in Firefox. If I go to Youtube, or any site with embedded video, the space where the video should be is completely black, and there is no sound, and no controls. The video is completely dead.
(In reply to comment #12)
> The bad news: Videos no longer play in Firefox. If I go to Youtube, or any site
> with embedded video, the space where the video should be is completely black,
> and there is no sound, and no controls. The video is completely dead.
Hmm, that's too bad. I recommend to revert the situation.
$ sudo apt-get remove nspluginwrapper
$ sudo apt-get remove flashplugin-installer
$ sudo apt-get install flashplugin-installer
I think either of my two workaround should work as far as I can say. But YMMV.
(In reply to comment #13)
> (In reply to comment #12)
> Hmm, that's too bad. I recommend to revert the situation.
> $ sudo apt-get remove nspluginwrapper
> $ sudo apt-get remove flashplugin-installer
> $ sudo apt-get install flashplugin-installer
Well, I reverted the situation as described above.
Now video plays, but Firefox crashes.
Is there no way to get video and stable Firefox if I have UIM installed...?
(In reply to comment #14)
> Well, I reverted the situation as described above.
> Now video plays, but Firefox crashes.
> Is there no way to get video and stable Firefox if I have UIM installed...?
As I noted above, there are two workaround approaches. Both of them works for me on Ubuntu 9.10 i386.
1) Use modified im-uim.so, which uses IM_UIM_USE_SNOOPER instead of IM_UIM_USE_TOPLEVEL. Please make sure /usr/lib/gtk-2.0/2.10.0/immodules/im-uim.so is installed properly.
2) Use original im-uim.so with nspluginwrapper. I'm not sure how to setup properly on Ubuntu. Please consult Ubuntu expert.
(In reply to comment #15)
> (In reply to comment #14)
I am going to try to use a modified im-uim.so file again.
Do I have to uninstall a particular UIM package using apt-get before using the "make install" command, or will "make install" overwrite any existing installation?
Created attachment 31304 [details] [review]
patch for 1.5.6
(In reply to comment #16)
> I am going to try to use a modified im-uim.so file again.
> Do I have to uninstall a particular UIM package using apt-get before using the
> "make install" command, or will "make install" overwrite any existing
Please make sure to do "make install" in the uim-1.5.6/gtk directory. You don't have to remove any component of uim package from Ubuntu, I think. One caveat is that don't do "make install" on the toplevel uim-1.5.6/ directory. It may break some components of uim which was provided by Ubuntu.
Also I've finally conducted the real fix for the bug. I think it is preferable to use the patch instead of modifying gtk-im-uim.h. Please use the attached patch.
The change is already committed in the repository.
(In reply to comment #18)
> (In reply to comment #16)
> The change is already committed in the repository.
If it's going to be available in the repository, I will wait until it becomes available (I just checked but no update was registered for UIM ). I'm assuming it takes time for repository changes to propegate.
I just feel it's safer to stick with repository versions instead of my amateur manhandling of source files.
When I've verified the update, I will report back if it seems to have fixed the problem.
Please use a revised patch as old one causes another problem (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557341). And uim 1.5.7 will use new patch.
Sorry for the inconvenience, and thanks for all who reported the problem.
Created attachment 31369 [details] [review]
Revised patch for 1.5.6
(In reply to comment #21)
I was able to download the new UIM fix through a PPA repository offered by an Ubuntu developer, and I have been torture testing Firefox for the last hour or so. There was one freeze (probably because of the web site), but no crashes.
I ran Firefox from the command line, and there was no output whatsoever indicating any errors, which is completely different than what I was experiencing before.
I am confident enough in Firefox's performance now to say that for me the bug seems to be fixed, and Firefox is no longer unstable.
Thank you to everyone who helped to diagnose and fix the problem. Your hard work is much appreciated.