cerebrate / wabash

A utility to hold a WSL session-set open continuously. Works in conjunction with wabashd.
Microsoft Public License
81 stars 4 forks source link

Unhandled exception after exiting via Wabash tray icon's context menu #12

Closed AndisGrossteins closed 6 years ago

AndisGrossteins commented 6 years ago

Wabash.exe crashes after clicking Exit in the context menu of the notification tray icon.

Here's what I see in Event Viewer:

Log Name:      Application
Source:        .NET Runtime
Date:          03.02.2018 10:38:55
Event ID:      1026
Task Category: None
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      [machinename]
Description:
Application: Wabash.exe
Framework Version: v4.0.30319
Description: The process was terminated due to an unhandled exception.
Exception Info: System.NullReferenceException
   at ArkaneSystems.Wabash.DaemonManager.<InputReader>z__OriginalMethod(System.IO.StreamReader)
   at ArkaneSystems.Wabash.DaemonManager+<InputReader>c__Binding.Invoke(System.Object ByRef, PostSharp.Aspects.Arguments, System.Object)
   at PostSharp.Aspects.Internals.MethodBinding.PostSharp.Aspects.IMethodBinding.Invoke(System.Object ByRef, PostSharp.Aspects.Arguments)
   at PostSharp.Patterns.Threading.WorkItem.Invoke(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.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()

That is followed by a less relevant Application Error:

Log Name:      Application
Source:        Application Error
Date:          03.02.2018 10:38:55
Event ID:      1000
Task Category: (100)
Level:         Error
Keywords:      Classic
User:          N/A
Computer:      [machinename]
Description:
Faulting application name: Wabash.exe, version: 0.6.4.0, time stamp: 0x58175719
Faulting module name: unknown, version: 0.0.0.0, time stamp: 0x00000000
Exception code: 0xc0000005
Fault offset: 0x00007ff967349350
Faulting process id: 0xeac
Faulting application start time: 0x01d390c46cfa8804
Faulting application path: C:\ProgramData\chocolatey\lib\wabash\tools\Wabash.exe
Faulting module path: unknown
Report Id: 56dd97e5-b3ec-477c-baa4-b23e1cfc342e
Faulting package full name: 
Faulting package-relative application ID: 

This might not be a high-priority bug but it's worth taking a look at, if/when possible.

cerebrate commented 6 years ago

Thanks for reporting this.

As it's not a showstopper, though, I'm going to leave it alone, since wabash isn't being developed any more.

To explain: The addition of background task support in recent Insider builds - per https://blogs.msdn.microsoft.com/commandline/2017/12/04/background-task-support-in-wsl/ - has made it unnecessary to hold a session open, and its other functionality readily replaceable by a batch file along the lines of:

@echo off
wsl sudo service rsyslog start
wsl sudo service binfmt-support start
wsl sudo service dbus start
wsl sudo service cron start
wsl sudo service atd start

... that can be run by Task Scheduler on logon. As such, I'm just keeping the current version on life support until this functionality ships in a production release.

AndisGrossteins commented 6 years ago

Aha! I hadn't followed latest developments in WSL and I'm not using an insider build. Nice to know.

I suggest archiving this repo to make it read-only when the WSL background tasks land in a future Windows release.