emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: William Denton <william@williamdenton.org>
To: Emacs Org mode mailing list <emacs-orgmode@gnu.org>
Subject: (jit-lock-function 1) signaled (error "Stack overflow in regexp matcher")
Date: Thu, 15 Feb 2024 20:40:02 +0000	[thread overview]
Message-ID: <TW1nDd5wI3ODXpzz0169CSo1f3N08jisnkkxE-mjSLx70YHJpoJ4syP_EKHezQbXjLuQvKyjtphDGbQTdnde0Xtmn25EDdwHzae3mKZWxS8=@williamdenton.org> (raw)

I am having a problem I've never seen before: Org can't handle anything more in a large file I have!

This file is where I keep my notes day to day for work, with headings for months and days and categories of work, with a lot of notes and clocking in and out.  It has about 10,000 lines and is about 550K in size.

When I add today's notes to the file (fifty lines and ten clockings), it starts throwing these errors:

File mode specification error: (error Stack overflow in regexp matcher)
Error during redisplay: (jit-lock-function 1) signaled (error "Stack overflow in regexp matcher")
Error during redisplay: (jit-lock-function 1501) signaled (error "Stack overflow in regexp matcher")
Error during redisplay: (jit-lock-function 3001) signaled (error "Stack overflow in regexp matcher")

Org works, but it's not displaying properly: no fancy bullets, no proportional spacing, no font size differences---it looks like I was running it in terminal mode.  This makes sense if the problem is with font locking.

If I remove today's notes and reload, everything looks fine.  If I add in even one more heading and reload, it chokes again and the formatting is all lost.

I turned on debugging and restarted, and got a big stack trace, which I will paste in below.  If "marker at 770" means line 770 then I don't know what's going on, because it's just regular stuff there and around it.

What can I do to determine where the problem is?  Any help appreciated.

Bill

--
William Denton
https://www.miskatonic.org/
Librarian, artist and licensed private investigator.
Toronto, Canada

Debugger entered--Lisp error: (error "Stack overflow in regexp matcher")
  re-search-forward("^[ \11]*\\(\\\\begin{\\([a-zA-Z0-9\\*]+\\)\\(?:.\\|\n\\)+?\\\\end{\\2}\\)\\|\\([^$]\\|^\\)\\(\\$[^ \11\15\n,;.$]\\$\\)\\(\\s.\\|\\s-\\|\\s(\\|\\s)\\|\\s\"\\|'\\|$\\)\\|\\([^$]\\|^\\)\\(\\(\\$\\([^ \11\n,;.$][^$\n\15]*?\\(\n[^$\n\15]*?\\)\\{0,2\\}[^ \11\n,.$]\\)\\$\\)\\)\\(\\s.\\|\\s-\\|\\s(\\|\\s)\\|\\s\"\\|'\\|$\\)\\|\\\\(\\(?:.\\|\n\\)*?\\\\)\\|\\\\\\[\\(?:.\\|\n\\)*?\\\\\\]\\|\\$\\$\\(?:.\\|\n\\)*?\\$\\$" nil t)
  org-do-latex-and-related(#<marker at 770 in work-diary.org>)
  font-lock-fontify-keywords-region(522 #<marker at 770 in work-diary.org> nil)
  font-lock-default-fontify-region(522 #<marker at 770 in work-diary.org> nil)
  font-lock-fontify-region(522 #<marker at 770 in work-diary.org>)
  #f(compiled-function (beg end) #<bytecode -0x348042b06e77250>)(522 #<marker at 770 in work-diary.org>)
  font-lock-ensure(522 #<marker at 770 in work-diary.org>)
  org-table-align()
  org-table-map-tables(org-table-align t)
  org-mode()
  set-auto-mode-0(org-mode nil)
  set-auto-mode--apply-alist((("\\.yml$" . yaml-mode) ("\\.\\(r\\(?:ng\\|ss\\)\\|s\\(?:ch\\|vg\\)\\|x\\(?:ml\\|s\\(?:d\\|lt\\)\\)\\)\\'" . nxml-mode) ("\\.[pP][dD][fF]\\'" . pdf-view-mode) ("README\\.md\\'" . gfm-mode) ("\\(?:\\(?:\\.\\(?:b\\(?:\\(?:abel\\|ower\\)rc\\)\\|json\\(?:ld\\)?\\)\\|composer\\.lock\\)\\'\\)" . json-mode) ("\\.hva\\'" . LaTeX-mode) ("\\.tsv\\'" . tsv-mode) ("\\.[Cc][Ss][Vv]\\'" . csv-mode) ("\\.[Ss][Aa][Ss]\\'" . SAS-mode) ("\\.Sout\\'" . S-transcript-mode) ("\\.[Ss]t\\'" . S-transcript-mode) ("\\.Rd\\'" . Rd-mode) ("DESCRIPTION\\'" . conf-colon-mode) ("/Makevars\\(\\.win\\)?\\'" . makefile-mode) ("\\.[Rr]out\\'" . ess-r-transcript-mode) ("CITATION\\'" . ess-r-mode) ("NAMESPACE\\'" . ess-r-mode) ("\\.[rR]profile\\'" . ess-r-mode) ("\\.[rR]\\'" . ess-r-mode) ("/R/.*\\.q\\'" . ess-r-mode) ("\\.[Jj][Aa][Gg]\\'" . ess-jags-mode) ("\\.[Bb][Mm][Dd]\\'" . ess-bugs-mode) ("\\.[Bb][Oo][Gg]\\'" . ess-bugs-mode) ("\\.[Bb][Uu][Gg]\\'" . ess-bugs-mode) ("/git-rebase-todo\\'" . git-rebase-mode) ("\\.\\(?:md\\|markdown\\|mkd\\|mdown\\|mkdn\\|mdwn\\)\\'" . markdown-mode) ("\\.\\(e?ya?\\|ra\\)ml\\'" . yaml-mode) ("\\.gpg\\(~\\|\\.~[0-9]+~\\)?\\'" nil epa-file) ("\\.elc\\'" . elisp-byte-code-mode) ("\\.zst\\'" nil jka-compr) ("\\.dz\\'" nil jka-compr) ("\\.xz\\'" nil jka-compr) ("\\.lzma\\'" nil jka-compr) ("\\.lz\\'" nil jka-compr) ("\\.g?z\\'" nil jka-compr) ("\\.bz2\\'" nil jka-compr) ("\\.Z\\'" nil jka-compr) ("\\.vr[hi]?\\'" . vera-mode) ("\\(?:\\.\\(?:rbw?\\|ru\\|rake\\|thor\\|axlsx\\|jbuilder\\|rabl\\|gemspec\\|podspec\\)\\|/\\(?:Gem\\|Rake\\|Cap\\|Thor\\|Puppet\\|Berks\\|Brew\\|Fast\\|Vagrant\\|Guard\\|Pod\\)file\\)\\'" . ruby-mode) ("\\.re?st\\'" . rst-mode) ("/\\(?:Pipfile\\|\\.?flake8\\)\\'" . conf-mode) ("\\.py[iw]?\\'" . python-mode) ("\\.m\\'" . octave-maybe-mode) ("\\.less\\'" . less-css-mode) ("\\.scss\\'" . scss-mode) ("\\.cs\\'" . csharp-mode) ("\\.awk\\'" . awk-mode) ("\\.\\(u?lpc\\|pike\\|pmod\\(\\.in\\)?\\)\\'" . pike-mode) ("\\.idl\\'" . idl-mode) ("\\.java\\'" . java-mode) ...) nil nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil nil)
  find-file-noselect-1(#<buffer work-diary.org> "~/york/shared/work-diaries/work-diary.org" :nowarn nil "~/york/shared/work-diaries/work-diary-2023-2024.org" (10227922 66310))
  find-file-noselect("/home/wdenton/york/shared/work-diaries/work-diary.org" :nowarn)
  desktop-restore-file-buffer("/home/wdenton/york/shared/work-diaries/work-diary.org" "work-diary.org" nil)
  desktop-create-buffer(208 "/home/wdenton/york/shared/work-diaries/work-diary.org" "work-diary.org" org-mode (org-superstar-mode font-lock-mode visual-line-mode corfu-mode anzu-mode yas-minor-mode undo-tree-mode git-gutter-mode) 498814 (nil nil) nil nil ((tab-width . 8) (buffer-display-time 26062 29404 998251 639000) (buffer-file-coding-system . utf-8-unix) (truncate-lines)) ((mark-ring nil)))
  load-with-code-conversion("/home/wdenton/.emacs.d/.emacs.desktop" "/home/wdenton/.emacs.d/.emacs.desktop" t t)
  load("/home/wdenton/.emacs.d/.emacs.desktop" t t t)
  desktop-read()
  #f(compiled-function () #<bytecode 0x16169355fdebf11b>)()
  run-hooks(after-init-hook delayed-warnings-hook)
  command-line()
  normal-top-level()


             reply	other threads:[~2024-02-15 20:41 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-02-15 20:40 William Denton [this message]
2024-02-15 22:30 ` (jit-lock-function 1) signaled (error "Stack overflow in regexp matcher") William Denton
2024-02-18 16:01   ` Ihor Radchenko

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='TW1nDd5wI3ODXpzz0169CSo1f3N08jisnkkxE-mjSLx70YHJpoJ4syP_EKHezQbXjLuQvKyjtphDGbQTdnde0Xtmn25EDdwHzae3mKZWxS8=@williamdenton.org' \
    --to=william@williamdenton.org \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).