lavalink-devs / Lavalink

Standalone audio sending node based on Lavaplayer.
https://lavalink.dev/
MIT License
1.58k stars 669 forks source link

java.lang.NullPointerException: Cannot invoke "oshi.software.os.OSProcess.getKernelTime()" because "p" is null #874

Closed ShitryaDima closed 1 year ago

ShitryaDima commented 1 year ago

Version info

Client used: wavelink v1.0.0

Output of java -version:

java version "18" 2022-03-22
Java(TM) SE Runtime Environment (build 18+36-2087)
Java HotSpot(TM) 64-Bit Server VM (build 18+36-2087, mixed mode, sharing)

lavalink logs

2023-05-07 17:44:15.785  INFO 37784 --- [           main] lavalink.server.Launcher                 : Starting Launcher using Java 18 on DESKTOP-5Q68MLP with PID 37784 (D:\FatherBot\FatherBot v.2\Lavalink.jar started by Dmitriy in D:\FatherBot\FatherBot v.2)
2023-05-07 17:44:15.790  INFO 37784 --- [           main] lavalink.server.Launcher                 : No active profile set, falling back to 1 default profile: "default"
2023-05-07 17:44:16.667  INFO 37784 --- [           main] lavalink.server.Launcher                 : Started Launcher in 1.417 seconds (JVM running for 1.931)
2023-05-07 17:44:16.669  INFO 37784 --- [           main] lavalink.server.Launcher                 : You can safely ignore the big red warning about illegal reflection. See https://github.com/freyacodes/Lavalink/issues/295
2023-05-07 17:44:16.721  INFO 37784 --- [           main] lavalink.server.Launcher                 :

←[32m       .  ←[31m _                  _ _       _    ←[32m__ _ _
←[32m      /\\ ←[31m| | __ ___   ____ _| (_)_ __ | | __←[32m\ \ \ \
←[32m     ( ( )←[31m| |/ _` \ \ / / _` | | | '_ \| |/ /←[32m \ \ \ \
←[32m      \\/ ←[31m| | (_| |\ V / (_| | | | | | |   < ←[32m  ) ) ) )
←[32m       '  ←[31m|_|\__,_| \_/ \__,_|_|_|_| |_|_|\_\←[32m / / / /
←[0m    =========================================←[32m/_/_/_/←[0m

        Version:        3.7.5
        Build time:     06.03.2023 12:02:05 UTC
        Branch          HEAD
        Commit:         c00286d
        Commit time:    06.03.2023 11:59:46 UTC
        JVM:            18
        Lavaplayer      1.4.0-original

2023-05-07 17:44:16.728  INFO 37784 --- [           main] lavalink.server.Launcher                 : No active profile set, falling back to 1 default profile: "default"
2023-05-07 17:44:17.583  WARN 37784 --- [           main] io.undertow.websockets.jsr               : UT026010: Buffer pool was not set on WebSocketDeploymentInfo, the default pool will be used
2023-05-07 17:44:17.604  INFO 37784 --- [           main] io.undertow.servlet                      : Initializing Spring embedded WebApplicationContext
2023-05-07 17:44:17.604  INFO 37784 --- [           main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 872 ms
2023-05-07 17:44:17.683  WARN 37784 --- [           main] l.server.config.SentryConfiguration      : Turning off sentry
2023-05-07 17:44:17.872  INFO 37784 --- [           main] c.s.d.l.tools.GarbageCollectionMonitor   : GC monitoring enabled, reporting results every 2 minutes.
2023-05-07 17:44:19.049  INFO 37784 --- [           main] lavalink.server.config.KoeConfiguration  : OS: WINDOWS, Arch: X86_64
2023-05-07 17:44:19.062  INFO 37784 --- [           main] lavalink.server.config.KoeConfiguration  : Enabling JDA-NAS
2023-05-07 17:44:19.069  INFO 37784 --- [           main] c.s.l.c.natives.NativeLibraryLoader      : Native library udpqueue: loading with filter null
2023-05-07 17:44:19.094  INFO 37784 --- [           main] c.s.l.c.natives.NativeLibraryLoader      : Native library udpqueue: successfully loaded.
2023-05-07 17:44:19.400  INFO 37784 --- [           main] io.undertow                              : starting server: Undertow - 2.2.16.Final
2023-05-07 17:44:19.410  INFO 37784 --- [           main] org.xnio                                 : XNIO version 3.8.6.Final
2023-05-07 17:44:19.430  INFO 37784 --- [           main] org.xnio.nio                             : XNIO NIO Implementation Version 3.8.6.Final
2023-05-07 17:44:19.507  INFO 37784 --- [           main] org.jboss.threads                        : JBoss Threads version 3.1.0.Final
2023-05-07 17:44:19.550  INFO 37784 --- [           main] o.s.b.w.e.undertow.UndertowWebServer     : Undertow started on port(s) 2333 (http)
2023-05-07 17:44:19.555  INFO 37784 --- [           main] lavalink.server.Launcher                 : Started Launcher in 2.881 seconds (JVM running for 4.819)
2023-05-07 17:44:19.557  INFO 37784 --- [           main] lavalink.server.Launcher                 : Lavalink is ready to accept connections.
2023-05-07 17:44:35.240  INFO 37784 --- [  XNIO-1 task-1] io.undertow.servlet                      : Initializing Spring DispatcherServlet 'dispatcherServlet'
2023-05-07 17:44:35.240  INFO 37784 --- [  XNIO-1 task-1] o.s.web.servlet.DispatcherServlet        : Initializing Servlet 'dispatcherServlet'
2023-05-07 17:44:35.243  INFO 37784 --- [  XNIO-1 task-1] o.s.web.servlet.DispatcherServlet        : Completed initialization in 2 ms
2023-05-07 17:44:35.258  INFO 37784 --- [  XNIO-1 task-1] l.server.io.HandshakeInterceptorImpl     : Incoming connection from /127.0.0.1:45910
2023-05-07 17:44:35.492  INFO 37784 --- [  XNIO-1 task-1] lavalink.server.io.SocketServer          : Connection successfully established
2023-05-07 17:44:35.493  WARN 37784 --- [  XNIO-1 task-1] lavalink.server.io.SocketServer          : Library developers: Please specify a 'Client-Name' header. User agent: Python/3.8 aiohttp/3.8.1
2023-05-07 17:44:35.753  WARN 37784 --- [pool-2-thread-1] o.u.p.windows.PerfCounterWildcardQuery   : Disabling further attempts to query Processor Information.
2023-05-07 17:44:36.325 ERROR 37784 --- [pool-2-thread-1] o.d.w.registry.HkeyPerformanceDataUtil   : Unable to parse English counter names in registry Perflib 009.
2023-05-07 17:44:36.330  WARN 37784 --- [pool-2-thread-1] o.u.p.windows.PerfCounterWildcardQuery   : Disabling further attempts to query Process.
2023-05-07 17:44:36.339  WARN 37784 --- [pool-2-thread-1] o.util.platform.windows.WmiQueryHandler  : COM exception: Invalid Query: SELECT NAME,PRIORITY,CREATIONDATE,PROCESSID,PARENTPROCESSID,READTRANSFERCOUNT,WRITETRANSFERCOUNT,PRIVATEPAGECOUNT,PAGEFAULTSPERSEC FROM Win32_Process WHERE NOT Name LIKE"%_Total"
2023-05-07 17:44:36.404 ERROR 37784 --- [pool-2-thread-1] lavalink.server.io.StatsCollector        : Exception while sending stats

java.lang.NullPointerException: Cannot invoke "oshi.software.os.OSProcess.getKernelTime()" because "p" is null
        at lavalink.server.io.StatsCollector.getProcessRecentCpuUsage(StatsCollector.kt:58) ~[classes!/:na]
        at lavalink.server.io.StatsCollector.retrieveStats(StatsCollector.kt:106) ~[classes!/:na]
        at lavalink.server.io.StatsCollector.createTask$lambda$0(StatsCollector.kt:69) ~[classes!/:na]
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[na:na]
        at java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305) ~[na:na]
        at java.base/java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:305) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[na:na]
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[na:na]
        at java.base/java.lang.Thread.run(Thread.java:833) ~[na:na]
topi314 commented 1 year ago

duplicate of https://github.com/freyacodes/Lavalink/issues/858