merrickluo / liberime

A emacs dynamic module provide librime bindings for emacs
GNU General Public License v3.0
68 stars 13 forks source link

多次加载 liberime-core 会导致 emacs 崩溃 #59

Open tumashu opened 4 years ago

tumashu commented 4 years ago
./emacs/emacs-gtk/bin/emacs
F0503 17:01:29.300803 20755 utilities.cc:322] Check failed: !IsGoogleLoggingInitialized() You called InitGoogleLogging() twice!
*** Check failure stack trace: ***
    @     0x7f3088d93cad  google::LogMessage::Fail()
    @     0x7f3088d95b13  google::LogMessage::SendToLog()
    @     0x7f3088d93808  google::LogMessage::Flush()
    @     0x7f3088d96579  google::LogMessageFatal::~LogMessageFatal()
    @     0x7f3088d9ce42  google::glog_internal_namespace_::InitGoogleLoggingUtilities()
    @     0x7f309805bb3f  start
    @     0x5606571dae9a  funcall_module
    @     0x5606571b2c40  apply_lambda
    @     0x5606571b2f1b  eval_sub
    @     0x5606571b44cd  Flet
    @     0x5606571b3061  eval_sub
    @     0x5606571b35ed  funcall_lambda
    @     0x5606571b2c40  apply_lambda
    @     0x5606571b2f1b  eval_sub
    @     0x5606571b389d  Fif
    @     0x5606571b3061  eval_sub
    @     0x5606571b35ed  funcall_lambda
    @     0x5606571b2c40  apply_lambda
    @     0x5606571b2f1b  eval_sub
    @     0x5606571b345d  Fprogn
    @     0x5606571b3061  eval_sub
    @     0x5606571b3061  eval_sub
    @     0x5606571b345d  Fprogn
    @     0x5606571b3061  eval_sub
    @     0x5606571b3061  eval_sub
    @     0x5606571b35ed  funcall_lambda
    @     0x5606571b110f  Ffuncall
    @     0x5606571b1442  Fapply
    @     0x5606571b157c  apply1
    @     0x5606571b054a  internal_condition_case_1
    @     0x5606571e7928  exec_sentinel
    @     0x5606571e9c22  status_notify
Fatal error 6: Aborted
Backtrace:
./emacs/emacs-gtk/bin/emacs(+0x137c17)[0x560657155c17]
./emacs/emacs-gtk/bin/emacs(+0x425f3)[0x5606570605f3]
./emacs/emacs-gtk/bin/emacs(+0x42a30)[0x560657060a30]
./emacs/emacs-gtk/bin/emacs(+0x136598)[0x560657154598]
./emacs/emacs-gtk/bin/emacs(+0x136689)[0x560657154689]
/lib/x86_64-linux-gnu/libpthread.so.0(+0x12730)[0x7f309fb12730]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x10b)[0x7f309f7e87bb]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x121)[0x7f309f7d3535]
/lib/x86_64-linux-gnu/libglog.so.0(+0x160c7)[0x7f3088d9d0c7]
/lib/x86_64-linux-gnu/libglog.so.0(+0xccad)[0x7f3088d93cad]
/lib/x86_64-linux-gnu/libglog.so.0(_ZN6google10LogMessage9SendToLogEv+0x283)[0x7f3088d95b13]
/lib/x86_64-linux-gnu/libglog.so.0(_ZN6google10LogMessage5FlushEv+0xb8)[0x7f3088d93808]
/lib/x86_64-linux-gnu/libglog.so.0(_ZN6google15LogMessageFatalD2Ev+0x9)[0x7f3088d96579]
/lib/x86_64-linux-gnu/libglog.so.0(_ZN6google24glog_internal_namespace_26InitGoogleLoggingUtilitiesEPKc+0xc2)[0x7f3088d9ce42]
/home/feng/projects/emacs-packages/liberime/liberime-core.so(+0x2b3f)[0x7f309805bb3f]
./emacs/emacs-gtk/bin/emacs(+0x1bce9a)[0x5606571dae9a]
./emacs/emacs-gtk/bin/emacs(+0x194c40)[0x5606571b2c40]
./emacs/emacs-gtk/bin/emacs(+0x194f1b)[0x5606571b2f1b]
./emacs/emacs-gtk/bin/emacs(+0x1964cd)[0x5606571b44cd]
./emacs/emacs-gtk/bin/emacs(+0x195061)[0x5606571b3061]
./emacs/emacs-gtk/bin/emacs(+0x1955ed)[0x5606571b35ed]
./emacs/emacs-gtk/bin/emacs(+0x194c40)[0x5606571b2c40]
./emacs/emacs-gtk/bin/emacs(+0x194f1b)[0x5606571b2f1b]
./emacs/emacs-gtk/bin/emacs(+0x19589d)[0x5606571b389d]
./emacs/emacs-gtk/bin/emacs(+0x195061)[0x5606571b3061]
./emacs/emacs-gtk/bin/emacs(+0x1955ed)[0x5606571b35ed]
./emacs/emacs-gtk/bin/emacs(+0x194c40)[0x5606571b2c40]
./emacs/emacs-gtk/bin/emacs(+0x194f1b)[0x5606571b2f1b]
./emacs/emacs-gtk/bin/emacs(+0x19545d)[0x5606571b345d]
./emacs/emacs-gtk/bin/emacs(+0x195061)[0x5606571b3061]
./emacs/emacs-gtk/bin/emacs(+0x195061)[0x5606571b3061]
./emacs/emacs-gtk/bin/emacs(+0x19545d)[0x5606571b345d]
./emacs/emacs-gtk/bin/emacs(+0x195061)[0x5606571b3061]
./emacs/emacs-gtk/bin/emacs(+0x195061)[0x5606571b3061]
./emacs/emacs-gtk/bin/emacs(+0x1955ed)[0x5606571b35ed]
./emacs/emacs-gtk/bin/emacs(+0x19310f)[0x5606571b110f]
./emacs/emacs-gtk/bin/emacs(+0x193442)[0x5606571b1442]
./emacs/emacs-gtk/bin/emacs(+0x19357c)[0x5606571b157c]
./emacs/emacs-gtk/bin/emacs(+0x19254a)[0x5606571b054a]
./emacs/emacs-gtk/bin/emacs(+0x1c9928)[0x5606571e7928]
./emacs/emacs-gtk/bin/emacs(+0x1cbc22)[0x5606571e9c22]
...
已放弃
eggcaker commented 4 years ago

same as mine #48, for now I just hack it to void reinit it . it's not best way but works.

(use-package! liberime
  :when (featurep! +rime)
  :load-path (lambda()(expand-file-name "liberime" +my-ext-dir))
  :defer 1
  :unless liberime-is-loaded ;; HERE
  :custom
  (rime_share_data_dir "/Library/Input Methods/Squirrel.app/Contents/SharedSupport/")
  (rime_user_data_dir (expand-file-name "rime" +my-ext-dir))
  :init
  (module-load (expand-file-name "liberime.so" +my-ext-dir))
  :config
  (setq liberime-is-loaded t) ;; AND HERE
  (liberime-start rime_share_data_dir rime_user_data_dir)
  (liberime-select-schema "luna_pinyin_simp"))

I'm using doom-emacs BTW.