rime / ibus-rime

【中州韻】Rime for Linux/IBus
https://rime.im
GNU General Public License v3.0
738 stars 105 forks source link

Solus segmentation fault #21

Closed Raymonf closed 7 years ago

Raymonf commented 7 years ago

Hi!

I'm trying to use ibus-rime on Solus OS, and when I switch to Rime with ibus-daemon, this shows:

(ibus-ui-gtk3:3112): IBUS-WARNING **: ibus_bus_call_sync: org.freedesktop.IBus.SetGlobalEngine: GDBus.Error:org.freedesktop.DBus.Error.Failed: Set global engine failed: The connection is closed

(ibus-ui-gtk3:3112): IBUS-WARNING **: panel.vala:817: Switch engine to rime failed.

Upon debugging /usr/lib/ibus-rime/ibus-engine-rime in gdb, this is revealed:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff374071a in std::ostream::sentry::sentry(std::ostream&) ()
   from /usr/lib64/libstdc++.so.6

Any ideas? Thanks.

lotem commented 7 years ago

Need more information. Can you please post the full stack trace? i.e. the output by typing bt at the gdb breakpoint.

Raymonf commented 7 years ago

Oh, that's how you show it. I was looking for that!

(gdb) bt
#0  0x00007ffff374071a in std::ostream::sentry::sentry(std::ostream&) ()
    at /usr/lib64/libstdc++.so.6
#1  0x00007ffff3740ebd in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) () at /usr/lib64/libstdc++.so.6
#2  0x00007ffff6afff74 in rime_core_initialize() (__s=0x7ffff6c0a470 "registering core components.", __out=...) at /usr/include/c++/6.2.0/ostream:561
#3  0x00007ffff6afff74 in rime_core_initialize() ()
    at /home/raymonf/rimeime/librime-master/src/core_module.cc:21
#4  0x00007ffff6aff4ab in rime::ModuleManager::LoadModule(rime_module_t*) (this=this@entry=0x619c00, module=module@entry=0x7ffff6e55420 <rime_register_module_core()::module>) at /home/raymonf/rimeime/librime-master/src/module.cc:34
#5  0x00007ffff6b09c8a in rime::LoadModules(char const**) (module_names=<optimized out>) at /home/raymonf/rimeime/librime-master/src/setup.cc:25
#6  0x00007ffff6aff4ab in rime::ModuleManager::LoadModule(rime_module_t*) (this=this@entry=0x619c00, module=module@entry=0x7ffff6e554a0 <rime::rime_register_module_default()::module>)
    at /home/raymonf/rimeime/librime-master/src/module.cc:34
#7  0x00007ffff6b09c8a in rime::LoadModules(char const**) (module_names=<optimized out>) at /home/raymonf/rimeime/librime-master/src/setup.cc:25
#8  0x00007ffff6b0aa9e in RimeInitialize(RimeTraits*) (traits=0x7fffffffde30)
    at /home/raymonf/rimeime/librime-master/src/rime_api.cc:87
#9  0x000000000040453c in ibus_rime_start ()
---Type <return> to continue, or q <return> to quit---
lotem commented 7 years ago

It appears to have crashed when writing logs to /tmp/rime.ibus.*. Is there anything special about the /tmp directory on the system?

Raymonf commented 7 years ago

I'm not completely sure. As a normal user, I can touch files in /tmp/, as well as write to and delete them.

Also, this happens with rime_deployer as well, so I had to manually put brise data, which I compiled on another system, in /usr/share/brise:

Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5a5971a in std::ostream::sentry::sentry(std::ostream&) ()
   from /usr/lib64/libstdc++.so.6
(gdb) bt
#0  0x00007ffff5a5971a in std::ostream::sentry::sentry(std::ostream&) ()
   from /usr/lib64/libstdc++.so.6
#1  0x00007ffff5a59ebd in std::basic_ostream<char, std::char_traits<char> >& std::__ostream_insert<char, std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*, long) () from /usr/lib64/libstdc++.so.6
#2  0x00007ffff7b72042 in operator<< <std::char_traits<char> > (
    __s=0x7ffff7b938d7 "updating workspace.", __out=...)
    at /usr/include/c++/6.2.0/ostream:561
#3  rime::WorkspaceUpdate::Run (this=this@entry=0x7fffffffdff0, 
    deployer=deployer@entry=0x61cc10)
    at /home/raymonf/rimeime/librime-master/src/lever/deployment_tasks.cc:113
#4  0x0000000000402d31 in main (argc=1, argv=0x7fffffffe1a8)
    at /home/raymonf/rimeime/librime-master/tools/rime_deployer.cc:95
(gdb) 

image

Raymonf commented 7 years ago

Whoops, I'm an idiot. I used the latest version of glog instead of what was bundled (in thirdparty/src) since I didn't know it was there.

Works now. Perhaps put it into the docs?