Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2016 15:47:15 -0700
From:      Kevin Oberman <rkoberman@gmail.com>
To:        "freebsd-x11@freebsd.org" <x11@freebsd.org>, David Wolfskill <david@catwhisker.org>
Subject:   Re: Help diagosing problem using xv(1) to display PNG images?
Message-ID:  <CAN6yY1vbwgeoOregVMR4wLE46frX4f3sit3igYrVwOr4dq=Z7A@mail.gmail.com>
In-Reply-To: <20160712205539.GB1261@albert.catwhisker.org>
References:  <20160712205539.GB1261@albert.catwhisker.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Jul 12, 2016 at 1:55 PM, David Wolfskill <david@catwhisker.org>
wrote:

> I use R (ports/math/R) to run analysis after some A/B testing,
> generating sets of reports, as well as graphs saved as PNG files.
>
> I then use less(1) to view the reports and xv(1) to view the graphs.
> (I know that xv is ... not the newest, shiniest piece of software in the
> world.  But -- until yesterday, anyway -- it has been reliable for me
> since before FreeBSD existed.)
>
> Yesterday, the first few images I viewed looked OK, but after I got to a
> certain point, xv would claim that the file was "672x672 PNG 24-bit
> mode.  Using TrueColor visual." -- but display it as a 1x1 blank image
> (geometry confirmed by the window manager).
>
> From that point on, all images displayed as 1x1.
>
> But if I switched the sequence around, the first few images I viewed
> (which showed as 1x1 earlier) looked OK, up to a certain point,
> when the images all reverted to 1x1 again.
>
> I thought that there was a problem with my R code, or with R itself (as
> it had recently been updated).... but I reverted the last couple of
> changes to math/R and rebuilt it, to no avail.
>
> Then it occcurred to me that I could subvert a Web browser to view the
> images... and they were all fine.  (I subsequently verified that they
> were all OK when viewed with gimp(1).)
>
> So the problem appears to be involving something that is in or used by
> xv(1) that is not in or used by firefox or gimp (at least, not in the
> way that xv does).
>
> I tried rebuilding graphics/png, also to no avail.
>
> xv looks like:
> localhost(10.3-S)[30] ldd `which xv`
> /usr/local/bin/xv:
>         libXext.so.6 => /usr/local/lib/libXext.so.6 (0x80091d000)
>         libX11.so.6 => /usr/local/lib/libX11.so.6 (0x800b2e000)
>         libjpeg.so.8 => /usr/local/lib/libjpeg.so.8 (0x800e67000)
>         libtiff.so.5 => /usr/local/lib/libtiff.so.5 (0x8010c0000)
>         libpng16.so.16 => /usr/local/lib/libpng16.so.16 (0x801332000)
>         libjasper.so.4 => /usr/local/lib/libjasper.so.4 (0x801567000)
>         libz.so.6 => /lib/libz.so.6 (0x8017c5000)
>         libm.so.5 => /lib/libm.so.5 (0x8019db000)
>         libc.so.7 => /lib/libc.so.7 (0x801c04000)
>         libxcb.so.1 => /usr/local/lib/libxcb.so.1 (0x801fb1000)
>         librpcsvc.so.5 => /usr/lib/librpcsvc.so.5 (0x8021d0000)
>         liblzma.so.5 => /usr/lib/liblzma.so.5 (0x8023d9000)
>         libjbig.so.2 => /usr/local/lib/libjbig.so.2 (0x802602000)
>         libXau.so.6 => /usr/local/lib/libXau.so.6 (0x80280f000)
>         libpthread-stubs.so.0 => /usr/local/lib/libpthread-stubs.so.0
> (0x802a11000)
>         libXdmcp.so.6 => /usr/local/lib/libXdmcp.so.6 (0x802c12000)
>         libthr.so.3 => /lib/libthr.so.3 (0x802e17000)
> localhost(10.3-S)[31] ls -ltrT `ldd /usr/local/bin/xv | awk '$2 = "=>"
> {print $3}'`
> -r--r--r--  1 root  wheel    54816 Apr  4 08:20:03 2015
> /usr/local/lib/libjbig.so.2
> lrwxr-xr-x  1 root  wheel       25 Aug 31 16:59:49 2015
> /usr/local/lib/libpthread-stubs.so.0 -> libpthread-stubs.so.0.0.0
> lrwxr-xr-x  1 root  wheel       15 Aug 31 17:00:29 2015
> /usr/local/lib/libXau.so.6 -> libXau.so.6.0.0
> lrwxr-xr-x  1 root  wheel       17 Aug 31 17:00:31 2015
> /usr/local/lib/libXdmcp.so.6 -> libXdmcp.so.6.0.0
> lrwxr-xr-x  1 root  wheel       16 Aug 31 17:01:51 2015
> /usr/local/lib/libXext.so.6 -> libXext.so.6.4.0
> lrwxr-xr-x  1 root  wheel       16 Oct 15 04:34:14 2015
> /usr/local/lib/libjpeg.so.8 -> libjpeg.so.8.0.2
> lrwxr-xr-x  1 root  wheel       15 Oct 21 04:18:34 2015
> /usr/local/lib/libxcb.so.1 -> libxcb.so.1.1.0
> lrwxr-xr-x  1 root  wheel       15 Oct 21 04:18:58 2015
> /usr/local/lib/libX11.so.6 -> libX11.so.6.3.0
> lrwxr-xr-x  1 root  wheel       16 Jan  6 04:51:24 2016
> /usr/local/lib/libtiff.so.5 -> libtiff.so.5.2.4
> lrwxr-xr-x  1 root  wheel       18 Feb 21 04:36:06 2016
> /usr/local/lib/libjasper.so.4 -> libjasper.so.4.0.0
> -r--r--r--  1 root  wheel  1646136 Jul 12 04:14:27 2016 /lib/libc.so.7
> -r--r--r--  1 root  wheel   184632 Jul 12 04:14:29 2016 /lib/libm.so.5
> -r--r--r--  1 root  wheel   168624 Jul 12 04:14:33 2016
> /usr/lib/liblzma.so.5
> -r--r--r--  1 root  wheel    37960 Jul 12 04:14:36 2016
> /usr/lib/librpcsvc.so.5
> -r--r--r--  1 root  wheel   102416 Jul 12 04:14:37 2016 /lib/libthr.so.3
> -r--r--r--  1 root  wheel    89576 Jul 12 04:14:39 2016 /lib/libz.so.6
> lrwxr-xr-x  1 root  wheel       19 Jul 12 09:08:44 2016
> /usr/local/lib/libpng16.so.16 -> libpng16.so.16.21.0
> localhost(10.3-S)[32]
>
> I rebuild FreeBSD daily, and update installed ports daily; above
> was running:
>
> FreeBSD g1-252.catwhisker.org 10.3-STABLE FreeBSD 10.3-STABLE #418
> r302600M/302639:1003505: Tue Jul 12 04:11:56 PDT 2016
>  root@g1-252.catwhisker.org:/common/S1/obj/usr/src/sys/CANARY  amd64
>
> My ports are all built under stable/10.  I was able to re-create the
> symptoms while running stable/11:
>
> FreeBSD g1-252.catwhisker.org 11.0-BETA1 FreeBSD 11.0-BETA1 #40
> r302627M/302639:1100120: Tue Jul 12 03:52:24 PDT 2016     root@localhost:/common/S3/obj/usr/src/sys/CANARY
> amd64
>
> (but using the stable/10 ports -- I have ports/misc/compat-10x installed).
>
> (Above times are PDT -- UTC-0700.)
>
> Anyone else see anything like this, or have suggestions for me to help
> diagnose the nature of the problem?
>
> Thanks!  I've munged Reply-To to reflect that I do not subscribe
> to freebsd-x11@.
>
> Peace,
> david
> --
> David H. Wolfskill                              david@catwhisker.org
> Those who would murder in the name of God or prophet are blasphemous
> cowards.
>
> See http://www.catwhisker.org/~david/publickey.gpg for my public key.
>

Wow! I have not though of xv for years! Probably last used it to process
some EPS filed back about 12 years ago. First used it on VMS back in about
1990. I appreciated it so much that I sent John a check for a personal
license ($25?) and received a hard-copy manual and a nice looking license
certificate. Moved to ImageMagick about 4 or 5 years later, but continued
to use xv now and again for things I didn't feel like taking the time to
learn how to do in ImageMagick. The newest copyright I can find in the xv
source is 1994.

First, it sounds like the issue is almost certainly in xv(1). Sounds like a
memory leak and xv failing to react properly to a failing malloc. It does
not surprise me too much to see problems with memory.

Have you reached out to John Bradley about this? Assuming it is personal
use, I doubt John will refuse to help if you don't. His web site is still
up and running. http://www.trilon.com/xv/ Then again, John may not remember
much about it after over two decades.

In the meantime, you might consider a switch to ImageMagick. The display(1)
command is very similar to xv, but it is very actively maintained by the
original author (Christy) and a number of others. It does not depend on
anything but X11 and the large set of libraries for the various formats,
very much like xv. In fact, you probably have most of the required
libraries installed. Bring newer, it does support some formats not
supported by xv and, in addition to display(1), it includes an array of CLI
commands to process images as well as bindings for a large array of
languages, several of which did not exist when the first version was
written back in the early 90s.This makes it quite popular for web use.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAN6yY1vbwgeoOregVMR4wLE46frX4f3sit3igYrVwOr4dq=Z7A>