Giter Site home page Giter Site logo

Comments (15)

MartinNowak avatar MartinNowak commented on June 8, 2024

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.

MartinNowak avatar MartinNowak commented on June 8, 2024

You can break out of whatever infinite loop is causing this using C-g (keyboard-quit).

from emacs-d-mode.

CyberShadow avatar CyberShadow commented on June 8, 2024

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.

MartinNowak avatar MartinNowak commented on June 8, 2024

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.

CyberShadow avatar CyberShadow commented on June 8, 2024

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.

MartinNowak avatar MartinNowak commented on June 8, 2024

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.

CyberShadow avatar CyberShadow commented on June 8, 2024

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.

MartinNowak avatar MartinNowak commented on June 8, 2024

Yes every time, but only when the cursor or screen in around that line number.

from emacs-d-mode.

MartinNowak avatar MartinNowak commented on June 8, 2024

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.

CyberShadow avatar CyberShadow commented on June 8, 2024

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.

MartinNowak avatar MartinNowak commented on June 8, 2024

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.

CyberShadow avatar CyberShadow commented on June 8, 2024

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.

MartinNowak avatar MartinNowak commented on June 8, 2024

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.

CyberShadow avatar CyberShadow commented on June 8, 2024

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.

MartinNowak avatar MartinNowak commented on June 8, 2024

It was fixed by #65, should be closed.

from emacs-d-mode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.