Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在查找Java时,若有空驱动器将丢出异常 #5

Closed
Orange-Icepop opened this issue Jan 5, 2025 · 4 comments
Closed

在查找Java时,若有空驱动器将丢出异常 #5

Orange-Icepop opened this issue Jan 5, 2025 · 4 comments
Labels
bug Something isn't working

Comments

@Orange-Icepop
Copy link

如题,使用MinecraftLaunch中的JavaFetcher.FetchAsync()(及其非异步方法)时,若当前系统中存在空驱动器(例如,未连接的网络挂载,某些拓展坞的占位USB驱动器),则会在该方法中抛出异常。经调用堆栈追踪与源码分析,发现是由于在文件系统中递归搜索java程序时未处理该种情况导致的。
平台:Windows 11 23H2 x64
包版本:3.0.7
恕无法提供截图。

@Starcloudsea Starcloudsea added the bug Something isn't working label Jan 19, 2025
@Starcloudsea
Copy link
Member

抱歉我们最近有些忙没看qwq
不过马上开始修(

@Starcloudsea
Copy link
Member

JavaFetcher.FetchAsync()已经有了一个检查空驱动器的检查,目前我们还不知道Bug产生的原因,可以提供一下这个异常的具体信息吗?最好附带一个堆栈信息以供分析🤔

@Orange-Icepop
Copy link
Author

JavaFetcher.FetchAsync()已经有了一个检查空驱动器的检查,目前我们还不知道Bug产生的原因,可以提供一下这个异常的具体信息吗?最好附带一个堆栈信息以供分析🤔

好的,IDE显示的最终问题是System.IO.IOException:“找不到网络路径。 : 'Z:'”。我将一个SMB共享挂载到了Z盘,在运行该程序时目标服务器是关闭的。尽管是不同的应用程序,但是这个问题和我去年十月份遇到的报错信息完全一致。
以下是详细的调用堆栈:
[异常] System.Private.CoreLib.dll!System.IO.Enumeration.FileSystemEnumerator.CreateDirectoryHandle(string path, bool ignoreNotFound)
[异常] System.Private.CoreLib.dll!System.IO.Enumeration.FileSystemEnumerator.Init()
[异常] System.Private.CoreLib.dll!System.IO.Enumeration.FileSystemEnumerable.FileSystemEnumerable(string directory, System.IO.Enumeration.FileSystemEnumerable.FindTransform transform, System.IO.EnumerationOptions options, bool isNormalized)
[异常] System.Private.CoreLib.dll!System.IO.Enumeration.FileSystemEnumerableFactory.DirectoryInfos(string directory, string expression, System.IO.EnumerationOptions options, bool isNormalized)
[异常] System.Private.CoreLib.dll!System.IO.DirectoryInfo.InternalEnumerateInfos(string path, string searchPattern, System.IO.SearchTarget searchTarget, System.IO.EnumerationOptions options)
[异常] System.Private.CoreLib.dll!System.IO.DirectoryInfo.EnumerateDirectories()
[异常] MinecraftLaunch.dll!MinecraftLaunch.Components.Fetcher.JavaFetcher.FetchJavaw(System.IO.DirectoryInfo directory, ref System.Collections.Generic.List results) 未知
[异常] MinecraftLaunch.dll!MinecraftLaunch.Components.Fetcher.JavaFetcher.FetchWindowJava()
[异常] MinecraftLaunch.dll!MinecraftLaunch.Components.Fetcher.JavaFetcher.FetchAsync()
[异常] System.Private.CoreLib.dll!System.Threading.Tasks.ValueTask.Result.get()
[异常] System.Private.CoreLib.dll!System.Runtime.CompilerServices.ValueTaskAwaiter.GetResult()
[异常] AvaloniaApplication2.dll!AvaloniaApplication2.ViewModels.MainViewModel.GetJavaInfo() 行 21
[异常] System.Private.CoreLib.dll!System.Threading.Tasks.Task.ThrowAsync.AnonymousMethod__128_0(object state)
[异常] Avalonia.Base.dll!Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
[异常] Avalonia.Base.dll!Avalonia.Threading.DispatcherOperation.Execute()
[异常] Avalonia.Base.dll!Avalonia.Threading.Dispatcher.ExecuteJob(Avalonia.Threading.DispatcherOperation job)
[异常] Avalonia.Base.dll!Avalonia.Threading.Dispatcher.ExecuteJobsCore(bool fromExplicitBackgroundProcessingCallback)
[异常] Avalonia.Base.dll!Avalonia.Threading.Dispatcher.Signaled()
[异常] Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.DispatchWorkItem()
[异常] Avalonia.Win32.dll!Avalonia.Win32.Win32Platform.WndProc(nint hWnd, uint msg, nint wParam, nint lParam)
[异常] Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.RunLoop(System.Threading.CancellationToken cancellationToken)
[异常] Avalonia.Base.dll!Avalonia.Threading.DispatcherFrame.Run(Avalonia.Threading.IControlledDispatcherImpl impl)
[异常] Avalonia.Base.dll!Avalonia.Threading.Dispatcher.PushFrame(Avalonia.Threading.DispatcherFrame frame)
[异常] Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken)
[异常] Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args)
[异常] Avalonia.Controls.dll!Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(Avalonia.AppBuilder builder, string[] args, System.Action<Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime> lifetimeBuilder)
[异常] AvaloniaApplication2.Desktop.dll!AvaloniaApplication2.Desktop.Program.Main(string[] args) 行 13
Avalonia.Base.dll!Avalonia.Threading.SendOrPostCallbackDispatcherOperation.InvokeCore()
Avalonia.Base.dll!Avalonia.Threading.DispatcherOperation.Execute()
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.ExecuteJob(Avalonia.Threading.DispatcherOperation job)
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.ExecuteJobsCore(bool fromExplicitBackgroundProcessingCallback)
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.Signaled()
Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.DispatchWorkItem()
Avalonia.Win32.dll!Avalonia.Win32.Win32Platform.WndProc(nint hWnd, uint msg, nint wParam, nint lParam)
[本机到托管的转换]
[托管到本机的转换]
Avalonia.Win32.dll!Avalonia.Win32.Win32DispatcherImpl.RunLoop(System.Threading.CancellationToken cancellationToken)
Avalonia.Base.dll!Avalonia.Threading.DispatcherFrame.Run(Avalonia.Threading.IControlledDispatcherImpl impl)
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.PushFrame(Avalonia.Threading.DispatcherFrame frame)
Avalonia.Base.dll!Avalonia.Threading.Dispatcher.MainLoop(System.Threading.CancellationToken cancellationToken)
Avalonia.Controls.dll!Avalonia.Controls.ApplicationLifetimes.ClassicDesktopStyleApplicationLifetime.Start(string[] args)
Avalonia.Controls.dll!Avalonia.ClassicDesktopStyleApplicationLifetimeExtensions.StartWithClassicDesktopLifetime(Avalonia.AppBuilder builder, string[] args, System.Action<Avalonia.Controls.ApplicationLifetimes.IClassicDesktopStyleApplicationLifetime> lifetimeBuilder)
AvaloniaApplication2.Desktop.dll!AvaloniaApplication2.Desktop.Program.Main(string[] args) 行 13

@Orange-Icepop
Copy link
Author

抱歉,我发现该问题在更新到3.1.0后已经被解决。感谢您的关注。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants