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

scanf APIPA address and subnet mask cause crash./扫描APIPA地址和子网掩码导致程序崩溃 #2788

Open
AHLLX opened this issue Jul 11, 2024 · 3 comments

Comments

@AHLLX
Copy link

AHLLX commented Jul 11, 2024

Describe your issue:
I'm using Win11 with msi to install NWM directly, and using the IP scanner to scan the APIPA address with the subnet mask attached causes the program to crash.

我使用Win11用msi直装NWM,使用IP扫描器扫描APIPA地址附加子网掩码就会导致程序崩溃。

NETworkManager version:
Version:2024.6.15.0

Windows version (like 10.0.x.x):
Win11 prof 22635.2915

.NET version (like 6.0.x):
8.0.1
9318f01e-c8c8-4bb7-acb3-3ca373c129b1
dd6cdbc7-7ab4-46e4-838d-ed8489b7c7e0

@BornToBeRoot
Copy link
Owner

Can you send me the crash report from %LocalAppData%\NETworkManager\NETworkManager.log (or in the eventlog > Applications - if the log file is empty)

@AHLLX
Copy link
Author

AHLLX commented Jul 12, 2024

Can you send me the crash report from %LocalAppData%\NETworkManager\NETworkManager.log (or in the eventlog > Applications - if the log file is empty)

brand new log text here↓
NETworkManager.log

@BornToBeRoot
Copy link
Owner

2024-07-12 11:00:25,518 [1] FATAL NETworkManager.App - Unhandled exception occured!
2024-07-12 11:00:25,557 [1] FATAL NETworkManager.App - Exception raised by: System.InvalidOperationException: Failed to compare two elements in the array.
 ---> System.NullReferenceException: Object reference not set to an instance of an object.
   at NETworkManager.Utilities.IPAddressHelper.CompareIPAddresses(IPAddress x, IPAddress y)
   at NETworkManager.ViewModels.IPScannerViewModel.<>c.<.ctor>b__61_0(IPScannerHostInfo x, IPScannerHostInfo y)
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
   --- End of inner exception stack trace ---
   at System.Array.BinarySearch(Array array, Int32 index, Int32 length, Object value, IComparer comparer)
   at System.Windows.Data.ListCollectionView.AdjustBefore(NotifyCollectionChangedAction action, Object item, Int32 index)
   at System.Windows.Data.ListCollectionView.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
   at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
   at NETworkManager.ViewModels.IPScannerViewModel.<>c__DisplayClass98_0.<HostScanned>b__0()
   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)
   at System.Windows.Threading.DispatcherOperation.InvokeImpl()
   at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(Object obj)
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   at MS.Internal.CulturePreservingExecutionContext.Run(CulturePreservingExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Windows.Threading.DispatcherOperation.Invoke()
   at System.Windows.Threading.Dispatcher.ProcessQueue()
   at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   at MS.Win32.HwndWrapper.WndProc(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)
   at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
   at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   at System.Windows.Application.RunDispatcher(Object ignore)
   at System.Windows.Application.RunInternal(Window window)
   at NETworkManager.App.Main()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants