Skip to content

App fails to launch when TCP/IPv4 is disabled on an interface #181

Closed

Description

@cmulk

Describe your issue or feature request:
App crashes with no messages when turning off IPv4 on a network interface. That sounds like a strange thing to do but I have some testing that requires me to turn off IPv4 explicitly sometimes.
Steps to reproduce the issue:

  1. Open the properties of an interface and uncheck Internet Protocol Version 4 (TCP/IPV4)
  2. Try to launch NETworkManager and it crashes

NETworkManager version:
1.9
Windows version:
Win 10
.NET-Framework version:
v4.0.30319

Screenshots
N/A

Eventlog (if application crashes) Application: NETworkManager.exe Framework Version: v4.0.30319 Description: The process was terminated due to an unhandled exception. Exception Info: System.Net.NetworkInformation.NetworkInformationException at System.Net.NetworkInformation.SystemIPInterfaceProperties.GetIPv4Properties() at NETworkManager.Models.Network.NetworkInterface.GetNetworkInterfaces() at NETworkManager.Models.Network.NetworkInterface+<>c.b__4_0() at System.Threading.Tasks.Task`1[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]].InnerInvoke() at System.Threading.Tasks.Task.Execute() at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(System.Threading.Tasks.Task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(System.Threading.Tasks.Task) at NETworkManager.ViewModels.NetworkInterfaceViewModel+d__194.MoveNext() at System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.b__6_0(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.DispatcherOperation.InvokeImpl() at System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(System.Object) at MS.Internal.CulturePreservingExecutionContext.CallbackWrapper(System.Object) at System.Threading.ExecutionContext.RunInternal(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean) at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object) at MS.Internal.CulturePreservingExecutionContext.Run(MS.Internal.CulturePreservingExecutionContext, System.Threading.ContextCallback, System.Object) at System.Windows.Threading.DispatcherOperation.Invoke() at System.Windows.Threading.Dispatcher.ProcessQueue() at System.Windows.Threading.Dispatcher.WndProcHook(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndWrapper.WndProc(IntPtr, Int32, IntPtr, IntPtr, Boolean ByRef) at MS.Win32.HwndSubclass.DispatcherCallbackOperation(System.Object) at System.Windows.Threading.ExceptionWrapper.InternalRealCall(System.Delegate, System.Object, Int32) at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(System.Object, System.Delegate, System.Object, Int32, System.Delegate) at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(System.Windows.Threading.DispatcherPriority, System.TimeSpan, System.Delegate, System.Object, Int32) at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr, Int32, IntPtr, IntPtr) at MS.Win32.UnsafeNativeMethods.DispatchMessage(System.Windows.Interop.MSG ByRef) at System.Windows.Threading.Dispatcher.PushFrameImpl(System.Windows.Threading.DispatcherFrame) at System.Windows.Threading.Dispatcher.PushFrame(System.Windows.Threading.DispatcherFrame) at System.Windows.Application.RunDispatcher(System.Object) at System.Windows.Application.RunInternal(System.Windows.Window) at System.Windows.Application.Run(System.Windows.Window) at NETworkManager.App.Main()

Activity

  1. self-assigned this
    on Mar 25, 2019
  2. BornToBeRoot commented on Mar 25, 2019

    @BornToBeRoot
    Owner

    Thanks for the report... i can reproduce the issue!

    Exception at line:

    DhcpEnabled = networkInterface.GetIPProperties().GetIPv4Properties().IsDhcpEnabled,

    I try to fix it in the next version (1.9.1.0).

  3. BornToBeRoot commented on Mar 29, 2019

    @BornToBeRoot
    Owner

    @cmulk Hi,

    the new version will detect which internet protocols are available...

    image

    Some informations are now hidden based on condition:

    • IPv4 protocol available [false] --> IPv4 address, subnetmask, IPv4 Default-Gateway
    • DHCP enabled [false]--> DHCP server, DHCP lease (obtained, expires)
    • IPv6 protocol available [false] --> Link-local IPv6 address, IPv6 address, IPv6-Default-Gateway

    Would be great if you can try the current build and give me some feedback 😄

    Fix: NETworkManager_v1.9.1.0_Portable_Fix181.zip

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions