Skip to content
This repository was archived by the owner on Dec 18, 2018. It is now read-only.
This repository was archived by the owner on Dec 18, 2018. It is now read-only.

Don't mask libuv load failures with a NullReferenceException #302

Closed
@halter73

Description

@halter73

When Kestrel fails to load libuv, instead of giving a clear error such as System.DllNotFoundException: Unable to load DLL 'libuv': The specified module could not be found., the following error is given:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Microsoft.AspNet.Server.Kestrel.Networking.UvAsyncHandle.Send()
   at Microsoft.AspNet.Server.Kestrel.KestrelThread.Post(Action`1 callback, Object state)
   at Microsoft.AspNet.Server.Kestrel.KestrelThread.Stop(TimeSpan timeout)
   at Microsoft.AspNet.Server.Kestrel.KestrelEngine.Dispose()
   at Microsoft.AspNet.Server.Kestrel.ServerFactory.<>c__DisplayClass4_0.<Start>b__0()
   at Microsoft.AspNet.Server.Kestrel.Disposable.Dispose(Boolean disposing)
   at Microsoft.AspNet.Server.Kestrel.Disposable.Dispose()
   at Microsoft.AspNet.Server.Kestrel.ServerFactory.Start(IFeatureCollection serverFeatures, Func`2 application)
   at Microsoft.AspNet.Hosting.Internal.HostingEngine.Start()
   at Microsoft.AspNet.Hosting.WebApplication.Run(Type startupType, String[] args)
   at Microsoft.AspNet.Hosting.WebApplication.Run(String[] args)
   at Microsoft.AspNet.Hosting.Program.Main(String[] args)
   at Microsoft.AspNet.Server.Kestrel.Program.Main(String[] args)
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at Microsoft.Dnx.Runtime.Common.EntryPointExecutor.Execute(Assembly assembly, String[] args, IServiceProvider serviceProvider)
   at Microsoft.Dnx.ApplicationHost.Program.<>c__DisplayClass3_0.<ExecuteMain>b__0()
   at System.Threading.Tasks.Task`1.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions