Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Scroll to new processes" always scrolls to the top without obvious reason #1118

Open
stdedos opened this issue Feb 3, 2022 · 14 comments
Open

Comments

@stdedos
Copy link

stdedos commented Feb 3, 2022

Brief description of your issue

"Scroll to new processes" always scrolls to the top without obvious reason i.e. I see no new processes created aka green lines
The process list scrolls to the very top every refresh_rate.

Steps to reproduce (optional)

No response

Expected behavior (optional)

No response

Actual behavior (optional)

No response

Environment (optional)

Process Hacker
Version: 3.0.4527 (30015af)

OBJECT INFORMATION
PhObjectTypeObject: 15 objects
PhStringType: 8532 objects
PhBytesType: 2316 objects
PhListType: 429 objects
PhPointerListType: 115 objects
PhHashtableType: 24 objects
PhFileStreamType: 0 objects
PhSymbolProviderType: 0 objects
PhProcessItemType: 378 objects
PhServiceItemType: 744 objects
PhNetworkItemType: 0 objects
PhModuleProviderType: 0 objects
PhModuleItemType: 0 objects
PhThreadProviderType: 0 objects
PhThreadItemType: 0 objects
PhHandleProviderType: 0 objects
PhHandleItemType: 0 objects
PhMemoryItemType: 0 objects
PhImageListItemType: 407 objects
@dmex
Copy link
Member

dmex commented Mar 5, 2022

"Scroll to new processes" works for me?

@stdedos
Copy link
Author

stdedos commented Mar 5, 2022

Just replicated it again, after update 😕

Note that I am not referring to "Scroll to new processes"' functionality, but the "interaction" it seems to have with the new column header bar.

@dmex
Copy link
Member

dmex commented Mar 5, 2022

am not referring to "Scroll to new processes"

Is there another scroll to new process feature?

but the "interaction" it seems to have with the new column header bar.

I'm not seeing any interaction?

@stdedos
Copy link
Author

stdedos commented Mar 7, 2022

Screenshot_2022-03-07_22-47-33

@dmex
Copy link
Member

dmex commented Mar 15, 2022

I still can't reproduce this.... I've reviewed the code and everything is based on processid so you might have a kernel rootkit using object manipulation and changing processid's at runtime causing a collision with the idle process?

@stdedos
Copy link
Author

stdedos commented Mar 15, 2022

I still can't reproduce this.... I've reviewed the code and everything is based on processid so you might have a kernel rootkit using object manipulation and changing processid's at runtime causing a collision with the idle process?

Oh that would be super nice :-(

If that works on the previews versions, do you stand by your analysis (i.e. "maybe kernel rootkit"), is it a bug (, or something else)?

@dmex
Copy link
Member

dmex commented Mar 15, 2022

do you stand by your analysis (i.e. "maybe kernel rootkit"), is it a bug (, or something else)?

No idea. I can't reproduce what you're seeing and the view is only ever changed when a new process is added, then everything gets immediately nullified, so it can't snap back and forth like your gif unless there's a new process (which isn't visible for whatever reason).

the "interaction" it seems to have with the new column header bar

The column headers are a completely separate window. You could try disabling the column headers but it shouldn't make a difference:

image

@stdedos
Copy link
Author

stdedos commented Mar 15, 2022

The column headers are a completely separate window. You could try disabling the column headers but it shouldn't make a difference:

image

Last time I checked (#1119 (comment)):

The "disable" option does not work

@dmex
Copy link
Member

dmex commented Mar 15, 2022

Last time I checked

You were selecting the wrong item. That version had a bug where the options were duplicated. If you check the screenshot there were two items but only one had (experimental).

@stdedos
Copy link
Author

stdedos commented Mar 15, 2022

Okay, I know what happens:
image

... but that's collapsed normally on my instance

@dmex
Copy link
Member

dmex commented Mar 16, 2022

collapsed normally on my instance

Close enough 😋

@dmex dmex closed this as completed Mar 16, 2022
@stdedos
Copy link
Author

stdedos commented Mar 16, 2022

Weeeeell ... what about not "Scrolling to new processes" when they are hidden at least?

Or, sort to the closest visible ancestor?
(and maybe maybe some partial red/green flashing - partial, since it's not the ancestor, but a child doing it)

@dmex dmex reopened this Mar 17, 2022
@dmex dmex added enhancement and removed bug labels Jun 14, 2022
@dmex
Copy link
Member

dmex commented Aug 26, 2022

@stdedos

Try adding this code into PhMwpOnProcessesUpdated...

Remove line 1153: TreeNew_EnsureVisible(PhMwpProcessTreeNewHandle, &ProcessToScrollTo->Node);

Replace with:

        BOOLEAN shownode = TRUE;
        PH_SORT_ORDER sortOrder = NoSortOrder;

        TreeNew_GetSort(PhMwpProcessTreeNewHandle, NULL, &sortOrder);

        if (sortOrder == NoSortOrder)
        {
            PPH_PROCESS_NODE node = ProcessToScrollTo->Parent;

            while (node)
            {
                if (!node->Node.Expanded)
                {
                    shownode = FALSE;
                    break;
                }

                node = node->Parent;
            }
        }

        if (shownode)
        {
            TreeNew_EnsureVisible(PhMwpProcessTreeNewHandle, &ProcessToScrollTo->Node);
        }

This will disable scrolling to collapsed/hidden rows. Let me know if it works and i'll push the changes to github 👍

@stdedos
Copy link
Author

stdedos commented Aug 26, 2022

I have no experience or dev-enivronment to build even hello world for Windows 😅

If you had some magic CI/CD action to build a branch and create an artifact, I would most certainly try anything 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants