# Bug: Generic TeX error

+4 votes

Dear users and developers of Cadabra, I have just installed Cadabra 2.2.0 in Windows 10. I previously installed Anaconda 3 (the most uptaded version available downloaded from its official webpage) and I already had MikTeX 2.9 in my computer. But Cadabra is not working. If I write any sample code from Cadabra manual, e.g.:

\dot{#}::Accent;
A_{\dot{a} \dot{b}}::AntiSymmetric;
ex:= A_{\dot{b} \dot{a}};

Cadabra will show me a error which says "Generic typesetting error; LaTeX failed. Please report a bug.

See s7wo.3.tex to debug this." The terminal also shows this message: "cadabra-client: Exception running LaTeX. Generic typesetting error; LaTeX failed. Please report a bug."

Thank you very much for your help and looking forward to a solution.

Best regards, Alejo.

I'm getting this error with the latest version. I provided more details in a new question. Can you please help?

## 4 Answers

+2 votes

Some Windows installations fail to run LaTeX correctly. I will be releasing an update sometime next week with some more facilities to track down what goes wrong. Will keep you posted.

by (64.9k points)
+2 votes

There is a new windows installer for 2.2.1 (current master branch on github) on the download page. Can you give that one a shot and let me know if it solves your problem? If not, it will spit out some more detailed information; please send me that.

by (64.9k points)

Dear Kasper, I have just tried the new version and it is still not working. I also verified that MikTeX 2.9 was updated but that did not help. Also, and this seems a bit strange, now I do not see the terminal (or console) that was opened along the main Cadabra window in the previous version.

The error is the same as before. For every line that I write and run, a window saying "Generic TeX error. Generic typesetting error; LaTeX failed. Please report a bug." appears. I also tried to run the file gspawn-win64-helper-console.exe but it closes down itself after a few seconds and while is visible it shows the message "ERROR:c:\users\kasper\development\git.others\vcpkg\buildtrees\glib\src\glib-2.52.3\glib\gspawn-win32-helper.c:208:main: assertion failed: (argc >= ARG_COUNT)".

Just in case it is useful, the version of Windows in Windows 10 version 1803, build 17134.8. Thanks a lot for your efforts.

Best regards, Alejo

Can you send me the rest of that error message? There is likely to be something about environment variables.

The console window is not supposed to appear anymore (it's a feature, not a bug).

Dear Kasper, Here you have the screenshots of both error messages: https://imgur.com/a/ZK8GEB1 . I hope this will be helpful.

Best regards, Alejo

Are you sure you are running 2.2.1? That error dialog does not look like what 2.2.1 would spit out. Try Help/About

Dear Kasper, The "About Cadabra" window says that is the version 2.2.1, build 1781.97d92d5291 dated 2018-05-15.

Best regards, Alejo.

I am having the same problem on my windows 10. installed the latest release of Cadabra 2 (i.e. 2.2.1) and already have the latest version of MikTeX installed.

You guys have not been forgotten, it has just been insanely busy. Will try to build another installer mon/tue.

I am really happy that a Windows version is coming up. Thank you, Kasper!

The same LaTeX bug is happening to me, I have tried reinstalling the latest MiKTeX both for all users and for a single user.

When the error message pops up, it shows the name of a temporary .tex file. Can you please try to run 'pdflatex' on that file, and let me know what happens?

Hello, sorry for a late reply. I get a missing package error "tableaux.sty not found". It is not in the package depository either, maybe it should be ytableau.sty? Also, the .pdf comes out empty.

The .tex file contains error messages too, such as (this is literally in the tex file):


\begin{verbatim}NameError: name 'AntiSymmetri' is not defined
At:
(3):
\end{verbatim}


or


\begin{verbatim}NameError: name 'Accen' is not defined
At:
(3):
\end{verbatim}


As if the last symbol of these parameters is missing every time.

EDIT.

The last symbol thing stopped happening by itself. I copied tableaux.sty from Cadabra folder to the Temp folder where the .tex files are created, now both Cadabra and pdflatex give a different error message:


Argument of \brwrap has an extra }


I counted the { } parentheses in the line and it seems to be even.

EDIT2, from the example in the original post, the first line alone seems to run fine in Cadabra after adding tableaux.sty to Temp folder, it outputs the "Attached property Accent to #." message in LaTeX font. The second line does not run and gives the \brwrap error (if I edit the .tex file and remove the FIRST \brwrap, pdflatex runs fine, but copying the second \brwrap in place of the first gives the same "} missing" error).

Good day! Any news on the Windows version? Thank you.

I'm just back from holidays. As I can't reproduce the problem on my machine, I'll need to install a clean VM with a fresh copy of windows, miktex and anaconda to see why you are setting this problem.

If any of you feels comfortable to build cadabra from source, that would probably help to locate the issue, too. Let me know if you need a hand with this.

Thanks for your patience.

Thank you for the reply!

Unfortunately I have zero experience in building anything from source. But on the other hand, it now seems that adding the tableaux.sty file to AppData/Local/Temp seems to have fixed the problem. The file just disappears now and then when Windows deletes it. Other error messages magically vanished now that I tried it again with beginners.cnb notebook.

I think the problem might just lie with the fact that MikTex never checks for tableaux.sty in the folder of preamble.tex, but instead only in the Temp folder mentioned above. Perhaps the whole issue can be fixed by telling Cadabra to always create a copy of tableaux.sty in the Temp folder.

Ok, that helps, let me see how this could have happened.

Which version of MikTeX are you using? There is an issue with setting TeX include paths on some versions, which may explain this problem.

I am using MikTex 2.9.6751 , before I tried it on 2.7 something and then upgraded thinking that would fix it.

0 votes

There is a new 2.2.1c release on the downloads page. Can you give that a shot? The problem was how MiKTeX uses TEXINPUTS; for the time being I am now avoiding installing custom latex packages altogether, hopefully this will at least for now solve the problem.

by (64.9k points)

Dear Kasper, I have been trying this new version during the last week. I tried reinstalling everything from scratch (MikTex, Anaconda and then Cadabra) and I have always obtained the same result: Cadabra closes 4-5 seconds after starting, without any error message or window. At the first moment, I thought it was related to the installation and that is why I tried reinstalling everything, but the problem is still there. Thanks a lot for your efforts.

Best regards, Alejo.

I have been informed that using the 2.2.1c installer and then replacing its bin directory with the bin directory of 2.2.1 works. I haven't had time to use this info to figure out what went wrong (we have updated the build system and that probably led to some libraries not being included in 2.2.1c).

Thank you very much Kasper for your quick reply. I will try it as soon as possible and I will let you if it works.

Dear Kasper, I have just tried this new solution. Now the program opens but the original error (or some kind of it) keeps appearing. Here you can see the error message: https://imgur.com/a/BF3UVo7 I have saved the .tex file mentioned there and I can send it to you if that is useful.

Best regards, Alejo.

+1 vote

There is now a 2.2.1d installer on the download page; can anyone with issues on Windows please try that one? I think this one should finally do the trick...

It is probably advisable to first remove the installation directory of any previous installs.

by (64.9k points)

Dear Kasper Peters, I have just tried this new version and it is finally working!! For now, I have just tried the most simple expressions in the reference guide and it worked perfectly. Thanks a lot for your effort.

Best regards, Alejo.

Very good! And thanks for your patience.

Hi Kasper, 2.2.1d solved the problem for me as well! Cadabra2 is now running perfectly! This is really fantastic and I thank you very much for all of your efforts and time.

2.2.1d now works without problems on Windows. Thank you for your efforts!