-
Notifications
You must be signed in to change notification settings - Fork 174
Closed
Labels
Description
When 'export', 'preview' a md file with markdown-mode with multimarkdown-6, it will consume all the memory then crash the OS (Windows)!
But running the multimarkdown command directly with the same file works fine.
Expected Behavior
At least it should not crash the OS.
Actual Behavior
The multimarkdown process consumes all the memory (16G) and crashes the OS (Win7, Win10).
Steps to Reproduce
- Running on Chinese Win7 or Win10
- Installed multimarkdown-6 (6.3.0)
- Load markdown-mode with following configurations
(require 'markdown-mode) (setq markdown-command "multimarkdown") ; (autoload 'gfm-mode "markdown-mode" "Major mode for editing GitHub Flavored Markdown files" t) (setq markdown-fontify-code-blocks-natively nil) (setq markdown-xhtml-header-content "about 300K JS/CSS content")
- Open any md doc (UTF-8 encoded)
- Do 'export' or 'preview'
- Then Cpu starts flying~~ (win7 will halt without any chance, while win10 will allow some while to kill the process)
Backtrace
No backtrace could not be found since the OS crashed.
Software Versions
- Markdown Mode: From Git on 2017-10-17, 2.4-dev, and 2.3 (suffered a long time)
- Emacs: 25.3.1, 25.2, 225.1-2 (x86_64 from GNU)
- OS: Win7, Win10
- Multimarkdown: 6.3.0, 6.2.3, 6.2.2, 6.2.1, 5.4.0
Temporary Solution
- .emacs, setting encoding for multimarkdown process
(when (eq system-type 'windows-nt) (set-default 'process-coding-system-alist '( ("[pP][lL][iI][nN][kK]" gbk ) ("[mM][uU][lL][tT][iI][mM][aA][rR][kK][dD][oO][wW][nN]" utf-8 ) ("[cC][mM][dD][pP][rR][oO][xX][yY]" gbk . gbk) )))
- markdown-mode.el, change to call the multimarkdown.exe directly.
Find the line(call-process-region, then change to(if (eq system-type 'windows-nt) (call-process-region begin-region end-region markdown-command nil buf nil) (call-process-region begin-region end-region shell-file-name nil buf nil shell-command-switch markdown-command))