Skip to content

Commit 759c21b

Browse files
committed
fix: 🔧添加更多关键调用前的日志来定位崩溃位置
1 parent d7dd5a4 commit 759c21b

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

  • ShardLauncher/src/main/java/com/lanrhyme/shardlauncher/game/launch

ShardLauncher/src/main/java/com/lanrhyme/shardlauncher/game/launch/Launcher.kt

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,15 +143,25 @@ abstract class Launcher(
143143
LoggerBridge.append("JVMArgs: $arg")
144144
}
145145

146+
if (BuildConfig.DEBUG) {
147+
Logger.lInfo("[Launcher] About to call setupExitMethod...")
148+
}
146149
ZLBridge.setupExitMethod(context.applicationContext)
150+
151+
if (BuildConfig.DEBUG) {
152+
Logger.lInfo("[Launcher] About to call initializeGameExitHook...")
153+
}
147154
ZLBridge.initializeGameExitHook()
155+
156+
if (BuildConfig.DEBUG) {
157+
Logger.lInfo("[Launcher] About to call chdir: ${chdir()}...")
158+
}
148159
ZLBridge.chdir(chdir())
149160

150161
if (BuildConfig.DEBUG) {
151162
Logger.lInfo("[Launcher] Final JVM args: ${args.take(10).joinToString(" ")}...")
152163
Logger.lInfo("[Launcher] Calling VMLauncher.launchJVM with ${args.size} arguments...")
153164
Logger.lInfo("[Launcher] runtimeHome: $runtimeHome")
154-
Logger.lInfo("[Launcher] chdir: ${chdir()}")
155165
}
156166

157167
try {

0 commit comments

Comments
 (0)