Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1215257

Summary: pdfcrop failed because \addlanguage cannot handle empty parameter #4 and #5
Product: [Fedora] Fedora Reporter: Edgar Hoch <edgar.hoch>
Component: texliveAssignee: Tom "spot" Callaway <tcallawa>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: unspecified    
Version: 21CC: novyjindrich, than
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Linux   
Whiteboard:
Fixed In Version: texlive-2014-13.20140525_r34255.fc23 texlive-2014-10.20140525_r34255.fc22 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-10-01 16:03:24 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch for file /usr/share/texlive/texmf-dist/tex/plain/etex/etex.src
none
Patched file /usr/share/texlive/texmf-dist/tex/plain/etex/etex.src none

Description Edgar Hoch 2015-04-24 19:13:42 UTC
Created attachment 1018607 [details]
Patch for file /usr/share/texlive/texmf-dist/tex/plain/etex/etex.src

Description of problem:

pdfcrop fails in Fedora 21 with the following error message (the relevant part of the message):

###############################################################################
! Missing number, treated as zero.
<to be read again> 
                   \chardef 
<to be read again> 
                   \rhm@arabic 
\addlanguage ...\chardef \csname rhm@#1\endcsname 
                                                  =#5 \uselanguage {#1}\inpu...
l.62 \addlanguage{arabic}{zerohyph.tex}{}{}{}
                                             
? 
! Emergency stop.
<to be read again> 
                   \chardef 
<to be read again> 
                   \rhm@arabic 
\addlanguage ...\chardef \csname rhm@#1\endcsname 
                                                  =#5 \uselanguage {#1}\inpu...
l.62 \addlanguage{arabic}{zerohyph.tex}{}{}{}
                                             
!  ==> Fatal error occurred, no output PDF file produced!
###############################################################################


I have checked the files and found that pdfcrop calls etex, and that reads the file
/usr/share/texlive/texmf-dist/tex/generic/config/language.def
which contains the line

\addlanguage{arabic}{zerohyph.tex}{}{}{}

\addlanguage is defined in file
/usr/share/texlive/texmf-dist/tex/plain/etex/etex.src

The macro crashes when called with empty parameters #4 or #5,
because \chardef= needs a numeric value.


I modified this file to use a default value when parameters #4 or #5 are empty.
I have chosen the value "1" as default value ; I am not sure if this is right.
But pdfcrop works again with this modification.



Version-Release number of selected component (if applicable):
texlive-pdfcrop-bin-svn14387.0-3.1.20140525_r34255.fc21.noarch
texlive-hyphen-base-svn31131.0-3.1.fc21.noarch
texlive-etex-svn31600.2.1-3.1.fc21.noarch

How reproducible:
Always

Steps to Reproduce:
1. Install package texlive-pdfcrop .
2. Find a pdf file as test file, or create a new one with the following commands:
  cat > pdfcrop-test.tex <<EOF
\documentclass[a4paper]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\begin{document}
This ist a little text.
\end{document}
EOF

  pfdlatex pdfcrop-test.pdf

3. Run pdfcrop with the pdf file, for example
  pdfcrop pdfcrop-test.pdf pdfcrop-test-crop.pdf


Actual results:
Error, no file created.

Expected results:
No error.

Comment 1 Edgar Hoch 2015-04-24 19:14:22 UTC
Created attachment 1018608 [details]
Patched file /usr/share/texlive/texmf-dist/tex/plain/etex/etex.src

Comment 2 Fedora Admin XMLRPC Client 2015-08-11 05:32:26 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Update System 2015-09-25 16:32:34 UTC
texlive-2014-13.20140525_r34255.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update texlive'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16620

Comment 4 Fedora Update System 2015-09-27 00:38:24 UTC
texlive-2014-10.20140525_r34255.fc22 has been pushed to the Fedora 22 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
$ su -c 'dnf --enablerepo=updates-testing update texlive'
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2015-16621

Comment 5 Fedora Update System 2015-10-01 16:02:49 UTC
texlive-2014-13.20140525_r34255.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.

Comment 6 Fedora Update System 2015-10-03 21:13:02 UTC
texlive-2014-10.20140525_r34255.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.