jProcesses icon indicating copy to clipboard operation
jProcesses copied to clipboard

getProcessList empty on Windows 8.1

Open ettoreleandrotognoli opened this issue 7 years ago • 5 comments

I'm trying to use JProcess.getProcessList() in a Windows 8.1 but the result is empty.

ettoreleandrotognoli avatar Apr 28 '17 00:04 ettoreleandrotognoli

Hi, are you getting any error? Are you using maven? or you have simply downloaded the JAR?

profesorfalken avatar Apr 30 '17 17:04 profesorfalken

Hi! No, I'm not getting any error, just the result list is empty. Yes I install with maven and gradle.

ettoreleandrotognoli avatar May 01 '17 01:05 ettoreleandrotognoli

Randomly I get the same proplem on Windows 7, JProcess.getProcessList() return only one idle process

jflefebvre06 avatar Sep 18 '19 18:09 jflefebvre06

A very simple test to reproduce. After 30 calls JProcesses.get().fastMode(true).listProcesses() returns only one process.

    public static void main(final String[] args) throws InterruptedException {

        final StopWatch stopWatch = StopWatch.createStarted();

        int nb = 0;
        while (true) {

            nb++;

            final List<ProcessInfo> allProcess = JProcesses.get().fastMode(true).listProcesses();

            if (allProcess.size() <= 10) {

                System.out.println("After " + nb + " calls");

                allProcess.forEach(p -> {
                    System.out.println("- " + p);
                });

                break;

            } else {
                TimeUnit.MILLISECONDS.sleep(300);
            }

        }

        System.out.println(stopWatch.getTime(TimeUnit.SECONDS) + " seconds");
    }

Console:

After 30 calls
- PID:0	CPU:null	MEM:24	PRIORITY:0	CMD:
96 seconds

p.getName() return System Idle Process

If I launch again, return empty list:

After 1 calls
1 seconds

jflefebvre06 avatar Sep 19 '19 09:09 jflefebvre06

Hi, I am facing the same issue as well on Windows 10, Are there some plans to fix this?

Artem-Kuz avatar Jul 15 '21 16:07 Artem-Kuz