From mboxrd@z Thu Jan 1 00:00:00 1970 To: 9fans@cse.psu.edu Subject: Re: [9fans] page and plumbing From: "Russ Cox" Date: Sun, 30 Sep 2007 14:46:00 -0400 In-Reply-To: <20070926080547.GA4978@shodan.homeunix.net> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Message-Id: <20070930184603.9AFA81E8C22@holo.morphisms.net> Topicbox-Message-UUID: c8561316-ead2-11e9-9d60-3106f5b1d025 > After a pull two days ago I noticed that plumbing images to page does not > work any more. Page still starts but exits immediately before displaying > anything. Starting page manually works as expected. As postscript and pdf > files as well as other plumbing targets are unaffected led me to to suspect > the new image handling code somehow interfers with plumbing. True enough. Here is a better solution: cpu% diff -c /n/sources/plan9//sys/src/cmd/page/cache.c /sys/src/cmd/page/cache.c /n/sources/plan9//sys/src/cmd/page/cache.c:151,156 - /sys/src/cmd/page/cache.c:151,159 Image *im; int ra; + if(doc->npage < 1) + return display->white; + im = _cachedpage(doc, angle, page, ""); if(im == nil) return nil; cpu% Sorry about that -- I'd forgotten about -i, which has always been a hack. I've submitted this as a patch. It is unfortunately not related to Greg Pavelcak's problems, which I have not been able to reproduce. The new page works fine for me in drawterm. That sounds like drawterm is running out of image memory somehow, but I don't see how, and even if it did it should be behaving more gracefully. Russ