{"action":"created","issue":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/4730","repository_url":"https://api.github.com/repos/syl20bnr/spacemacs","labels_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/4730/labels{/name}","comments_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/4730/comments","events_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/4730/events","html_url":"https://github.com/syl20bnr/spacemacs/issues/4730","id":127986871,"number":4730,"title":"magit ediff on unstaged file leads to emacs freeze.","user":{"login":"vibrys","id":12416154,"avatar_url":"https://avatars.githubusercontent.com/u/12416154?v=3","gravatar_id":"","url":"https://api.github.com/users/vibrys","html_url":"https://github.com/vibrys","followers_url":"https://api.github.com/users/vibrys/followers","following_url":"https://api.github.com/users/vibrys/following{/other_user}","gists_url":"https://api.github.com/users/vibrys/gists{/gist_id}","starred_url":"https://api.github.com/users/vibrys/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vibrys/subscriptions","organizations_url":"https://api.github.com/users/vibrys/orgs","repos_url":"https://api.github.com/users/vibrys/repos","events_url":"https://api.github.com/users/vibrys/events{/privacy}","received_events_url":"https://api.github.com/users/vibrys/received_events","type":"User","site_admin":false},"labels":[{"id":329967402,"url":"https://api.github.com/repos/syl20bnr/spacemacs/labels/-%20Bug%20tracker%20-","name":"- Bug tracker -","color":"fef2c0","default":false},{"id":201666821,"url":"https://api.github.com/repos/syl20bnr/spacemacs/labels/Kills%20Kittens%20(=%5E-%5E=)","name":"Kills Kittens (=^-^=)","color":"e11d21","default":false},{"id":212480865,"url":"https://api.github.com/repos/syl20bnr/spacemacs/labels/To%20be%20reproduced","name":"To be reproduced","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-01-21T18:15:32Z","updated_at":"2016-11-05T09:06:37Z","closed_at":null,"body":"#### Description\n\nmagit ediff command on unstaged file leads to emacs freeze.\nThis does not happen at every ediff command. Roughly 30% visits lead to freeze. Remaining ones behave correctly.\nIt never happened when ediffing file change from an already commited change.\nThis also does not happen on my non-spacemacs configuration, where ediff is also within the same single window.\n#### Reproduction guide\n- Start Emacs\n- visit project directory\n- SPC g s  - magit-status\n- edit some project file\n- go back go magit status buffer.\n- g  to refresh.\n- point the unstaged file changed.\n- e   - ediff session will popup.\n- visit next/previous differences with n/p\n\nat some point emacs stops responding on n/p keypresses and it starts consuming 100% CPU.\nSubsequent C-g makes emacs back from freeze, but cursor is left within most left source code window, not within ediff bottom line.\n#### System Info\n- OS: gnu/linux\n- Emacs: 24.5.1\n- Spacemacs: 0.105.9\n- Spacemacs branch: master (rev. 0562f05)\n- Distribution: spacemacs\n- Editing style: emacs\n- Completion: helm\n- Layers:\n\n``` elisp\n(auto-completion emacs-lisp git syntax-checking python c-c++ cscope themes-megapack)\n```\n#### Backtrace\n\nafter toggle-debug-on-quit, C-g tells:\n\nDebugger entered--Lisp error: (quit)\n  redisplay_internal\\ (C\\ function)()\n"},"comment":{"url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/comments/258599795","html_url":"https://github.com/syl20bnr/spacemacs/issues/4730#issuecomment-258599795","issue_url":"https://api.github.com/repos/syl20bnr/spacemacs/issues/4730","id":258599795,"user":{"login":"bmag","id":4334375,"avatar_url":"https://avatars.githubusercontent.com/u/4334375?v=3","gravatar_id":"","url":"https://api.github.com/users/bmag","html_url":"https://github.com/bmag","followers_url":"https://api.github.com/users/bmag/followers","following_url":"https://api.github.com/users/bmag/following{/other_user}","gists_url":"https://api.github.com/users/bmag/gists{/gist_id}","starred_url":"https://api.github.com/users/bmag/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bmag/subscriptions","organizations_url":"https://api.github.com/users/bmag/orgs","repos_url":"https://api.github.com/users/bmag/repos","events_url":"https://api.github.com/users/bmag/events{/privacy}","received_events_url":"https://api.github.com/users/bmag/received_events","type":"User","site_admin":false},"created_at":"2016-11-05T09:06:37Z","updated_at":"2016-11-05T09:06:37Z","body":"According to the backtrace provided by @PrgrmAtCeleritas (thank you!), `C-g` was pressed during the execution of `spacemacs/linum-update-window-scale-fix`, which is an `:after` advice of `linum-update-window`, inside `linum-after-scroll` inside the redisplay engine. This suggests that our advice might cause an infinite loop of calling the redisplay engine. `spacemacs/linum-update-window-scale-fix` calls `set-window-margins`, which calls `apply_window_adjustment`, which calls `wset_redisplay`, which might trigger a new redisplay (but I'm not familiar with the code, so take it with a grain of salt). However, I was not able to reproduce the issue even with `dotspacemacs-line-numbers` set to `t` or `relative`. @PrgrmAtCeleritas, can you confirm that the bug is reproducible with `dotspacemacs-line-numbers` set to `nil`, so we can rule it out?\r\n\r\n> If I remove the line ediff-window-setup-function 'ediff-setup-windows-plain from defaults\r\n\r\nInstead, you can add this line to `user-config`: (it will override Spacemacs' settings)\r\n```elisp\r\n(setq ediff-window-setup-function 'ediff-setup-windows-default)\r\n```\r\nCan anyone else who is facing this problem confirm that setting `ediff-window-setup-function` in `user-config` is a valid work-around?\r\n\r\n> I am not sure what the Spacemacs Collaborators want to do about this issue since it is clearly not affecting everyone.\r\n\r\nWe'd like to fix the issue, of course, but I fear it might take some serious expertise, especially regarding the display engine. Since we barely have a clue of what's wrong, our concern right now is to isolate the cause for the issue as much as possible. Unfortunately I still can't reproduce the issue, so I have to ask you to take on yourself most of the burden of debugging.\r\n\r\nCan you reproduce it with spacemacs-base? Change `dotspacemacs-distribution` to `spacemacs-base` and add these layers to ``:\r\n```\r\nspacemacs-completion\r\nspacemacs-layouts\r\nspacemacs-editing\r\nspacemacs-editing-visual\r\nspacemacs-evil\r\nspacemacs-language\r\nspacemacs-misc\r\nspacemacs-purpose ;; only if you're on develop, doesn't exist on master\r\nspacemacs-ui\r\nspacemacs-ui-visual\r\nspacemacs-org\r\n```\r\nThis has the same effect as using the default `spacemacs` distribution. Once you've done this, you can start disabling layers (by commenting them out) to test which ones are necessary to reproduce the bug. `which-key` and `ediff` packages belong to `spacemacs-base`, and `evil-ediff` belongs to `spacemacs-evil`, so you might be able to reproduce the bug with only the `spacemacs-evil` layer enabled. Be sure to **change `dotspacemacs-install-packages` to `used-but-keep-unused`** beforehand, so you don't have to reinstall packages every time you change the configuration.\r\n\r\nYou can also try to reproduce the issue with plain Emacs, `which-key` and `evil-ediff`. This `~/.emacs` file might help:\r\n```elisp\r\n(require 'package)\r\n;; if you use a non-nil `dotspacemacs-elpa-subdirectory':\r\n;; (setq package-user-dir \"path/to/elpa\")\r\n(package-initialize)\r\n\r\n(require 'which-key)\r\n(require 'evil-ediff)\r\n\r\n;; which-key configuration goes here\r\n;; ediff configuration goes here\r\n;; evil-ediff configuration goes here\r\n```\r\n\r\n@vibrys we would like to hear your feedback as well."}}
{"actor":{"display_login":"bmag"}}