Comments (15)
Same issue here, since I updated d-mode from 20150317.117 to 20151205.2354 I'm constantly experiencing freezes on certain files.
from emacs-d-mode.
You can break out of whatever infinite loop is causing this using C-g (keyboard-quit).
from emacs-d-mode.
It works for me, does it still happen for you?
If you pkill -SIGUSR2 emacs
, what stack trace do you get in the debugger?
from emacs-d-mode.
If you pkill -SIGUSR2 emacs, what stack trace do you get in the debugger?
Debugger entered--entering a function:
* #[0 "\300?\205��\301\302!\207" [t restore-buffer-modified-p nil] 2]()
syntax-propertize(121589)
internal--syntax-propertize(119589)
parse-partial-sexp(118640 121640)
c-state-semi-safe-place(264264)
c-literal-limits()
c-fl-decl-start(263347)
c-context-expand-fl-region(263347 263847)
#[(fn) "� \n\"\211�@��A\211�\207" [fn new-beg new-end new-region] 4](c-context-expand-fl-region)
mapc(#[(fn) "� \n\"\211�@��A\211�\207" [fn new-beg new-end new-region] 4] (c-context-expand-fl-region))
c-before-context-fl-expand-region(263347 263847)
c-font-lock-fontify-region(263347 263847 nil)
font-lock-fontify-region(263347 263847)
#[257 "\211\300\301\"\211\242\306=\203��\211A\202��\300\301B\211@�A\211�\302\211\242\206 �e�]\240\210\303\211\242\206+�d�^\240\210\304\211\242�^\240\210\305\211\242�]\240\210\307\266\202\207" [263347 263847 (nil) (nil) (263347) (263847) jit-lock-bounds nil] 10 "\n\n(fn FUN)"](font-lock-fontify-region)
run-hook-wrapped(#[257 "\211\300\301\"\211\242\306=\203��\211A\202��\300\301B\211@�A\211�\302\211\242\206 �e�]\240\210\303\211\242\206+�d�^\240\210\304\211\242�^\240\210\305\211\242�]\240\210\307\266\202\207" [263347 263847 (nil) (nil) (263347) (263847) jit-lock-bounds nil] 10 "\n\n(fn FUN)"] font-lock-fontify-region)
jit-lock--run-functions(263347 263847)
jit-lock-fontify-now(263347 263847)
jit-lock-function(263347)
redisplay_internal\ \(C\ function\)()
from emacs-d-mode.
Actually I get this too. However, I can't reproduce it with that file. What file do you get it to freeze with?
from emacs-d-mode.
https://raw.githubusercontent.com/dlang/dmd/c41f00bd16297c5855ed21de72d2e63aa8fc08e5/src/expression.d at line 8334 (use revert-buffer while your cursor is in that area).
from emacs-d-mode.
Unfortunately I can't reproduce that (though I did encounter freezes with similar stack traces). Can you reproduce it every time?
I guess I'll be on the lookout for cases that I can reproduce.
from emacs-d-mode.
Yes every time, but only when the cursor or screen in around that line number.
from emacs-d-mode.
I guess I'll be on the lookout for cases that I can reproduce.
Let's turn it around then, how would you debug/fix the issue if you could reproduce it. Maybe I can fix it instead.
from emacs-d-mode.
Well, as far as I can tell, the stack trace is useless. It does contain point pairs that mark the region being fontified, but I have not found it to have any direct relevance to the freezes. At least, deleting everything but the code between the mentioned points did not allow me to reproduce the freeze, IIRC. It also doesn't mention (at least in a comprehensible way) which syntax rule / regular expression is causing the freeze.
What I would probably do is somehow rig it up with DustMite, and attempt to reduce it to the minimal code that makes Emacs freeze...
from emacs-d-mode.
I doesn't actually freeze but manages to continue after a long while. I could track it down to backtick (`) delimited words, either in a ddoc comment or as string. Emacs even freezes when typing in an existing backticks string. Maybe it's trying to match a backtick across many hundred lines?
from emacs-d-mode.
It's possible.
Make sure you're using the latest version, I fixed a bug with backticks and backslashes a while ago:
#65
from emacs-d-mode.
I fixed a bug with backticks and backslashes a while ago:
A while ago is good ;), you fixed it while I was involved in this bug report.
Exclude the \ character from the character set excluding `. This was also causing fontification to take an exponential time, to a lesser degree.
Glad this was resolved w/ #65.
from emacs-d-mode.
FWIW, I haven't encountered this recently. Perhaps it was fixed in an Emacs update.
If someone has a reproducible test case, please post it.
from emacs-d-mode.
It was fixed by #65, should be closed.
from emacs-d-mode.
Related Issues (20)
- Emacs 27.1 regression ? HOT 2
- Identifier `function` is not highlighted as keyword HOT 2
- Wrong indentation for 'else version'
- Enum members not highlighted after `deprecated`
- Wrong syntax highlight for WYSIWYG strings HOT 3
- Incorrect indentation of align(N) aggregate
- Missing fontification of member function names returning a typeof(this) HOT 2
- Wrong indentation for `catch` after `try` in brace-less `if`
- Error when missing strings and unbalanced parenthesis HOT 9
- Inconsistent `enum` highlighting (type name and members) HOT 3
- Adjust indention of attribute colon qualifier
- README.md says this software is GPLv2 which is not coherent with the COPYING file
- Escapes within backtip nested in string are ignored HOT 1
- MELPA package appears broken HOT 2
- Dead project? HOT 1
- Use cc-mode syntax parsing for imenu?
- Parenthesis-const/immutable qualified function parameters and return types HOT 4
- Cannot find function rx-form HOT 2
- wrong-type-argument error when triggering electric mode HOT 3
- Please do not bundle undercover HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emacs-d-mode.