Article View: comp.windows.interviews
Article #1167Re: doc crashes -- IV3.0b...
From: Paul Calder
Date: Thu, 16 May 1991 18:03
Date: Thu, 16 May 1991 18:03
61 lines
2935 bytes
2935 bytes
David Rich uncovered a bug that triggered a core dump when printing
some documents. The bug is tickled if these three conditions are met.
1. You are printing a document that contains an Idraw drawing that
contains text.
2. You set the property '*idraw_font_metrics' to 'off'.
3. You have no PostScript font metrics files installed at your site.
This patch is archived as 'pub/3.0-fixes/fix8'.
============
This patch assumes that fix6 has already been applied.
Apply with ``patch -p -N < fix8'' at the top of the source tree.
*** iv/src/bin/doc/IdrawImage.c.beta+fix6 Thu Apr 11 23:21:20 1991
--- iv/src/bin/doc/IdrawImage.c Thu May 16 12:01:21 1991
***************
*** 202,219 ****
if (font == nil) {
World* w = World::current();
font = new FontInfo;
- boolean screen_font_exists = Font::exists(w, buffer);
if (_idraw_font_metrics) {
! if (screen_font_exists) {
font->_font = new Font(buffer);
} else {
font->_font = w->font();
}
} else {
! if (screen_font_exists) {
font->_font = new PSFont(psname, pointsize, buffer, 1.0);
} else {
! font->_font = new PSFont(psname, pointsize, "fixed", 1.0);
}
}
font->_font->ref();
--- 202,218 ----
if (font == nil) {
World* w = World::current();
font = new FontInfo;
if (_idraw_font_metrics) {
! if (Font::exists(w, buffer)) {
font->_font = new Font(buffer);
} else {
font->_font = w->font();
}
} else {
! if (PSFont::exists(psname)) {
font->_font = new PSFont(psname, pointsize, buffer, 1.0);
} else {
! font->_font = w->font();
}
}
font->_font->ref();
--
Paul Calder
Computer Systems Lab
Stanford University
calder@lurch.stanford.edu
Technical Details
Message-ID:
<CALDER.91May16130310@uluru.stanford.edu>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!stanford.edu!leland.Stanford.EDU!portia!calderReferences:
<DRICH.91May14082743@klaatu.lanl.gov>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!snorkelwacker.mit.edu!stanford.edu!leland.Stanford.EDU!portia!calder From: calder@uluru.stanford.edu (Paul Calder) Newsgroups: comp.windows.interviews Subject: Re: doc crashes -- IV3.0b... Message-ID: <CALDER.91May16130310@uluru.stanford.edu> Date: 16 May 91 18:03:10 GMT Article-I.D.: uluru.CALDER.91May16130310 References: <DRICH.91May14082743@klaatu.lanl.gov> Sender: news@leland.Stanford.EDU (Mr News) Reply-To: calder@lurch.stanford.edu Distribution: comp Organization: Stanford University Lines: 61 In-Reply-To: drich@klaatu.lanl.gov's message of 14 May 91 14:27:43 GMT