Code Monkey home page Code Monkey logo

Comments (14)

KaiserWilheim avatar KaiserWilheim commented on May 18, 2024

image.png
可以看到此时我是已经将程序关闭了的,但是:
image.png
程序仍然在后台运行。

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

请问该Bug是否:

  • 1.6.0exe版Release可复现
  • 1.6.0jar版Release可复现

另,如有可能请描述其退出后的性能占用情况(如进程所占内存)

from ark-pets.

KaiserWilheim avatar KaiserWilheim commented on May 18, 2024

两版本均可复现。

  • exe版退出后会残留一个名为ArkPets-v1.6.0.exe的进程,内存使用约77MB,和一个名为Java Platform SE Binary的进程,内存使用约50MB。
  • jar版退出后并不会结束其在命令行中的运行(即使其已不再显示log),并残留两个名为Java Platform SE Binary的进程,内存使用分别约为178MB和101MB。

两个版本不能交叉混用(即便是两者都已经退出),必须将所有残余进程结束掉才可以正常启动另一版本,否则会显示:
(jar版)

[LWJGL] Failed to load a library. Possible solutions:
        a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
        b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
Exception in thread "main" java.lang.UnsatisfiedLinkError: Failed to locate library: lwjgl.dll
        at org.lwjgl.system.Library.loadSystem(Library.java:164)
        at org.lwjgl.system.Library.loadSystem(Library.java:63)
        at org.lwjgl.system.Library.<clinit>(Library.java:51)
        at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:100)
        at org.lwjgl.system.Pointer$Default.<clinit>(Pointer.java:67)
        at org.lwjgl.system.Callback.<clinit>(Callback.java:40)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.initializeGlfw(Lwjgl3Application.java:84)
        at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:138)
        at com.isharryh.arkpets.DesktopLauncher.main(DesktopLauncher.java:42)

(exe版)

[LWJGL] Failed to load a library. Possible solutions:
	a) Add the directory that contains the shared library to -Djava.library.path or -Dorg.lwjgl.librarypath.
	b) Add the JAR that contains the shared library to the classpath.
[LWJGL] Enable debug mode with -Dorg.lwjgl.util.Debug=true for better diagnostics.
[LWJGL] Enable the SharedLibraryLoader debug mode with -Dorg.lwjgl.util.DebugLoader=true for better diagnostics.
java.lang.UnsatisfiedLinkError: Failed to locate library: lwjgl.dll
	at org.lwjgl.system.Library.loadSystem(Library.java:164)
	at org.lwjgl.system.Library.loadSystem(Library.java:63)
	at org.lwjgl.system.Library.<clinit>(Library.java:51)
	at org.lwjgl.system.MemoryUtil.<clinit>(MemoryUtil.java:100)
	at org.lwjgl.system.Pointer$Default.<clinit>(Pointer.java:67)
	at org.lwjgl.system.Callback.<clinit>(Callback.java:40)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.initializeGlfw(Lwjgl3Application.java:84)
	at com.badlogic.gdx.backends.lwjgl3.Lwjgl3Application.<init>(Lwjgl3Application.java:138)
	at com.isharryh.arkpets.DesktopLauncher.main(DesktopLauncher.java:42)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
	at com.exe4j.runtime.WinLauncher.main(WinLauncher.java:94)

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

在本人测试环境下,两版本在点击托盘的退出后,均未发生进程残留问题。
考虑其他原因:

  • 退出后清理进程可能需要数秒时间
  • 上述进程残留来自其他实例
  • 其他与运行环境有关的未发现的问题

from ark-pets.

KaiserWilheim avatar KaiserWilheim commented on May 18, 2024

实际上我这里残留的进程时间最长的已经超过一天了,且进程图标都是ArkPets的。
比如说这个:image.png
但有时候进程图标会变成Java的那个咖啡图标,进程名称有时也会发生变化,比如说这样:
image.png
只能说可能是Java版本或者其他什么因素的bug了

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

太离谱了 建议:

  • 在任务管理器[详细信息]选项卡中查看进程
  • 重启电脑,然后重试[退出]相关操作,确认残余进程 的确是 [退出]前的实例
  • 检查程序目录是否有错误日志
  • 使用命令行运行exe检查[退出]时是否有错误抛出、命令行是否结束

from ark-pets.

KaiserWilheim avatar KaiserWilheim commented on May 18, 2024

这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

实际上我这里残留的进程时间最长的已经超过一天了,且进程图标都是ArkPets的。
比如说这个:image.png
但有时候进程图标会变成Java的那个咖啡图标,进程名称有时也会发生变化,比如说这样:
image.png
只能说可能是Java版本或者其他什么因素的bug了

对于进程图标/名称变换,是由于桌宠主体的窗口句柄的GWL_EXSTYLE被设置为了0x00000088使其成为后台进程(不显示为任务栏常驻窗口)。显示托盘后,托盘的句柄是前台进程,故表现出进程变换。该变换在隐藏托盘后自动复位。

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题

请尝试使用--direct-start参数启动jar版桌宠,然后点击托盘的退出,查看是否无法结束命令行 或抛出错误。

from ark-pets.

KaiserWilheim avatar KaiserWilheim commented on May 18, 2024

这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题

请尝试使用--direct-start参数启动jar版桌宠,然后点击托盘的退出,查看是否无法结束命令行 或抛出错误。

无法结束命令行。
image.png
即便我已经在托盘里面退出了程序,且托盘中的图标已经消失:
image.png

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题

请尝试使用--direct-start参数启动jar版桌宠,然后点击托盘的退出,查看是否无法结束命令行 或抛出错误。

无法结束命令行。
image.png
即便我已经在托盘里面退出了程序,且托盘中的图标已经消失:
image.png

那么在你的环境下已经确定是存在进程残留了,可能与Java本身有关。因为log显示的[event]AP:dispose表明程序确实调用了结束方法dispose(),但Java进程未结束。
考虑是否存在Deamon线程阻止JVM关闭。

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

Jvav就是依托答辩 既然此Bug暂时无法复现,那么此议题先搁置罢。

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

Jvav就是依托答辩 既然此Bug暂时无法复现,那么此议题先搁置罢。

如需深究是何种Deamon线程阻止关闭,请你尝试运行调试工具来调试jar包。

from ark-pets.

isHarryh avatar isHarryh commented on May 18, 2024

2.x 版本采用了不同的打包方法和程序入口,可能有解决此问题,你可以尝试是否解决。

from ark-pets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.