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

2 issues: TX.exe crashes on ProofPDF command and additionally a problem with ttf #195

Closed
Arno-Enslin opened this issue Oct 1, 2017 · 9 comments

Comments

@Arno-Enslin
Copy link
Contributor

Arno-Enslin commented Oct 1, 2017

The first of the following issues occurs with the AFDKO, that I have built on 07-06-2017 and on 09-29-2017 (but not with AFDKO 2.5 build 65322).

Python 2.7.11 32 bit / 2.7.14 32 bit

Windows 7

First issue

Example command:

python.exe ProofPDF.py -fontplot -dno -o "Output\Fontplot.pdf" "font.otf"

tx_crashes

As you can see, the PDF was generated (after closing the tx crash message popup).

I cannot exclude, that I have made anything wrong, when I had built the AFDKO (because the build notes are not up to date).


Second issue

If the input font is a ttf, ProofPDF totally fails. It also fails with AFDKO 2.5 build 65322, if the input font is a ttf. (That is not related to the TX crash bug.)

Proofing font Input\SourceSerifPro-Regular.ttf. Start time: Sun Oct 01 19:28:42
2017.
Traceback (most recent call last):
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\ProofPDF.py", line 996, in
 <module>
    main()
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\ProofPDF.py", line 988, in
 main
    proofMakePDF(params.rt_fileList, params, txPath)
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\ProofPDF.py", line 937, in
 proofMakePDF
    pdfFilePath = makePDF(pdfFont, params, doProgressBar)
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\fontPDF.py", line 1649, in
 makePDF
    makeProofPDF(pdfFont, params, doProgressBar)
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\fontPDF.py", line 2269, in
 makeProofPDF
    pdfGlyph = pdfFont.getGlyph(params.rt_glyphList[gi])
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\fontPDF.py", line 462, in
getGlyph
    return self.clientGetGlyph(glyphName)
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\ttfPDF.py", line 106, in c
lientGetGlyph
    return txPDFGlyph(self, glyphName)
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\fontPDF.py", line 588, in
__init__
    self.clientInitData()
  File "C:\FDK_29.09.2017\Tools\SharedData\FDKScripts\ttfPDF.py", line 159, in c
lientInitData
    clientGlyph.draw(pen)
  File "C:\FDK_29.09.2017\Tools\win\Python\AFDKOPython27\lib\site-packages\fontt
ools-3.15.2.dev0-py2.7.egg\fontTools\ttLib\__init__.py", line 776, in draw
    glyph.draw(pen, glyfTable, offset)
  File "C:\FDK_29.09.2017\Tools\win\Python\AFDKOPython27\lib\site-packages\fontt
ools-3.15.2.dev0-py2.7.egg\fontTools\ttLib\tables\_g_l_y_f.py", line 951, in dra
w
    pen.addComponent(glyphName, transform)
  File "C:\FDK_29.09.2017\Tools\win\Python\AFDKOPython27\lib\site-packages\fontt
ools-3.15.2.dev0-py2.7.egg\fontTools\pens\basePen.py", line 177, in addComponent

    glyph = self.glyphSet[glyphName]
TypeError: 'NoneType' object has no attribute '__getitem__'
Drücken Sie eine beliebige Taste . . .
@Arno-Enslin
Copy link
Contributor Author

Arno-Enslin commented Oct 2, 2017

I have spent many hours to identify the reason for the crash. It seems to be caused by the number of variables I set in a batch script, which is called by all the other batch scripts. There seems to be a limit. But I don't know, why this problem occurs in context with ProofPDF.py and TX.

@Arno-Enslin
Copy link
Contributor Author

Arno-Enslin commented Oct 3, 2017

The limit of the number of variables, that I can set in the batch file, that is called by the other batch files, that control ProofPDF.py, is round about 65. But it is not the pure number of variables, but the storage space they occupy. I am storing pathes in the variables, but these pathes are not long. So they don't occupy much space. I assume, that ProofPDF.py or TX.exe try to store much data in the same storage place.

@readroberts
Copy link
Contributor

I really doubt that adding more variable int the calling script is a source of the problem. More likely there is an uninitialized variable that is causing crashes depending on whatever happens to be in memory. I will look at this, but it may be a few days before I get there. The second issue looks more like ProofPDF is broken for TTF fonts - fails under Mac OSX for me.

@Arno-Enslin
Copy link
Contributor Author

Arno-Enslin commented Oct 3, 2017

I really doubt that adding more variable int the calling script is a source of the problem.

I know, that it sounds very odd. But I have thoroughly examinated the script. Example: If the script works with 65 variables without the crash of TX in context with the ProofPDF command, but not with 66, it doesn't matter which of the following lines I remove from the script, as long as the lengths of the pathes are similar. All the three Python scripts are present in the path %FDKScripts%. And the AFDKO is stored in the root directory of drive C. (Even if one of the three Python scripts would not be present in %FDKScripts%, it would not matter, because the three variables are not used in the script with the ProofPDF.py command.)

set "otc2otf_py=%FDKScripts%\otc2otf.py"
set "otf2otc_py=%FDKScripts%\otf2otc.py"
set "autohint_py=%FDKScripts%\autohint.py"

The second issue looks more like ProofPDF is broken for TTF fonts - fails under Mac OSX for me.

"Fails" means, that you cannot reproduce the issue under Mac OSX? Do you have access to a Windows machine?

@Arno-Enslin
Copy link
Contributor Author

Waterfallplot works with ttf here.
Charplot, Digiplot, Fontplot, Fontplot2, Fontsetplot and Hintplot don't work with ttf.

@Arno-Enslin
Copy link
Contributor Author

Arno-Enslin commented Oct 4, 2017

@readroberts and @anyone with a Windows machine, who wants to try to comprehend / confirm the issue.

For an unknown reason Github does not accept my zip file. So I just post a batch script and a readme file as code:

Readme.txt

Python 2.7.1x
Windows 7
(My AFDKO was built on 09-29-2017.)

For the test the path to the FDK must have the length of this path: C:\FDK

Do not change the length of the name of the batch script.

Store the batch file and an OTF in "C:\FDK".

Start the batch script. If TX.exe crashes, delete one character "a" in one of
the variables "vNN". Then start the batch script again. Now it should not crash anymore.

Test_ProofPDF_regarding_to_variables_issue.bat
(Do not change the name of the batch script, because it must have this length!)

@echo off
call :Variables
If not exist %ProofPDF_py% (
echo Could not find %ProofPDF_py%
echo.
pause
exit
)

for %%f in (*.otf; *.ttf) do %python_exe% %ProofPDF_py% -fontplot -dno -o "%%~nf_Fontplot.pdf" "%%f"

exit

:Variables
For /f "delims=\ tokens=1,2" %%i in ("%~dp0") do (
      Set "rootDir=%%i" 
      Set "Dir1=%%j"
)
set "PATH=%rootDir%\%Dir1%\Tools\win;%PATH%"
set "python_exe=Tools\win\Python\AFDKOPython27\python.exe"
set "ProofPDF_py=Tools\SharedData\FDKScripts\ProofPDF.py"

set "v00=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v01=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v02=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v03=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v04=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v05=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v06=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v07=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v08=aaaaaaaaaaaaaaaaaaa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aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v37=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v38=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v39=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v40=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v41=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v42=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v43=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
set "v44=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"

@miguelsousa
Copy link
Member

@cjchapman the First issue may be related to the tx -dump failures we've been trying to fix

@miguelsousa
Copy link
Member

The Second issue (ProofPDF fails with TT fonts) got fixed at some point; we have integration tests for all *plot tools and they run fine with TTF inputs.

@miguelsousa
Copy link
Member

#427 seems to have fixed the First issue

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