Xcube-Studio / Natsurainko.FluentLauncher

Natsurainko.FluentLauncher A Minecraft launcher designed for Windows 11
https://fluentlauncher.natsurainko.work/
MIT License
290 stars 15 forks source link

[Bug] #169

Closed pdimu closed 1 year ago

pdimu commented 1 year ago

Describe the bug

System.NullReferenceException System.NullReferenceException: Object reference not set to an instance of an object. at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b9_2(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func`2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Cores.CoresViewModel.<>c__DisplayClass33_0.b0() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.b128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b0()

Steps to reproduce the bug

System.NullReferenceException System.NullReferenceException: Object reference not set to an instance of an object. at Natsurainko.FluentCore.Extension.Windows.Service.JavaHelper.GetJavaRuntimeInfo(String file) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.<>c.b9_2(String x) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func2 elementSelector, IEqualityComparer1 comparer) at System.Linq.Enumerable.ToDictionary[TSource,TKey,TElement](IEnumerable1 source, Func2 keySelector, Func`2 elementSelector) at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetSuitableJava() at Natsurainko.FluentLauncher.Components.FluentCore.GameCore.GetLaunchSetting() at Natsurainko.FluentLauncher.Models.LaunchArrangement..ctor(GameCore core) at Natsurainko.FluentLauncher.Models.LaunchArrangement.StartNew(GameCore core) at Natsurainko.FluentLauncher.ViewModels.Cores.CoresViewModel.<>c__DisplayClass33_0.b0() at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at CommunityToolkit.Mvvm.Input.AsyncRelayCommand.AwaitAndThrowIfFailed(Task executionTask) at System.Threading.Tasks.Task.<>c.b128_0(Object state) at Microsoft.UI.Dispatching.DispatcherQueueSynchronizationContext.<>c__DisplayClass2_0.b0()

Expected behavior

No response

Environment

No response

Attachment

image

pdimu commented 1 year ago

i have tried to launch 1.20.1 in windows 11 please repair it, i want my minecraft back

natsurainko commented 1 year ago

Send out the java executable file (only .exe) used when this error is triggered. I think there may be a problem with this method of obtaining java information 将触发这个错误时使用的java的可执行文件(仅.exe)发送出来,我认为可能是这个获取java信息的方法有问题

pdimu commented 1 year ago

i'm using java 8 (idk why 32-bit) 8.0.3810.9 - the latest version this happened AND after a clean install of fluent launcher, and i hate it needs to be complicated i rechose the javaw.exe file in the settings tab>java runtime, but still not working...

pdimu commented 1 year ago

C:\Program Files (x86)\Java\jre-1.8\bin\javaw.exe the directory for javaw (and tried to paste the exe file here, but seems like github don't support to upload executables, so i put it into an zip) javaw.zip

pdimu commented 1 year ago

Send out the java executable file (only .exe) used when this error is triggered. I think there may be a problem with this method of obtaining java information 将触发这个错误时使用的java的可执行文件(仅.exe)发送出来,我认为可能是这个获取java信息的方法有问题

and i'm not as dumb as to choose a dll file for java

natsurainko commented 1 year ago

Now that we have updated to the latest version 2.2.0, can we test again to see if this problem still exists? 现在更新了最新的2.2.0版本 可以在测试一遍是否还有这个问题嘛

pdimu commented 1 year ago

Hooray!! Now I can play Minecraft again! Thanks so much!