导出崩溃日志时附带崩溃报告文件 - #4103
Closed
zkitefly wants to merge 9 commits into
Closed
Conversation
Member
|
不要把这一内容塞入 String 中。未来我们将降低分配给 HMCL 的最低内存,这将非常容易 OOM |
Member
Author
换成 BufferedWriter 了 |
burningtnt
suggested changes
Sep 29, 2025
burningtnt
left a comment
Member
There was a problem hiding this comment.
为什么要先把数据写进临时文件,再拷贝进入压缩包?完全可以直接将数据写入压缩包!
# Conflicts: # HMCL/src/main/java/org/jackhuang/hmcl/game/LogExporter.java # HMCL/src/main/java/org/jackhuang/hmcl/ui/GameCrashWindow.java
Glavo
reviewed
Oct 22, 2025
| alert = new Alert(Alert.AlertType.INFORMATION, i18n("settings.launcher.launcher_log.export.success", logFile)); | ||
| String time = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd'T'HH-mm-ss")); | ||
| Path logFile = Paths.get("minecraft-exported-crash-info-" + time + ".zip").toAbsolutePath(); | ||
| Path crashReportFile; |
Member
There was a problem hiding this comment.
我没看懂这里到底在干什么,为什么不在 LogExporter 里直接生成日志到最终文件,而是在 GameCrashWindow 里实现,还要倒腾一个临时文件。
Member
Author
|
介于写的实在太史,我先关了吧 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #4101
minecraft-exported-crash-info-2025-07-25T01-59-14.zip