Topshelf / Topshelf

An easy service hosting framework for building Windows services using .NET
http://topshelf-project.com/
Apache License 2.0
3.58k stars 690 forks source link

Program crashes when Red Gate Ants Profiler is attached #139

Closed feslerj closed 8 years ago

feslerj commented 11 years ago

Exception Info: System.ArgumentOutOfRangeException Stack: at System.String.InternalSubStringWithChecks(Int32, Int32, Boolean) at Magnum.CommandLineParser.CommandLine.GetUnparsedCommandLine() at Topshelf.CommandLineConfigurator.ApplyCommandLine(Topshelf.HostConfigurators.HostConfigurator) at Topshelf.HostFactory.New(System.Action`1) at Rock.Framework.WindowsService.ServiceFactory.ServiceCreator[[System.__Canon, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089]](System.String, System.String, System.String, Rock.Framework.WindowsService.RunServiceAs, System.String[]) at Rock.QL.Mobius.WindowsServices.MessageManagerService.Program.Main(System.String[])

I'm not sure if this is a red gate thing or a topshelf thing, but in only happens when the two are combined. Pretty sure it has something to do with initial program arguments since it only fails at the very beginning, not when attaching after it has started.

TravisTheTechie commented 8 years ago

If the profiler makes changes to the command line arguments, I could see this happening. Otherwise, I'm not sure. I don't have Ants Profiler to test, but since no one has spoken up about this in a couple years I'm going to call this stale until someone else brings it up again.