Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#207 Segfault when loading SCIM module in some applications

1.4.x
open
nobody
5
2011-09-12
2010-08-01
akb825
No

There are a couple of applications that encounter a segfault when loading a SCIM module immediately on startup. The original application I have been having problems with is bsnes. (http://byuu.org/bsnes/) When trying to find a similar application (using the same underlying libraries) that exhibits this behavior I discovered hedgewars (http://www.hedgewars.org/) which also segfaults in the same way. To reproduce, simply install either application and attempt to launch it.

I am running Debian Testing with GNOME, which has SCIM version 1.4.9-3. The SCIM packages I have installed are scim scim-anthy, scim-bridge-agent, scim-bridge-client-gtk, scim-gtk2-immodule, scim-qtimm, and scim-uim. I am using US English as my system language, and the keyboard layout is set to US English. Removing SCIM resolves the segfault.

Both bsnes and hedgewars use QT4. Other QT applications run fine, but one similarity between these two applications is that they also use SDL. Since both QT and SDL provide input functionality, I'm wondering if those are somehow conflicting when SCIM is initialized. I am currently using the default GTK theme for QT, which routes all of its UI elements through GTK. You can specify different themes, which aren't GTK based, for each application with the "-style" command line argument, such as "-style motif". Passing the "-style motif" command line argument works around the issue and prevents the segfault in both bsnes and hedgewars.

I have looked through the source code for bsnes, and immediately after main it creates a QApplication instance to initialize QT, where it then crashes, so it doesn't appear to be doing anything abnormal during initialization.

Here is a stack backtrace for the segfault when attempting to launch bsnes:

#0 0x00007fffe4a14843 in ?? () from /usr/lib/libltdl.so.7
#1 0x00007fffe4a15248 in ?? () from /usr/lib/libltdl.so.7
#2 0x00007fffe4a15af8 in lt_dlopenadvise () from /usr/lib/libltdl.so.7
#3 0x00007fffe40b08ed in scim::Module::load(std::string const&, std::string
const&) () from /usr/lib/libscim-1.0.so.8
#4 0x00007fffe408cd55 in scim::ConfigModule::load(std::string const&) ()
from /usr/lib/libscim-1.0.so.8
#5 0x00007fffe408cfb4 in scim::ConfigModule::ConfigModule(std::string const&)
() from /usr/lib/libscim-1.0.so.8
#6 0x00007fffe4336da6 in ?? ()
from /usr/lib/gtk-2.0/2.10.0/immodules/im-scim.so
#7 0x00007fffe4337a83 in ?? ()
from /usr/lib/gtk-2.0/2.10.0/immodules/im-scim.so
#8 0x00007ffff32fa2f2 in g_type_class_ref () from /usr/lib/libgobject-2.0.so.0
#9 0x00007ffff32dfdf2 in g_object_newv () from /usr/lib/libgobject-2.0.so.0
#10 0x00007ffff32e03ac in g_object_new () from /usr/lib/libgobject-2.0.so.0
#11 0x00007fffe433b25b in gtk_im_context_scim_new() ()
from /usr/lib/gtk-2.0/2.10.0/immodules/im-scim.so
#12 0x00007fffea3d2f76 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#13 0x00007fffea3d3bb7 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#14 0x00007fffea3d3f31 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#15 0x00007fffea3d0972 in gtk_im_context_get_preedit_string ()
from /usr/lib/libgtk-x11-2.0.so.0
#16 0x00007fffea376955 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#17 0x00007fffea376f91 in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#18 0x00007fffea37ee2b in ?? () from /usr/lib/libgtk-x11-2.0.so.0
#19 0x00007ffff32d947e in g_closure_invoke () from /usr/lib/libgobject-2.0.so.0
#20 0x00007ffff32eecc1 in ?? () from /usr/lib/libgobject-2.0.so.0
#21 0x00007ffff32f0a76 in g_signal_emit_valist ()
from /usr/lib/libgobject-2.0.so.0
#22 0x00007ffff32f0fc3 in g_signal_emit () from /usr/lib/libgobject-2.0.so.0
#23 0x00007fffea50c637 in gtk_widget_realize ()
from /usr/lib/libgtk-x11-2.0.so.0
#24 0x00007ffff6f2b3bd in ?? () from /usr/lib/libQtGui.so.4
#25 0x00007ffff6f2b5e9 in ?? () from /usr/lib/libQtGui.so.4
#26 0x00007ffff6f2e0da in ?? () from /usr/lib/libQtGui.so.4
#27 0x00007ffff6f29bc8 in ?? () from /usr/lib/libQtGui.so.4
#28 0x00007ffff6f114ce in QGtkStyle::QGtkStyle() () from /usr/lib/libQtGui.so.4
#29 0x00007ffff6e99f43 in QStyleFactory::create(QString const&) ()
from /usr/lib/libQtGui.so.4
#30 0x00007ffff6baa4c7 in QApplication::style() () from /usr/lib/libQtGui.so.4
#31 0x00007ffff6bae7d5 in QApplicationPrivate::initialize() ()
from /usr/lib/libQtGui.so.4
#32 0x00007ffff6bae869 in QApplicationPrivate::construct(_XDisplay*, unsigned
long, unsigned long) () from /usr/lib/libQtGui.so.4
#33 0x00007ffff6baf891 in QApplication::QApplication(int&, char**, int) ()
from /usr/lib/libQtGui.so.4
#34 0x0000000000419c67 in ?? ()
#35 0x00007ffff4758c4d in __libc_start_main (main=<value optimized out>,
argc=<value optimized out>, ubp_av=<value optimized out>,
init=<value optimized out>, fini=<value optimized out>,
rtld_fini=<value optimized out>, stack_end=0x7fffffffe358)
at libc-start.c:228
#36 0x0000000000411879 in ?? ()
#37 0x00007fffffffe358 in ?? ()
#38 0x000000000000001c in ?? ()
#39 0x0000000000000001 in ?? ()
#40 0x00007fffffffe61e in ?? ()
#41 0x0000000000000000 in ?? ()

Discussion

  • akb825
    akb825
    2010-08-01

    I would also like to note that this has started recently, as I was able to run bsnes without problems a month or two ago. This would correspond to the update from 1.4.9-2 to 1.4.9-3 update in Debian, which was updated in July. (http://packages.qa.debian.org/s/scim.html)

     
  • I also have a segfault problem with scim-1.4.9 and Firefox 3.6.10.

    SCIM-RELATED APPLICATION BEHAVIOR NOTES (only happened since installing SCIM, today):

    1) There is no problem with using SCIM.

    2) Browser and related windows often freeze (or are slow to load) until I right-click the SCIM icon and select "Exit."

    3) The icon disappears and immediately reappears. (Error messages indicate the "exit" message is not actually accepted, but this seems to allow the browser or whatever related window to finish loading.

    4) Every time I want a new window to finish loading (Session Restore, Xmarks Sync, Firefox Preferences, Exceptions (to cookie-handling), etc, etc) I must repeat #2 above!

    RELATED LINES OF "/var/log/messages":

    Oct 31 19:09:15 localhost -- MARK --
    Oct 31 19:15:37 localhost logger: ACPI action lid is not defined
    Oct 31 19:16:01 localhost /usr/sbin/gpm[3556]: *** info [mice.c(1766)]:
    Oct 31 19:16:01 localhost /usr/sbin/gpm[3556]: imps2: Auto-detected intellimouse PS/2
    Oct 31 19:24:37 localhost acpid: client connected from 30438[0:100]
    Oct 31 19:24:37 localhost acpid: 1 client rule loaded
    Oct 31 19:24:43 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.43" (uid=1000 pid=30496 comm="kded4 ") interface="org.freedesktop.Hal.Device.LaptopPanel" member="SetBrightness" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 19:24:43 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.43" (uid=1000 pid=30496 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="SetCPUFreqGovernor" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 19:24:43 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.43" (uid=1000 pid=30496 comm="kded4 ") interface="org.freedesktop.Hal.Device.SystemPowerManagement" member="SetPowerSave" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 19:24:50 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.44" (uid=1000 pid=30514 comm="/usr/bin/plasma ") interface="org.freedesktop.Hal.Device.LaptopPanel" member="GetBrightness" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 19:24:56 localhost kernel: guidance-power-[30540]: segfault at 6f55d058 ip b7d44213 sp bfa5b51c error 4 in libc-2.9.so[b7ccd000+15a000]
    Oct 31 19:24:59 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.43" (uid=1000 pid=30496 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="GetCPUFreqAvailableGovernors" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 19:24:59 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.43" (uid=1000 pid=30496 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="GetCPUFreqAvailableGovernors" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 19:24:59 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.43" (uid=1000 pid=30496 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="GetCPUFreqAvailableGovernors" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 19:49:15 localhost -- MARK --
    Oct 31 19:50:15 localhost kernel: scim-bridge[30579]: segfault at c ip b8038887 sp bfb026fc error 4 in libscim-1.0.so.8.2.4[b7fdd000+ca000]
    Oct 31 19:52:00 localhost kernel: scim-bridge[30987]: segfault at c ip b7eda887 sp bfafd3fc error 4 in libscim-1.0.so.8.2.4[b7e7f000+ca000]
    Oct 31 19:53:26 localhost kernel: scim-bridge[31049]: segfault at c ip b7ede887 sp bfb06b6c error 4 in libscim-1.0.so.8.2.4[b7e83000+ca000]
    Oct 31 19:54:03 localhost kernel: scim-bridge[31099]: segfault at c ip b7fa2887 sp bf93621c error 4 in libscim-1.0.so.8.2.4[b7f47000+ca000]
    Oct 31 19:54:41 localhost kernel: scim-bridge[31122]: segfault at c ip b7e59887 sp bf87e86c error 4 in libscim-1.0.so.8.2.4[b7dfe000+ca000]
    Oct 31 19:54:43 localhost kernel: scim-bridge[31154]: segfault at c ip b7e59887 sp bfbf35ec error 4 in libscim-1.0.so.8.2.4[b7dfe000+ca000]
    Oct 31 19:54:58 localhost scim-bridge: Cleanup, done. Exitting...
    Oct 31 19:55:14 localhost kernel: scim-bridge[31212]: segfault at c ip b7fe8887 sp bf8c211c error 4 in libscim-1.0.so.8.2.4[b7f8d000+ca000]
    Oct 31 19:57:04 localhost /usr/sbin/gpm[3556]: *** info [mice.c(1766)]:
    Oct 31 19:57:04 localhost /usr/sbin/gpm[3556]: imps2: Auto-detected intellimouse PS/2
    Oct 31 20:09:16 localhost -- MARK --
    Oct 31 20:14:13 localhost acpid: client connected from 30438[0:100]
    Oct 31 20:14:13 localhost acpid: 1 client rule loaded
    Oct 31 20:14:16 localhost kernel: scim-bridge[31232]: segfault at c ip b7fa0887 sp bf85526c error 4 in libscim-1.0.so.8.2.4[b7f45000+ca000]
    Oct 31 20:14:30 localhost /usr/sbin/gpm[3556]: *** info [mice.c(1766)]:
    Oct 31 20:14:30 localhost /usr/sbin/gpm[3556]: imps2: Auto-detected intellimouse PS/2
    Oct 31 20:20:44 localhost scim-bridge: Cleanup, done. Exitting...
    Oct 31 20:45:23 localhost acpid: client connected from 32099[0:100]
    Oct 31 20:45:23 localhost acpid: 1 client rule loaded
    Oct 31 20:45:28 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.60" (uid=1000 pid=32157 comm="kded4 ") interface="org.freedesktop.Hal.Device.LaptopPanel" member="SetBrightness" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 20:45:28 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.60" (uid=1000 pid=32157 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="SetCPUFreqGovernor" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 20:45:28 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.60" (uid=1000 pid=32157 comm="kded4 ") interface="org.freedesktop.Hal.Device.SystemPowerManagement" member="SetPowerSave" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 20:45:33 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.61" (uid=1000 pid=32172 comm="/usr/bin/plasma ") interface="org.freedesktop.Hal.Device.LaptopPanel" member="GetBrightness" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 20:45:37 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.60" (uid=1000 pid=32157 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="GetCPUFreqAvailableGovernors" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 20:45:37 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.60" (uid=1000 pid=32157 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="GetCPUFreqAvailableGovernors" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 20:45:37 localhost dbus-daemon: Rejected send message, 1 matched rules; type="method_call", sender=":1.60" (uid=1000 pid=32157 comm="kded4 ") interface="org.freedesktop.Hal.Device.CPUFreq" member="GetCPUFreqAvailableGovernors" error name="(unset)" requested_reply=0 destination="org.freedesktop.Hal" (uid=0 pid=3390 comm="/usr/sbin/hald --daemon=yes "))
    Oct 31 20:45:37 localhost kernel: guidance-power-[32211]: segfault at 6f4e1058 ip b7d06213 sp bf898d3c error 4 in libc-2.9.so[b7c8f000+15a000]
    Oct 31 20:45:53 localhost kernel: scim-bridge[32206]: segfault at c ip b7ea2887 sp bfe2a9ec error 4 in libscim-1.0.so.8.2.4[b7e47000+ca000]
    Oct 31 20:46:23 localhost kernel: scim-bridge[32285]: segfault at c ip b800e887 sp bf92189c error 4 in libscim-1.0.so.8.2.4[b7fb3000+ca000]
    Oct 31 20:46:40 localhost scim-bridge: Cleanup, done. Exitting...
    Oct 31 20:46:40 localhost Cleanup, done. Exitting...
    Oct 31 20:46:56 localhost /usr/sbin/gpm[3556]: *** info [mice.c(1766)]:
    Oct 31 20:46:56 localhost /usr/sbin/gpm[3556]: imps2: Auto-detected intellimouse PS/2
    Oct 31 20:52:43 localhost acpid: client connected from 32099[0:100]
    Oct 31 20:52:43 localhost acpid: 1 client rule loaded
    Oct 31 20:52:51 localhost kernel: scim-bridge[32341]: segfault at c ip b7fc4887 sp bfa3459c error 4 in libscim-1.0.so.8.2.4[b7f69000+ca000]
    Oct 31 21:09:16 localhost -- MARK --
    Oct 31 21:29:16 localhost -- MARK --
    Oct 31 21:32:07 localhost kernel: scim-bridge[32466]: segfault at c ip b7f47887 sp bffef97c error 4 in libscim-1.0.so.8.2.4[b7eec000+ca000]
    Oct 31 21:32:10 localhost kernel: scim-bridge[705]: segfault at c ip b7e5b887 sp bf81fa5c error 4 in libscim-1.0.so.8.2.4[b7e00000+ca000]
    Oct 31 21:32:57 localhost kernel: scim-bridge[725]: segfault at c ip b7eb3887 sp bfc8394c error 4 in libscim-1.0.so.8.2.4[b7e58000+ca000]
    Oct 31 21:33:06 localhost kernel: scim-bridge[745]: segfault at c ip b803b887 sp bf819e8c error 4 in libscim-1.0.so.8.2.4[b7fe0000+ca000]
    Oct 31 21:34:50 localhost kernel: scim-bridge[760]: segfault at c ip b7ed3887 sp bfd6f24c error 4 in libscim-1.0.so.8.2.4[b7e78000+ca000]
    Oct 31 21:38:21 localhost kernel: scim-bridge[804]: segfault at c ip b7f94887 sp bfcf0a5c error 4 in libscim-1.0.so.8.2.4[b7f39000+ca000]
    Oct 31 21:38:32 localhost kernel: scim-bridge[862]: segfault at c ip b7f5c887 sp bfdf091c error 4 in libscim-1.0.so.8.2.4[b7f01000+ca000]
    Oct 31 21:40:27 localhost /usr/sbin/gpm[3556]: *** info [mice.c(1766)]:
    Oct 31 21:40:27 localhost /usr/sbin/gpm[3556]: imps2: Auto-detected intellimouse PS/2
    Oct 31 21:43:46 localhost acpid: client connected from 32099[0:100]
    Oct 31 21:43:46 localhost acpid: 1 client rule loaded
    Oct 31 21:47:54 localhost /usr/sbin/gpm[3556]: *** info [mice.c(1766)]:
    Oct 31 21:47:54 localhost /usr/sbin/gpm[3556]: imps2: Auto-detected intellimouse PS/2

     
  • Forgot to mention below:

    I have installed *only* scim-1.4.9, no other scim-related software. Using default X11 frontend that comes with scim. KDE 4.2.4, Slackware 13.0, and again Firefox 3.6.10.

     
  • Rolf
    Rolf
    2011-09-12

    • assigned_to: suzhe --> nobody
     
  • Tz-Huan Huang
    Tz-Huan Huang
    2012-09-19

    Sorry for the late reply. Do you still have this problem with newer version of scim? Thanks.