Hello, CVS version 1.23 distributed as p20111016 by gentoo (http://xdiskusage.cvs.sourceforge.net/viewvc/xdiskusage/xdiskusage/xdiskusage.C?view=log, Dec 3 18:20:12 2009 UTC) removed the ability to detect whether input is a tty, perhaps in response to bug reports that "du * | xdiskusage" crashed (http://sourceforge.net/p/xdiskusage/bugs/19/). Note that, although it was removed from the program, the functionality to read from a pipe is still advertised by both "xdiskusage -h" and the man page... Now I really wanted that functionality back and re-added it (first patch) and also found the reason for above segfault and fixed it (second patch). The reason was that the name of the input file serves as a root node and is NULL for a pipe, so we need to fall back to a fixed name of "stdin". (For reference, the gdb log was: #0 0x0000000000403b01 in OutputWindow::draw_tree (this=0x62bb40, n=0x630c90, column=0, row=0, scale=29.9375, offset=0) at xdiskusage.C:720) Best regards, Bernd Reproducible: Always
Created attachment 376210 [details, diff] Re-add the isatty() test removed in CVS version 1.23
Created attachment 376212 [details, diff] Fix segfault caused by missing root name when reading from a pipe
Additional note: CVS version 1.23 really tried to make "xdiskusage -" read from a pipe. This never worked however because arg_cb(), responsible for accepting arguments, "accepts" the "-" as (no-op) argument and therefore the subsequent test for "-" never sees it. If you try to make arg_cb() not accept it, as intended, a segfault results because the argument "-" is forcibly set to NULL and then d->show(argc,argv) is called, having FLTK accessing the elements of argv[]. I attach another patch, as alternative to the first patch, which makes the intended syntax of "xdiskusage -" work. While "xdiskusage -h" output is correct, the man page still needs to be adapted to this use. Regards, Bernd
Created attachment 376250 [details, diff] Alternative patch making "xdiskusage -" work
I just saw that in the course of 2014, the issue was fixed upstream. Current version is 1.51, I confirmed that it fixes this. Could we revbump please? Thanks, Bernd
(In reply to Bernd Feige from comment #5) > Could we revbump please? A revision bump, not a version bump?
https://gitweb.gentoo.org/repo/gentoo.git/commit/x11-misc/xdiskusage?id=48e0ecd6d9073a6fed5f689d64841d1ac94f405d