TeXmacs crashing when opening

For some weird reason, I’ve got a recurrent problem of TeXmacs on my computer. Just recently, every time I tried to open TeXmacs, the program crashes and produces the following error, see image attached. I’m not sure what’s causing it and how to get rid of it.

I have tried uninstalling TeXmacs and reinstalling, but the issue is persisting. I have also made sure to remove the /user/.TeXmacs folder, but this does not seem to help.

I think I may have gotten rid of the problem as soon as I shut down the new Universal Control feature between Macs and iPads

1 Like

Actually, the problem still persists. Not sure what’s going on. If I wait a little while, then TeXmacs starts up again, but then crashes if I open more than 3 windows.

Not clear. Can you try to launch TeXmacs from the Terminal (not with “open”, but calling directly the executable in /Applications/TeXmacs.app/Contents/MacOS/TeXmacs and see what happens?

I am having this problem too; when I run the command explicitly, I get the following:

Welcome to TeXmacs 2.1.1
kpsepath works with your TeX distribution
kpsewhich works with your TeX distribution
mktextfm works with your TeX distribution
mktexpk works with your TeX distribution
texhash works with your TeX distribution
Installation completed successfully !
I will now start up the editor
In unknown file:
   ?: 22  [with-fluid* #<fluid 7> #f #<procedure #f ()>]
   ?: 23* [#<procedure #f ()>]
   ?: 24* [load-file #<procedure new-primitive-load #> ...]
   ?: 25* [save-module-excursion #<procedure #f ()>]
   ?: 26  (let (# #) (dynamic-wind # thunk #))
   ?: 27  [dynamic-wind #<procedure #f ()> #<procedure #f ()> #<procedure #f ()>]
   ?: 28* [#<procedure #f ()>]
   ?: 29* [new-primitive-load "/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/kernel/texmacs/tm-dialogue.scm"]
In /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-texmacs.scm:
  61: 30  (if (member # #) (old-primitive-load filename) ...)
  65: 31  [with-fluid* #<fluid 7> #<procedure new-read (port)> #<procedure #f ()>]
In unknown file:
   ?: 32* [#<procedure #f ()>]
In /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-texmacs.scm:
  66: 33* [primitive-load "/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/kernel/texmacs/tm-dialogue.scm"]
In /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/kernel/texmacs/tm-dialogue.scm:
 323: 34* (on-entry (retrieve-learned))
 323: 35  (begin (retrieve-learned))
 318: 36  (let* ((l #) (old? #) (decode #)) (set! interactive-arg-table (decode l)))
 318: 37* [load-object "$TEXMACS_HOME_PATH/system/interactive.scm"]
In /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/kernel/boot/abbrevs.scm:
  81: 38  (let* ((r (read #))) (if (eof-object? r) (quote ()) r))
  81: 39* [new-read #<input: /Users/jon/.TeXmacs/system/interactive.scm 9>]
In /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-texmacs.scm:
  42: 40  (let* ((form #)) (if (and # #) (let* # #)) form)
  42: 41* [read #<input: /Users/jon/.TeXmacs/system/interactive.scm 9>]

/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-texmacs.scm:42:15: In procedure scm_lreadr in expression (old-read port):
/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-texmacs.scm:42:15: /Users/jon/.TeXmacs/system/interactive.scm:14:26: Unknown # object: #\<
In /Users/jon/.TeXmacs/progs/my-init-texmacs.scm:
   1: 0* (tm-define (make-cd-fixed) (make-graphics) ...)

/Users/jon/.TeXmacs/progs/my-init-texmacs.scm:1:1: In expression (tm-define (make-cd-fixed) (make-graphics) ...):
/Users/jon/.TeXmacs/progs/my-init-texmacs.scm:1:1: Unbound variable: tm-define
TeXmacs] With linked TrueType support
In /Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-buffer.scm:
  14: 0* (when (not #) (when # #))
  14: 1  (if (not (buffer-has-name? #)) (begin (if # #)))
  15: 2  (if (buffer-missing-style?) (begin (buffer-set-default-style)))
  15: 3* (buffer-missing-style?)

/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-buffer.scm:15:9: In expression (buffer-missing-style?):
/Applications/TeXmacs.app/Contents/Resources/share/TeXmacs/progs/init-buffer.scm:15:9: Unbound variable: buffer-missing-style?
Throwing widget should be attached
Error message:
  widget should be attached

System information:
  TeXmacs version  : 2.1.1
  Built by         : magix
  Building date    : Mon Apr 11 17:29:53 CEST 2022
  Operating system : darwin20.2.0
  Vendor           : apple
  Processor        : @CONFIG_HOST_CPU@
  Crash date       : Sun Jun 12 10:57:06 CEST 2022

TeXmacs does not yet have a current view
Backtrace of C++ stack:
  1   TeXmacs                             0x0000000102f6e088 : get_crash_report(char const*) + 320
  2   TeXmacs                             0x00000001023867f4 : tm_throw(char const*) + 168
  3   TeXmacs                             0x0000000102c69f28 : attach_view(url, url) + 412
  4   TeXmacs                             0x0000000102c6a90c : window_set_view(url, url, bool) + 544
  5   TeXmacs                             0x0000000102c70598 : new_buffer_in_new_window(url, tree, tree) + 368
  6   TeXmacs                             0x0000000102c70938 : open_window(tree) + 112
  7   TeXmacs                             0x0000000102225f64 : TeXmacs_main(int, char**) + 13496
  8   TeXmacs                             0x000000010397d4c4 : invoke_main_func() + 48
  9   TeXmacs                             0x0000000103959f3c : c_body() + 24
  10  TeXmacs                             0x00000001039afbc4 : scm_c_catch() + 388
  11  TeXmacs                             0x0000000103959eb4 : scm_i_with_continuation_barrier() + 140
  12  TeXmacs                             0x0000000103959f14 : scm_c_with_continuation_barrier() + 56
  13  TeXmacs                             0x00000001039ad9a8 : scm_i_with_guile_and_parent() + 56
  14  TeXmacs                             0x00000001039ad968 : scm_with_guile() + 20
  15  TeXmacs                             0x000000010397d480 : scm_boot_guile() + 40
  16  TeXmacs                             0x000000010222b008 : main() + 2408
  17  dyld                                0x000000010464508c : start() + 520

libc++abi: terminating with uncaught exception of type string
[1]    83083 abort      /Applications/TeXmacs.app/Contents/MacOS/TeXmacs

It is very urgent for me to be able to open TeXmacs again. Can someone help?

It appears to be crashing on some of my own extensions, but these previously worked. I wonder what’s going on.

I deleted my own customizations and it still was broken; however, after deleting the ~/.TeXmacs folder, TeXmacs opened successfully.

1 Like

@jonsterling This looks like another case of a corrupted interactive.scm

TexMacs falling into infinite crash loop

This seems to happen on rare occasions on Mac. I don’t think anyone has been able to figure out why yet.

This is the bug report, which was thought to have been fixed, apparently:

I keep having this problem, although it is very intermittent.

I have found that opening the application from terminal fixes the problem. I am not sure what this means though.

I have found that opening a specified file with the application from terminal also works.

It will be very hard to debug the problem without a way to reproduce it. Any error messages or steps you are performing when the crash happens would be most welcome.

1 Like

Hi All,

I just noticed that TeXmacs sometimes crashes when opening if there is an error in the my-init-texmacs.scm file located in /.TeXmacs/progs/ (say if you accidentally missed a bracket, or mis-spelled a command).

Although, I think confusingly, sometimes TeXmacs recovers and opens with the Welcome to TeXmacs page, even with the error stll present in the my-init-texmacs.scm.

Fixing the error in the my-init-texmacs.scm file seems to resolve the crash.

To avoid confusion here, I think it would be wise to throw an error if there is an error in the my-init-texmacs.scm file instead of crashing.

1 Like

Can you provide an example of such a init file. I actually had a unbalanced parenthesis and Texmacs threw an error but did not crash.

@guraltsev I thought this was one reason. The file I had was with unbalanced parenthesis. When I had a faulty my-init-texmacs, I never received an error. What does your error message look like?

Also, I seem to have falled into another crash loop but for another reason (my init file seems to be fine).

Running /Applications/TeXmacs.app/Contents/MacOS/TeXmacs -d in the terminal (-d for debug mode) gives me the following message:


There is a backtrace of the C++ stack at the end which may be useful for debugging, although I am not too familiar with the internals of TeXmacs.

for windows user, maybe your interactive.scm was corrupted.
if you

  1. have saved some file that filename have UTF-8 character
  2. other is normal, just warn widget should be attached

delete interactive.scm on roaming folder directly.
I’ve tried on my Win10 laptop, it fixed.

but why this happen?
because texmacs are lack of UTF-8 file name support, then pair on scm file will seems like as (0 . "/fjbjdkj\cjgfn"), the slash make escaped character


  1. 曾经以非ASCII字符文件名保存过文件
  2. texmacs输出日志除widget should be attached外一切正常

因为TeXmacs缺少对于UTF-8文件的支持。导致interactive.scm文件内的点对出现了类似(0 . "/fjbjdkj\cjgfn")的情形。这导致了转义字符并最终导致了崩溃