# Error 1 (driver return code) — Works on old computer but not new one

I have MikTex 2.9.6022 and TeXMaker 4.5 installed on three different machines. All updated to the latest win10 build of 1511. I have two older machines that I have used for years and my resume compiles beautifully on but my newer machine that I just re-imaged won't produce an output PDF. The log file doesn't show any critical errors from what I can tell and just ends with a warning that the pdf may not be valid.

LaTeX Font Warning: Some font shapes were not available, defaults substituted.

Package atveryend Info: Empty hook AtVeryVeryEnd' on input line 222.
)
Here is how much of TeX's memory you used:
37010 strings out of 428409
676491 string characters out of 3159522
700789 words of memory out of 3000000
40034 multiletter control sequences out of 15000+200000
6119 words of font info for 56 fonts, out of 3000000 for 9000
1328 hyphenation exceptions out of 8191
73i,9n,66p,10417b,965s stack positions out of 5000i,500n,10000p,200000b,50000s

Error 1 (driver return code) generating output;
file resume.pdf may not be valid.


I also tried this from my work machine that I write LaTeX on regularly and it has the same results. This is running an older version of MikTex, same version of TeXMaker, and Win7 SP1. I have to compile using XeLaTeX because I utilize the fontspec package. Any ideas what I could do or where I could look next to sort this out?

Full log: http://pastebin.com/RYP4y0nH

EDIT: I am still in need of assistance with an apparent environment issue but have more or less resolved the issue. I have posted the answer below!

• Normally this means that something is blocking the existing pdf (e.g. if you have activated the pdf preview in the windows explorer) and so the driver (xdvipdfmx) can't write a new version. If this isn't the source of the problem run on a command line xelatex --no-pdf file and xdvipdfmx -vv file to get a better error message. – Ulrike Fischer Jul 15 '16 at 16:23
• I finally nailed this down to an issue with FontAwesome. I am not sure how to correct the underlying issue though. I created a very simple document... with one fontawesome glyph and it failed immediately with the following: pastebin.com/hjHDy68U I was able to fix it using my answer below...(plus I have my code) BUT I would prefer not have to use the fontspec package just for this one icon and have to specify the OTF extension. Do you have any ideas as to why this worked OOB on my old machines and on none of my new ones? – hobbymaster001 Jul 18 '16 at 14:59
• Show a minimal document that fails. – Ulrike Fischer Jul 18 '16 at 15:17

Ulrike Fischer above got me on the right track with more detailed output logging, thanks!

...If this isn't the source of the problem run on a command line xelatex --no-pdf file and xdvipdfmx -vv file to get a better error message.

Running xelatex --no-pdf test.tex completed fine with no errors

Running xdvipdfmx -vv test.xdv returned the following error:

xdvipdfmx:warning: Invalid CMap
xdvipdfmx:fatal: pdf_ref_obj(): passed invalid object.
Output file removed.


I was able to trace it down to an issue with the FontAwesome. If I remove the glyph it compiles fine. I was able to correct it with the following two lines added (I have them commented)

\documentclass{article}

\RequirePackage{xcolor}
\definecolor{customgold}{HTML}{D6BC55}

% Why do I need this one some computers and not others?
\usepackage{fontspec} % Was able to fix it with this line
\defaultfontfeatures{Extension = .otf} % ...and this line

\usepackage{fontawesome}
\newfontfamily{\FA}[Color=customgold]{FontAwesome}

\begin{document}

\title{Fun with \LaTeX{}} \author{Author}

\maketitle

\section{Introduction} Introductions aren't important.

\end{document}

• I bumped into this same problem and reported the issue here. – kaba Nov 24 '16 at 17:05
• You saved me with the \defaultfontfeatures{Extension = .otf} command, thank you! – fidekild Aug 28 '19 at 16:51

I just remembered: I added some time ago this in my the UserData-texmf tree in ...\fontconfig\config\localfonts2.conf

<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
<selectfont>
<rejectfont>
<glob>D:/MiKTeX2.9/fonts/type1/public/fontawesome/*</glob>
</rejectfont>
</selectfont>

<!-- REMOVE THIS LINE
`