9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] page and plumbing
@ 2007-09-26  8:05 Martin Neubauer
  2007-09-30 18:46 ` Russ Cox
  0 siblings, 1 reply; 2+ messages in thread
From: Martin Neubauer @ 2007-09-26  8:05 UTC (permalink / raw)
  To: 9fans

Hello,

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.

If nobody has a fix ready or some deeper insights, I might have some spare
time to look into this a little further during the weekend.

	Martin



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [9fans] page and plumbing
  2007-09-26  8:05 [9fans] page and plumbing Martin Neubauer
@ 2007-09-30 18:46 ` Russ Cox
  0 siblings, 0 replies; 2+ messages in thread
From: Russ Cox @ 2007-09-30 18:46 UTC (permalink / raw)
  To: 9fans

> 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



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-09-30 18:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-09-26  8:05 [9fans] page and plumbing Martin Neubauer
2007-09-30 18:46 ` Russ Cox

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).