This bug has already been filed in Ubuntu by Andy Brody: https://bugs.launchpad.net/ubuntu/+source/htop/+bug/298232 Quoting from Andy's description: > When htop is started using a .htoprc file with "hide_userland_threads=1", > tree view doesn't work. Enabling the view doesn't actually make a tree. It > sorts processes appropriately (e.g. init is first), but there is no > indentation. > > Workaround: > Unchecking "Hide userland threads" in the settings dialog fixes the problem > for the current htop instance. Tree view will continue to work properly until > exit even if hiding of userland threads is re-enabled. > > The tree view behavior was normal in Ubuntu 8.04 (htop 0.6.6+svn20070915-1) > Normal screenshot: http://htop.sourceforge.net/htop-0.5.png > Attached screenshot: tree view enabled but not working Please see the URL field for the screenshot showing the problem. Steps to reproduce: 1. Start htop, enter Setup with F2, enable Display->Options->Hide userland threads 2. Leave htop. 3. Start htop again. The tree view (F5) won't work properly. This will continue to happen until you disable "Hide userland threads" Ubuntu solved the problem with a patch from Josh Stone: http://sourceforge.net/mailarchive/message.php?msg_name=c1ed4c490901022030u35e959b4te3b585d4958270e9%40mail.gmail.com Josh's patch makes sense. I tested it against htop-0.8.1 and it works perfectly. I've recreated the patch for convenience, since Josh's patch was a git diff and would've required patch -p1 to apply. I'll attach it here for inclusion.
Created attachment 181307 [details, diff] Fix tree view when userland threads are hidden.
Has upstream accepted this patch?
(In reply to comment #2) > Has upstream accepted this patch? > Upstream seems to not have responded yet to the email containing the patch; at least there is no record of a reply email in their archives. The email with the patch is dated 2009-01-03. The patch hasn't been commited to upstream's repository, either. The last commit on the relevant file in upstream's repository was made on September 2008: http://htop.svn.sourceforge.net/viewvc/htop/trunk/ProcessList.c?view=log
Any news on accepting the patch? Tree functionality is broken, the fix is available... (In reply to comment #3) > (In reply to comment #2) > > Has upstream accepted this patch? > > > Upstream seems to not have responded yet to the email containing the patch; at > least there is no record of a reply email in their archives. The email with the > patch is dated 2009-01-03. > > The patch hasn't been commited to upstream's repository, either. The last > commit on the relevant file in upstream's repository was made on September > 2008: http://htop.svn.sourceforge.net/viewvc/htop/trunk/ProcessList.c?view=log >
This is fixed in the new release, adding a dependency so I remember to look at this when I finish bumping it.
+*htop-0.8.2 (13 Jun 2009) + + 13 Jun 2009; Thomas Anderson <gentoofan23@gentoo.org> + +files/htop-0.8.2-illegaladdrcopy.patch, htop-0.8.1-r1.ebuild, + +htop-0.8.2.ebuild: + Version bump to 0.8.2, bug 273770; Thanks to Lars Wendler + (polynomial-c@gentoo.org) for the report and help on finding patches; Also + fixes bug #258112; Adds lsof support; Add a patch to fix crashes when + pressing keys 'a' or 'F6'; QA fix for implicit RDEPEND in 0.8.1-r1. +