nilaoda / N_m3u8DL-RE

Cross-Platform, modern and powerful stream downloader for MPD/M3U8/ISM. English/简体中文/繁體中文.
MIT License
4.26k stars 455 forks source link

Unhandled Exception: System.ArgumentOutOfRangeException: Count cannot be less than zero. (Parameter 'count') #99

Open ncheng89 opened 1 year ago

ncheng89 commented 1 year ago

你好,大佬,我想在后台运行就会报以下的错误,是不支持后台运行吗还是需要怎么操作才可以在后台运行

错误信息: Unhandled Exception: System.ArgumentOutOfRangeException: Count cannot be less than zero. (Parameter 'count') at System.String.Ctor(Char, Int32) + 0x95 at Spectre.Console.Padder.Render(RenderContext, Int32) + 0xf2 at Spectre.Console.Rendering.LiveRenderable.d__25.MoveNext() + 0xb5 at System.Collections.Generic.List1.InsertRange(Int32, IEnumerable1) + 0x11b at Spectre.Console.RenderableExtensions.GetSegments(IAnsiConsole, RenderContext, IEnumerable`1) + 0x9d at Spectre.Console.RenderableExtensions.GetSegments(IRenderable, IAnsiConsole) + 0xa7 at Spectre.Console.AnsiBuilder.Build(IAnsiConsole, IRenderable) + 0x6c at Spectre.Console.AnsiConsoleBackend.Write(IRenderable) + 0x14 at Spectre.Console.AnsiConsoleFacade.Write(IRenderable) + 0x42 at Spectre.Console.ProgressRefreshThread.Run() + 0x29 at System.Threading.ExecutionContext.RunInternal(ExecutionContext, ContextCallback, Object) + 0xa8 --- End of stack trace from previous location --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x1c at System.Threading.ExecutionContext.RunInternal(ExecutionContext, ContextCallback, Object) + 0x11e at System.Threading.Thread.StartThread(IntPtr) + 0xb1 at System.Threading.Thread.ThreadEntryPoint(IntPtr) + 0x19

nilaoda commented 1 year ago

你的“后台运行”是指?

ncheng89 commented 1 year ago

比如只要执行命令:nohup N_m3u8DL-RE https://xxx.xxx/xx.m3u8 &

ncheng89 commented 1 year ago

就会报上面那个错误

nilaoda commented 1 year ago

这应该是Spectre.Console的问题 你可以尝试把日志级别调整到OFF

ncheng89 commented 1 year ago

image 还是一样的

ncheng89 commented 1 year ago

nohup N_m3u8DL-RE https://new.qqaku.com/20230103/yLMjco23/1100kb/hls/playlist_up.m3u8 --log-level OFF &

ncheng89 commented 1 year ago

大佬,可以加你微信或者qq吗?

nilaoda commented 1 year ago

等我周末空下来调试一下吧

ncheng89 commented 1 year ago

好的,谢谢大佬了,这个问题我从第一个版本就发现了,但是一直没人提这个问题,然后一直也存在这个问题

xinpan0214 commented 1 year ago

@ncheng89 你后面是怎么处理了?

nilaoda commented 1 year ago

@ncheng89 用 xshell 或 finalshell 测试后无问题。

ncheng89 commented 1 year ago

@ncheng89 用 xshell 或 finalshell 测试后无问题。

你用的什么linux系统?

xinpan0214 commented 1 year ago

@ncheng89 xshell,finalshell和Remote Desktop Manager,目前我测试发现使用这三个终端连接服务器,并启动程序在后台运行就没有问题。如果使用SecureCRT连接,并启动程序后台运行就会有问题。我试过centos,ubuntu,almalinux这三种系统,发现与系统无关。

ncheng89 commented 1 year ago

@xinpan0214 @nilaoda 确实我用win10cmd命令执行就没有问题,但是用crt执行后台运行就会提示上面那个错误