Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\setmathfont segfaults #96

Closed
Wrzlprmft opened this issue May 30, 2010 · 7 comments
Closed

\setmathfont segfaults #96

Wrzlprmft opened this issue May 30, 2010 · 7 comments

Comments

@Wrzlprmft
Copy link

This might be related to the last comment of issue 88, however I hope to be able to provide some more information:

\documentclass{article}
\usepackage{xltxtra}
\usepackage{unicode-math}
\setmathfont{Asana Math}

\begin{document}
test $\Omega ξ + a \sum ε \cdot ∃ $
\end{document}

ends in a Segmentation Fault, when compiled with xelatex:

[…]
(/usr/local/texlive/2009/texmf-dist/tex/latex/fontspec/fontspec.cfg)))
(/usr/local/texlive/2009/texmf-dist/tex/xelatex/unicode-math-table.texSegmentation fault

After removing the \setmathfont command it compiles without errors. (I assume it to be expected behaviour, that the output of the math part is reduced to $+ a$.)

If I use \setmathfont within the document this still happens and if I insert nonsense commands before this, the compiler first complains about them (and segfaults after I accept the complaint). Using other fonts (Neo Euler, XITS Math) does not help either.

My specifications are:
Debian Sqeeze;
TeX-Live 2009 fully and manually installed with net-installer;
recent versions of fontspec, xltxtra und unicode-math installed according to instructions

This did not occur on a TeX-Live system installed via Debian’s package manager (probably different versions) and with a unicode-math version from half and a week ago (3ca9b3f) as well as the fontspec version shipped with it. Said unicode-math version results in the same problems on the manually installed TeX-Live.

@wspr
Copy link
Collaborator

wspr commented May 30, 2010

I'm relatively certain this can't be a unicode-math problem; a segfault indicates a problem further down the chain.

Does it work if you write instead \setmathfont{Asana-Math.otf} ? (I'd be surprised if it did, but you never know.)

@wspr
Copy link
Collaborator

wspr commented May 30, 2010

Also, if you could report this problem on the XeTeX mailing list I'd be most appreciative. As this is a Debian/Linux problem its impossible for me to debug the problem (I'm on Mac OS X). Many thanks.

@Wrzlprmft
Copy link
Author

Just sent it to the mailing list.

According to the prophecy,

\setmathfont{Asana-Math.otf}
did not work.

@wspr
Copy link
Collaborator

wspr commented Jun 1, 2010

I'll close this here because I don't think I can help further. Thanks.

@frabjous
Copy link

Same problem here. I had the package working with the Debian version of TL 2009, though it did have other problems. Tried it in a virtual machine with 32 bit linux with TL 2010, and it worked fine. Then tried installing TL 2010 on my regular 64 bit linux, and it segfaults when I use \setmathfont, and only when I use \setmathfont.

It is not plausible to suppose the problem has nothing to do with the package in particular. It may not be exclusively limited to the package, but nevertheless, there's nothing in the package that's triggering it, so I think it would be nice if more investigation were done.

Even if you're using a Mac, you can of course install and use linux inside a virtual machine. Not that we're not grateful for you work, but unless this is fixed, the package will be unusable to a large number of LaTeX users.

But I think I can help diagnose. The problem seems to be associated only with certain UNICODE blocks. For example, if I put in the following set of commands rather than just a single general command, I don't get a segfault unless the last one is uncommented:

\setmathfont[range=\mathit]{STIXGeneral}

\setmathfont[range=\mathopen]{STIXGeneral}

\setmathfont[range=\mathclose]{STIXGeneral}

\setmathfont[range=\mathop]{STIXGeneral}

\setmathfont[range=\mathrel]{STIXGeneral}

%\setmathfont[range=\mathord]{STIXGeneral}

@frabjous
Copy link

Update. I've been testing this a bit more, and I've isolated exactly which characters create problems. There are just a few.

(In the examples, I use STIXGeneral, but the font isn't important. You get the same results whatever font is used.)

The first character is \Vvert. A segfault will be created when \setmathfont is called with any range that includes it, but not by number. In other words:

\setmathfont{STIXGeneral}

\setmathfont[range=\mathfence]{STIXGeneral}

or

\setmathfont[range=\Vvert]{STIXGeneral}

will all lead to segfaults. But oddly, this is OK:

\setmathfont[range={"2980}]{STIXGeneral}

Calling a wider range by number that includes it is OK too.

The other ones that cause problems are all characters from "1D6C0 which are classified as \mathord. This includes "1D6DB, "1D7FB, "1D715, "1D735, "1D74F, "1D76F, and everything from "1D789 and above. A lot of these are nablas and partials, so I wonder if those package options have something to do with this. For these, the command causes a segfault regardless of the method used to include these characters. In other words, any of the following:

\setmathfont[range=\mathord]{STIXGeneral}

\setmathfont[range=\mbfnabla]{STIXGeneral}

or

\setmathfont[range={"1D6C1}]{STIXGeneral}

will all lead to a segfault.

I'm hoping this might be helpful in isolating the problem. Apologies if I'm overlooking something obvious.

Because every character above "1D6C0 is either classified as \mathalpha or as \mathord, right now, a 64 bit linux user can safely use \setmathfont as so:

\setmathfont[range={"0001-"1D6C0,\mathalpha}]{STIXGeneral}

without major problems (unless of course you need one of those missing characters!) Still, I hope it can be fixed to avoid this workaround.

@ghost
Copy link

ghost commented Jun 17, 2010

This is neither a problem with unicode-math nor with Debian Linux. It is a bug of xetex for 64-bit binaries. see

http://tug.org/mailman/htdig/tex-live/2008-November/019016.html

http://tug.org/mailman/htdig/tex-live/2008-November/019017.html

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants