Bug 52089 - nasty bug in pxdvi
Summary: nasty bug in pxdvi
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: tetex
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jindrich Novy
QA Contact: David Lawrence
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2001-08-20 13:47 UTC by Han-Wen Nienhuys
Modified: 2013-07-02 22:55 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2005-05-04 06:51:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Han-Wen Nienhuys 2001-08-20 13:47:31 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.3) Gecko/20010801

Description of problem:

run  file at the bottom through tex, and do 

	xdvi -debug 64 xbug

Notice the lines saying

	current scale 25.000000,25.000000:  gsave 5 5 scale grestore 
	drawbegin at 76,76:  sending ` gsave 5 5 scale grestore '
	end ps: 
	current scale 125.000000,125.000000:  gsave 5 5 scale grestore 
	drawbegin at 76,76:  sending ` gsave 5 5 scale grestore '
	end ps: 

Notice that the scale is going up for each ps special, but is not restored 
(grestore ends the scale).

After this, xdvi decides that glyph bitmaps should be scaled by 125x
(or more depending on the number of \specials), leading to an apparent
hang in bbox_scale_bitmap(g), when it tries to do a nested

  for (i =xmin ; i < xmax /* enormous number */; i ++)

loop in bbox_scale_bitmap(g).  In this process, xdvi consumes ungodly
amounts of CPU and memory.

This is caused by the redhat specific patch xdvik-22.15-j1.03.patch.gz,
which is responsible for both the code extracting scale from ps specials,
and bbox_scale_bitmap.

I suggest that this patch (or parts thereof) be retracted.


<rant>

WHAT THE HECK IS THIS MANURE DOING IN A WELL ENGINEERED PRODUCT?

For crying out loud, it is trying to deduce information by keyword
spotting in a turing complete language, and it is also is
undocumented. Maybe you guys can actually listen to the people
producing tetex and tex-k ?

See also http://www.tug.org/pipermail/tex-k/2001-April/004195.html
 
</rant>

<xbug.tex>

	\special{ps:  gsave 5 5 scale  grestore }
	\special{ps:  gsave 5 5 scale  grestore }
	\special{ps:  gsave 5 5 scale  grestore }
	\special{ps:  gsave 5 5 scale  grestore }
	\special{ps:  gsave 5 5 scale  grestore }
	\special{ps:  gsave 5 5 scale  grestore }
	\special{ps:  gsave 5 5 scale  grestore }
	foobar
	\bye

</xbug.tex>

Comment 1 Tim Waugh 2001-08-21 22:07:07 UTC
In tetex-1.0.7-28, 'xdvi' is the unpatched xdvik, and 'pxdvi' is the one with 
the patch applied.  I'll report this problem upstream so that it can be fixed 
properly.

Thanks for the report and analysis.


Comment 2 Jindrich Novy 2005-05-04 06:51:43 UTC
Please report a new bugreport if the issue persists. I suspect this is fixed
already in teTeX-3.0.

Thanks,
Jindrich


Note You need to log in before you can comment on or make changes to this bug.