Pat*_*tin 7 keyboard input-method ibus chinese pinyin
我用智能拼音键盘1用ibus
在Ubuntu中输入字符中国到我的文档。
它input-method
的设计方式是,键入pinyin
与字符相关联的字符,然后可以使用数字从字符列表中选择它0-9在键盘上。
例子:
问题:在上周,有时会发生这样的情况,当我按下一个数字时0-9输入法不会产生一个汉字,而是我按下的数字。此外,任何进一步的键盘输入都不会被解释为 ibus 的输入,而只会按原样写在屏幕上,直到我pinyin
再次手动切换输入模式。
我尝试了什么,按顺序:
这些似乎都没有帮助。
问:有谁知道如何解决这个问题?
作为旁注,里面似乎有一个*ibus-engine-libpinyin.*.crash
文件/var/crash
可能与这个问题有关。但是,我不确定如何在线跟踪此错误报告并查看它是否已经在线解决。
编辑:我目前的解决方法是使用fcitx
而不是ibus
.. 虽然这并不能真正解决软件中的问题。
1 智能拼音键盘可以通过调用安装,sudo apt-get install ibus-libpinyin
并且可以定位All Setting-->Text Entry-->Input sources to use-->+为中文(智能拼音)(Ibus)。
特尔;博士: rm ~/.cache/ibus/libpinyin/*
长答案:
我有类似的问题,除了我的问题无法在下一列> 中返回任何中文字符。
我做的第一件事是运行watch -n 3 -d 'ps auxww|tac'
以比较成功(第一列)和失败(下一列)发生时输出之间的差异。
我很快注意到它/usr/lib/ibus/ibus-engine-libpinyin --ibus
在成功时仍在运行,但在失败时消失。
这意味着/usr/lib/ibus/ibus-engine-libpinyin --ibus
在下一列中选择字符时进程崩溃。
既然前面的进程没了,一边Super+Space切换新的libpinyin进程,选择第一列,然后ps auxww
在另一个终端运行知道最新的pid
是6798
,运行sudo strace -ff -vvv -p 6798 -s 1000000
了解进程:
[pid 6798] lseek(14, 12288, SEEK_SET) = 12288
[pid 6798] read(14, "", 4096) = 0
[pid 6798] write(2, "ibus-engine-libpinyin: ../src/lookup/phonetic_lookup.h:901: bool pinyin::PhoneticLookup<nbest>::train_result3(const pinyin::PhoneticKeyMatrix*, const pinyin::ForwardPhoneticConstraints*, MatchResult) [with int nbest = 3; MatchResult = _GArray*; GArray = _GArray]: Assertion `m_user_bigram->store(last_token, user)' failed.\n", 323) = 323
[pid 6798] mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f59a80e2000
[pid 6798] rt_sigprocmask(SIG_UNBLOCK, [ABRT], NULL, 8) = 0
[pid 6798] rt_sigprocmask(SIG_BLOCK, ~[RTMIN RT_1], [], 8) = 0
[pid 6798] getpid() = 6798
[pid 6798] gettid() = 6798
[pid 6798] tgkill(6798, 6798, SIGABRT) = 0
[pid 6798] rt_sigprocmask(SIG_SETMASK, [], NULL, 8) = 0
[pid 6798] --- SIGABRT {si_signo=SIGABRT, si_code=SI_TKILL, si_pid=6798, si_uid=1000} ---
[pid 6800] <... poll resumed> <unfinished ...>) = ?
[pid 6799] <... restart_syscall resumed>) = ?
[pid 6800] +++ killed by SIGABRT (core dumped) +++
[pid 6799] +++ killed by SIGABRT (core dumped) +++
+++ killed by SIGABRT (core dumped) +++
Run Code Online (Sandbox Code Playgroud)
在下一列中选择字符后,strace 输出停止。现在我知道这是核心 dumped。另一种方法是调试tail -f /var/log/syslog
以知道它是systemd-coredump
.
所以我跑去coredumpctl list
知道相关的核心转储pid
是6798
:
Sun 2018-10-28 06:18:31 +08 6798 1000 1000 6 present /usr/lib/ibus/ibus-engine-libpinyin
Run Code Online (Sandbox Code Playgroud)
我运行coredumpctl dump 6798 --output alamak
将 coredump 保存到 alamak 文件中,然后运行gdb -q /usr/lib/ibus/ibus-engine-libpinyin alamak
(可执行路径可以从ps auxww
或获取coredumpctl list
)以检查 coredump 文件:
xb@dnxb:~$ gdb -q /usr/lib/ibus/ibus-engine-libpinyin alamak
expansion: History expansion on command input is on.
filename: The filename in which to record the command history is "/home/xiaobai/.gdb_history".
remove-duplicates: The number of history entries to look back at for duplicates is 0.
save: Saving of the history record on exit is on.
size: The size of the command history is 10000000.
Reading symbols from /usr/lib/ibus/ibus-engine-libpinyin...(no debugging symbols found)...done.
warning: core file may not match specified executable file.
[New LWP 6798]
[New LWP 6800]
[New LWP 6799]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Core was generated by `/usr/lib/ibus/ibus-engine-libpinyin --ibus'.
Program terminated with signal SIGABRT, Aborted.
#0 __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51
51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
[Current thread is 1 (Thread 0x7f59a80971c0 (LWP 6798))]
Run Code Online (Sandbox Code Playgroud)
尝试thread apply all bt full
和Enter浏览下一页,我可以看到一些有趣的关键字是与以前相同strace
的write()
输出:
(gdb) thread apply all bt full
Thread 3 (Thread 0x7f59a36a9700 (LWP 6799)):
...
#1 0x00007f59a67cd801 in __GI_abort () at abort.c:79
save_stage = 1
act =
{__sigaction_handler = {sa_handler = 0x555b8ce58800, sa_sigaction = 0x555b8ce58800}, sa_mask = {__val = {0, 18446744073709551600, 0, 0, 0, 140733365772904, 0, 140733365772736, 140023023567312, 21474836480, 140023023552472, 0, 2476426370025201152, 140023023537428, 0, 140023023552472}}, sa_flags = -1488188568, sa_restorer = 0x7f59a74c0c00}
sigs = {__val = {32, 0 <repeats 15 times>}}
#2 0x00007f59a67bd39a in __assert_fail_base (fmt=0x7f59a69447d8 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=assertion@entry=0x7f59a74c0c00 "m_user_bigram->store(last_token, user)", file=file@entry=0x7f59a74c0b68 "../src/lookup/phonetic_lookup.h", line=line@entry=901, function=function@entry=0x7f59a74c14e0 "bool pinyin::PhoneticLookup<nbest>::train_result3(const pinyin::PhoneticKeyMatrix*, const pinyin::ForwardPhoneticConstraints*, MatchResult) [with int nbest = 3; MatchResult = _GArray*; GArray = _GArra"...) at assert.c:92
str = 0x555b8ce58800 ""
total = 4096
#3 0x00007f59a67bd412 in __GI___assert_fail (assertion=0x7f59a74c0c00 "m_user_bigram->store(last_token, user)", file=0x7f59a74c0b68 "../src/lookup/phonetic_lookup.h", line=901, function=0x7f59a74c14e0 "bool pinyin::PhoneticLookup<nbest>::train_result3(const pinyin::PhoneticKeyMatrix*, const pinyin::ForwardPhoneticConstraints*, MatchResult) [with int nbest = 3; MatchResult = _GArray*; GArray = _GArra"...) at assert.c:101
#4 0x00007f59a7476a71 in pinyin_train () at /usr/lib/x86_64-linux-gnu/libpinyin.so.13
#5 0x0000555b8c7e5689 in ()
Run Code Online (Sandbox Code Playgroud)
现在导致 coredump 的主要关键字已经被确认,googleconst pinyin::PhoneticKeyMatrix*, const pinyin::ForwardPhoneticConstraints*
会发现这个错误报告线程:
我在终端中运行 libpinyin 并收到以下错误消息:
debian-user:~$ /usr/lib/ibus/ibus-engine-libpinyin --ibus ibus-engine-libpinyin: ../src/lookup/phonetic_lookup.h:901: bool pinyin::PhoneticLookup::train_result3(const pinyin::PhoneticKeyMatrix*, const pinyin::ForwardPhoneticConstraints*, MatchResult) [int nbest = 3; 匹配结果 = _GArray*; GArray = _GArray]:断言 `m_user_bigram->store(last_token, user)' 失败。中止
所以这个错误与用户数据有关。当您选择第一个以外的短语时,libpinyin 会尝试将其存储在您的主文件夹中。如果它不起作用,它将失败并退出。
您可能需要检查 ~/.cache/ibus/libpinyin/ 中的内容。我只是删除了这个文件夹中的所有文件并杀死 ibus-engine-libpinyin 进程来重新启动它。他们的事情又恢复正常了。我想你遇到的问题很可能和我的一样。如果不是,请在终端中运行 ibus-engine-libpinyin 时提供错误消息
...
我按照您的指示删除了 ~./cache/ibus/libpinyin 文件夹。问题解决了。
就是这样,运行rm ~/.cache/ibus/libpinyin/*
,它解决了问题。
归档时间: |
|
查看次数: |
1907 次 |
最近记录: |