Comments (14)
可以看到此时我是已经将程序关闭了的,但是:
程序仍然在后台运行。
from ark-pets.
请问该Bug是否:
- 在
1.6.0
exe版Release可复现 - 在
1.6.0
jar版Release可复现
另,如有可能请描述其退出后的性能占用情况(如进程所占内存)
from ark-pets.
两版本均可复现。
- 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.
在本人测试环境下,两版本在点击托盘的退出后,均未发生进程残留问题。
考虑其他原因:
- 退出后清理进程可能需要数秒时间
- 上述进程残留来自其他实例
- 其他与运行环境有关的未发现的问题
from ark-pets.
实际上我这里残留的进程时间最长的已经超过一天了,且进程图标都是ArkPets的。
比如说这个:
但有时候进程图标会变成Java的那个咖啡图标,进程名称有时也会发生变化,比如说这样:
只能说可能是Java版本或者其他什么因素的bug了
from ark-pets.
太离谱了 建议:
- 在任务管理器[详细信息]选项卡中查看进程
- 重启电脑,然后重试[退出]相关操作,确认残余进程 的确是 [退出]前的实例
- 检查程序目录是否有错误日志
- 使用命令行运行exe检查[退出]时是否有错误抛出、命令行是否结束
from ark-pets.
这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题
from ark-pets.
实际上我这里残留的进程时间最长的已经超过一天了,且进程图标都是ArkPets的。
比如说这个:
但有时候进程图标会变成Java的那个咖啡图标,进程名称有时也会发生变化,比如说这样:
只能说可能是Java版本或者其他什么因素的bug了
对于进程图标/名称变换,是由于桌宠主体的窗口句柄的GWL_EXSTYLE
被设置为了0x00000088
使其成为后台进程(不显示为任务栏常驻窗口)。显示托盘后,托盘的句柄是前台进程,故表现出进程变换。该变换在隐藏托盘后自动复位。
from ark-pets.
这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题
请尝试使用--direct-start
参数启动jar版桌宠,然后点击托盘的退出,查看是否无法结束命令行 或抛出错误。
from ark-pets.
这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题请尝试使用
--direct-start
参数启动jar版桌宠,然后点击托盘的退出,查看是否无法结束命令行 或抛出错误。
无法结束命令行。
即便我已经在托盘里面退出了程序,且托盘中的图标已经消失:
from ark-pets.
这个已经确定过了,重启了之后仍能复现,exe版的残余进程仍然指向exe,同时也不会记录下任何日志。
用命令行运行的时候小人出来之后命令行直接就结束了,中间没有任何东西记录下来。
jar版的日志看着也没啥问题,但就是不结束命令行,找不出来是什么问题请尝试使用
--direct-start
参数启动jar版桌宠,然后点击托盘的退出,查看是否无法结束命令行 或抛出错误。
那么在你的环境下已经确定是存在进程残留了,可能与Java本身有关。因为log显示的[event]AP:dispose
表明程序确实调用了结束方法dispose()
,但Java进程未结束。
考虑是否存在Deamon线程阻止JVM关闭。
from ark-pets.
Jvav就是依托答辩 既然此Bug暂时无法复现,那么此议题先搁置罢。
from ark-pets.
Jvav就是依托答辩既然此Bug暂时无法复现,那么此议题先搁置罢。
如需深究是何种Deamon线程阻止关闭,请你尝试运行调试工具来调试jar包。
from ark-pets.
2.x 版本采用了不同的打包方法和程序入口,可能有解决此问题,你可以尝试是否解决。
from ark-pets.
Related Issues (20)
- [Feature Request] 支持多屏幕 HOT 2
- [Exception] 无法启动桌宠窗口: java.awt.AWTError HOT 3
- [Feature Request] 添加自定义桌宠窗口大小的功能 HOT 1
- [Exception] 桌宠运行时异常退出 HOT 2
- [Bug] 出現"ArkPets Core"無法隱藏的問題 HOT 8
- [Feature Request] 系统托盘图标功能增强 HOT 2
- [Bug] 某些模型的组件图层缺失 HOT 1
- [Bug] 無法隱藏寵物視窗 HOT 3
- [Bug] 在桌面时小人会落到屏幕底端而非保持在任务栏上 HOT 1
- [Exception] 无法启动桌宠窗口 HOT 2
- [Bug] 干员待机动作超出边界无法显示 HOT 1
- [Feature Request] 新增通过时装品牌搜索干员小人
- [Enhancement] Windows安装程序细节调整 HOT 2
- [Bug] 动作保持时拖动浮起 HOT 2
- [Bug] 开机自启动后窗口在任务栏中保持高亮状态 HOT 1
- [Bug] 桌宠尝试原地跳高 HOT 4
- [Feature Request] 关于透明模式记忆和快捷键的建议
- [Frature Request] 添加干员小人躺下的动作 HOT 1
- [Exception] 背景有黑边该怎么解决
- [Feature Request] 增加我方干员战斗小人模型 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ark-pets.