Skip to content

[C#]: 游戏运行时修改游戏版本会导致启动器崩溃 #3494

Description

@Gaobai-awa

检查项 / Checklist

  • 我已在 Issues 页面 中搜索,确认了这一 Bug 未被提交过 / I have searched the Issues page and confirmed that this bug has not been reported yet.
  • 我确认只是全部选中而没有仔细确认就直接提交了这个 Issue,并且同意这个 Issue 可以直接被关闭 / I confirm that I checked all boxes without carefully reading them, and agree that this issue may be closed directly.
  • 我确认正在使用当前更新分支的最新版 PCL CE,若不是,此 Issue 可能会被直接关闭(更新方式:启动器 设置-关于-软件更新 检查更新,或在 Releases 页面下载) / I confirm that I am using the latest PCL CE version on the current update channel. If not, this issue may be closed directly. To update, check for updates in Settings → About → Updates, or download the latest version from the Releases page.
  • 我确认会详细描述我所遇到的问题,并附上日志和截图,而不是随便填点东西敷衍了事 / I will describe the problem in detail, attach logs and screenshots, and avoid submitting vague or incomplete information.

描述 / Description

修不修其实感觉没啥区别,也就我这种会在游戏运行时修改游戏版本了
抛出的崩溃是
[00:43:10.209] [FTL!] [STA] [生命周期|lifecycle] 未捕获的异常
System.IO.IOException: The process cannot access the file 'F:\Minecraft.minecraft\versions\1.21.10-Fabric_0.19.3\mods\fabric-api-0.138.4+1.21.10.jar' because it is being used by another process.
at System.IO.File.Delete(String path)
at PCL.PageInstanceInstall.BtnSelectStart_Click(Object sender, MouseButtonEventArgs mouseButtonEventArgs)
at PCL.MyExtraTextButton.Button_LeftMouseUp(Object sender, MouseButtonEventArgs e)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
at System.Windows.Input.InputManager.ProcessStagingArea()
at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)

感觉作为防呆设计可以修复一下)

重现步骤 / Steps to Reproduce

  1. 安装一个游戏版本(我的是1.21.10),安装mod加载器(我的是fabric0.19.3)
  2. 启动游戏
  3. 点击实例设置-修改-minecraft(我改成了1.20.1,fabric0.19.3)
  4. 启动器崩溃

日志与附件 / Logs & Attachments

Launch-2026-8-3-221034013.log

Metadata

Metadata

Assignees

No one assigned

    Labels

    🚧 正在处理开发人员正在对该内容进行开发、测试或修复,进展中

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions