syl20bnr / spacemacs

A community-driven Emacs distribution - The best editor is neither Emacs nor Vim, it's Emacs *and* Vim!
http://spacemacs.org
GNU General Public License v3.0
23.64k stars 4.89k forks source link

Crash when inserting ✅ #13567

Closed dduenker closed 4 years ago

dduenker commented 4 years ago

Description :octocat:

Inserting ✅ into a new buffer crashes emacs, when i have the unicode-fonts layer activated.

Reproduction guide :beetle:

Observed behaviour: :eyes: :broken_heart: Emacs crashes

Expected behaviour: :heart: :smile: Emacs does not crash

OS: Arch Linux 5.6.11-arch1-1 Emacs: 26.3-1 Spacemacs devel commit d0f5477c323ef6600e29d22b75d876c49916b3f4

Backtrace :paw_prints:

X protocol error: BadLength (poly request too large or internal Xlib length error) on protocol request 139
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://gitlab.gnome.org/GNOME/gtk/issues/221
For details, see etc/PROBLEMS.
Fatal error 6: Aborted
(emacs:5097): GLib-WARNING **: 12:19:16.187: g_main_context_prepare() called recursively from within a source's check() or prepare() member.

(emacs:5097): GLib-WARNING **: 12:19:16.187: g_main_context_check() called recursively from within a source's check() or prepare() member.

Backtrace:
emacs[0x50fbcf]
emacs[0x4f5175]
emacs[0x50fc84]
emacs[0x4c0a62]
emacs[0x4c498a]
emacs[0x4c4a16]
/usr/lib/libX11.so.6(_XError+0xfb)[0x7f83734905db]
/usr/lib/libX11.so.6(+0x40388)[0x7f837348d388]
/usr/lib/libX11.so.6(+0x40425)[0x7f837348d425]
/usr/lib/libX11.so.6(_XEventsQueued+0x4a)[0x7f837348dd8a]
/usr/lib/libX11.so.6(XPending+0x62)[0x7f837347f782]
/usr/lib/libgdk-3.so.0(+0x41d30)[0x7f8373ae3d30]
/usr/lib/libglib-2.0.so.0(g_main_context_prepare+0x1a0)[0x7f8373620d80]
/usr/lib/libglib-2.0.so.0(+0x6d3c6)[0x7f83736213c6]
/usr/lib/libglib-2.0.so.0(g_main_context_pending+0x2a)[0x7f837362161a]
/usr/lib/libgtk-3.so.0(gtk_events_pending+0x10)[0x7f8373e21b30]
emacs[0x4c148f]
emacs[0x4fc542]
emacs[0x4fcbf5]
emacs[0x5e0e2c]
emacs[0x586c13]
emacs[0x5e3830]
emacs[0x5e3ad3]
emacs[0x5e3de7]
emacs[0x443e3b]
emacs[0x4405a9]
emacs[0x4458ba]
emacs[0x447035]
emacs[0x45073e]
emacs[0x43036c]
emacs[0x45506c]
emacs[0x45538c]
emacs[0x4555d8]
emacs[0x5632b6]
emacs[0x56d78d]
emacs[0x5ac1d1]
emacs[0x56d70b]
emacs[0x5ac1d1]
emacs[0x56d70b]
emacs[0x56d818]
emacs[0x56ca93]
...
[1]    5097 abort (core dumped)  emacs
picaschaf commented 4 years ago

Can't reproduce on macOS with GNU Emacs 26.3 (build 1, x86_64-apple-darwin18.5.0, Carbon Version 158 AppKit 1671.4) of 2020-03-24

dduenker commented 4 years ago

Well, it says X protocol error in the crashlog. Unless you are running X on your macOS, reproduction should be hard to do.

picaschaf commented 4 years ago

Well, it says X protocol error in the crashlog. Unless you are running X on your macOS, reproduction should be hard to do.

Then why do you report this bug here if you know it is a X problem?

dduenker commented 4 years ago

Ah well, i have no idea, why this only occurs in emacs and so far only with this emoji. Somehow emacs appears to be sending something strange to X. I have no idea, whether it is emacs, or gtk at fault. But i guess it is not X. Thanks for testing btw. :)

smile13241324 commented 4 years ago

@dduenker you need to provide some more information about your issue. Especially we require proper step by step instructions to reproduce your issue.

I have now entered a new buffer (opens in fundamental-mode) and there inserted :white_check_mark: via SPC i ewhite_check_mark. I have moved the cursor around but it did not kill my emacs. I have done the same with org-mode and it works flawlessly too.

Without more information I would assume this to be an issue between emacs and X. In this case your best bet would be to construct a minimal reproduction on vanilla emacs. If this reproduces your error you should open a bug upstream. If not it may be a side effect of one of the packages spacemacs loads. In this case you need to reduce the number of layers in your dotfile and see when the issue is gone. We can then have a more closer look at the layer in question.

Here is my system config:

#### System Info :computer:
- OS: gnu/linux
- Emacs: 26.3
- Spacemacs: 0.300.0
- Spacemacs branch: develop (rev. 097a1fc42)
- Graphic display: t
- Distribution: spacemacs
- Editing style: vim
- Completion: helm
- Layers:
```elisp
((lsp :variables lsp-navigation 'peek lsp-ui-doc-enable nil)
 dap
 (dart :variables dart-backend 'lsp lsp-dart-sdk-dir "~/Downloads/dart-sdk/")
 helm notmuch
 (scala :variables scala-backend 'scala-metals)
 spacemacs-purpose elasticsearch
 (yang :variables yang-pyang-rules "ietf")
 ietf scheme
 (auto-completion :variables auto-completion-return-key-behavior 'complete auto-completion-tab-key-behavior 'cycle auto-completion-complete-with-key-sequence nil auto-completion-complete-with-key-sequence-delay 0.1 auto-completion-idle-delay 0.2 auto-completion-private-snippets-directory nil auto-completion-enable-snippets-in-popup nil auto-completion-enable-help-tooltip t auto-completion-use-company-box nil auto-completion-enable-sort-by-usage t)
 syntax-checking better-defaults
 (clojure :variables clojure-enable-fancify-symbols t clojure-enable-sayid t clojure-enable-clj-refactor t clojure-enable-linters
          '(clj-kondo joker))
 gpu graphviz
 (plantuml :variables plantuml-jar-path "~/.plantuml/plantUml.jar" org-plantuml-jar-path "~/.plantuml/plantUml.jar")
 salt ibuffer emacs-lisp
 (org :variables org-want-todo-bindings t org-enable-github-support t org-enable-bootstrap-support t org-enable-reveal-js-support t org-enable-hugo-support t org-enable-trello-support t org-enable-epub-support t org-enable-verb-support t org-enable-sticky-header nil)
 (shell :variables shell-enable-smart-eshell nil shell-default-shell 'vterm shell-default-height 30 shell-default-position 'bottom shell-default-full-span nil shell-default-term-shell "/usr/bin/fish")
 version-control import-js
 (cmake :variables cmake-enable-cmake-ide-support t)
 (c-c++ :variables c-c++-default-mode-for-headers 'c++-mode c-c++-backend 'rtags c-c++-enable-clang-format-on-save t c-c++-adopt-subprojects t c-c++-enable-auto-newline t)
 web-beautify semantic templates epub themes-megapack git github sml bm
 (copy-as-format :variables copy-as-format-default "markdown" copy-as-format-asciidoc-include-file-name t)
 pass common-lisp
 (python :variables python-backend 'lsp python-lsp-server 'pyls python-test-runner 'pytest python-formatter 'lsp python-format-on-save t python-save-before-test t python-sort-imports-on-save t)
 windows-scripts jr
 (shell-scripts :variables shell-scripts-backend 'lsp)
 prodigy emoji
 (markdown :variables markdown-live-preview-engine 'vmd)
 bibtex
 (json :variables json-fmt-tool 'web-beautify json-fmt-on-save t)
 debug
 (latex :variables latex-enable-auto-fill t latex-enable-magic nil latex-enable-folding t)
 lua html
 (javascript :variables javascript-import-tool 'import-js javascript-backend 'lsp javascript-fmt-tool 'web-beautify javascript-repl 'nodejs js2-basic-offset 2 js-indent-level 2)
 react
 (yaml :variables yaml-enable-lsp t)
 prettier
 (multiple-cursors :variables multiple-cursors-backend 'evil-mc)
 nginx
 (docker :variables docker-dockerfile-backend 'lsp)
 csv search-engine
 (restclient :variables restclient-use-org t)
 restructuredtext selectric octave purescript speed-reading systemd imenu-list
 (java :variables java-backend 'lsp)
 groovy
 (go :variables go-backend 'lsp go-use-golangci-lint t gofmt-command "goimports" go-tab-width 4 go-format-before-save t go-use-gocheck-for-testing t go-use-test-args "-race -timeout 10s" godoc-at-point-function 'godoc-gogetdoc)
 coq django
 (elm :variables elm-sort-imports-on-save t elm-format-on-save t)
 kubernetes idris
 (haskell :variables haskell-completion-backend 'lsp haskell-enable-hindent t haskell-process-type 'stack-ghci)
 pandoc sphinx parinfer asciidoc
 (treemacs :variables treemacs-use-follow-mode t treemacs-use-filewatch-mode t treemacs-collapse-dirs 3 treemacs-use-git-mode 'deferred)
 ansible puppet rust hy xkcd typography vimscript
 (terraform :variables terraform-auto-format-on-save t)
 (ruby :variables ruby-enable-enh-ruby-mode t ruby-backend 'lsp)
 ruby-on-rails asm
 (sql :variables sql-capitalize-keywords t)
 perl6 autohotkey
 (elixir :variables flycheck-elixir-credo-strict t elixir-backend 'lsp)
 faust vagrant erlang
 (dash :variables helm-dash-docset-newpath "~/.local/share/Zeal/Zeal/docsets")
 games php helpful nginx racket
 (colors :variables colors-colorize-identifiers 'all)
 d unicode-fonts
 (typescript :variables typescript-backend 'lsp typescript-fmt-tool 'tide typescript-lsp-linter t typescript-linter 'tslint typescript-fmt-on-save t))
dduenker commented 4 years ago

I guess it has something to do with the used fonts. On the computer where it crashes i see the checkmark on green background. On another one it is just black and white and emacs does not crash. Minimal spacemacs config with just unicode-fonts additionally enabled suffices for the crashing. I guess i have to figure out, what is going on with the fonts.

dduenker commented 4 years ago

Some updates later and emacs 27: issue seems to have vanished.

silky commented 3 years ago

is it back in 28 @dduenker ? i seem to have a similar issue ....