[BUG report] Crashes at opening on ARM mac with external monitor

Hi, I just moved from an Intel MacBook to an Apple Silicon one. The Intel version app worked on my old machine well and did not crash often. However, even when I am editing the exactly same file, the ARM version TeXmacs installed on my new machine crashes very frequently.

And one time after it crashed I just cannot open it anymore. It literally crashes every time at startup, before any GUI is shown on the screen. I tried uninstalling (plus carefully removing all the relevant files and folders), reinstalling, removing the .TeXmacs folder, restarting my computer, downloading the older versions, and so on, but none of them work. I was unable to open it forever and got desperate.

After searching through the forum, I tried using the command /Applications/TeXmacs.app/Contents/MacOS/TeXmacs to start it from terminal, but every time it gave out different errors. Most of them are segmentation fault and bus error.

Welcome to TeXmacs 2.1.2
------------------------------------------------------------------------------
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
------------------------------------------------------------------------------
QLayout: Cannot add a null widget to QVBoxLayout/
QLayout: Cannot add a null widget to QVBoxLayout/
QLayout: Cannot add a null widget to QVBoxLayout/
[1]    1432 segmentation fault  /Applications/TeXmacs.app/Contents/MacOS/TeXmacs
Welcome to TeXmacs 2.1.1
...
...
------------------------------------------------------------------------------
[1]    3349 segmentation fault  /Applications/TeXmacs.app/Contents/MacOS/TeXmacs
Welcome to TeXmacs 2.1.2
...
------------------------------------------------------------------------------
[1]    3023 bus error  /Applications/TeXmacs.app/Contents/MacOS/TeXmacs
Welcome to TeXmacs 2.1.1
...
------------------------------------------------------------------------------
TeXmacs] With linked TrueType support
libpng warning: iCCP: known incorrect sRGB profile


Etc., other a dozen of segmentation fault and bus error errors only differ in their leading number (what does that number mean btw? is it some address in the memory?) are omitted below.

However, when I was almost giving up and finally brought my laptop to the campus, only holding a faint hope I tried one more time to open TeXmacs again and it magically started. I was so confused. But when I get home, after several experiment trials, I find a reproducible pattern. If I start the app (no matter it is from the terminal, dock, launchpad, spotlight, application folder in finder, 3rd party launcher(like launchbar) or some other ways) that cause the GUI window to appear on the internal screen, it will start. If I open it on the external monitor, it will crash. However, after starting it at the internal screen, I can move the window to the external monitor (though it is still crashing all the days, but at least usable).

Hope this helps anyone struggling with the same problem as mine. And hope this can help the developer locate the potentially buggy code.

By the way I just found this thread reporting similar things - TeXmacs crashes when “Universal Control feature between Macs and iPads” is open.

However, as I mentioned above, this might not be the exactly same problem, because I used TeXmacs on my old Intel mac and there was no problem with my external monitor at all. Might be a bug with the ARM version?

Officially published version on the website is 2.1.1. Where did you get 2.1.2?

On their GitHub repository you can find the 2.1.2 release from May in last year. If you install TeXmacs by brew, it will also get you 2.1.2 package.

1 Like

Is the transpiled Intel version working for you? That could be a workaround.

Sounds like a plan! I could definitely try as a workaround. Thank you for bringing this up