felixse / FluentTerminal

A Terminal Emulator based on UWP and web technologies.
GNU General Public License v3.0
9.22k stars 446 forks source link

Sometimes crashes when opening new tab using flute run #847

Open rythos42 opened 4 years ago

rythos42 commented 4 years ago

I've been using flute run to start a bunch of console programs at once for a long time. It started "randomly" crashing a few months ago, but I could usually manage to get it all started eventually. This morning I've tried 3 times and each time 1 of my 7 console programs does something and crashes the entire Fluent app and closes all tabs so I need to start all over again.

Here are a variety of logs I've seen you ask for in other situations:

Windows Event Viewer Error Faulting application name: FluentTerminal.App.exe, version: 1.0.0.0, time stamp: 0x5ec843cf Faulting module name: KERNELBASE.dll, version: 10.0.19041.488, time stamp: 0x5b4a3325 Exception code: 0xc000027b Fault offset: 0x000000000010b3cc Faulting process id: 0x38e4 Faulting application start time: 0x01d6904284d08dbb Faulting application path: C:\Program Files\WindowsApps\53621FSApps.FluentTerminal_0.7.1.0_x64__zzw7cgfsy6dd6\FluentTerminal.App.exe Faulting module path: C:\WINDOWS\System32\KERNELBASE.dll Report Id: 336928ee-b901-4fc1-bfbf-182d23f93db6 Faulting package full name: 53621FSApps.FluentTerminal_0.7.1.0_x64__zzw7cgfsy6dd6 Faulting package-relative application ID: App
Windows Event Viewer Information Fault bucket 1888874007594572918, type 5 Event Name: MoAppCrash Response: Not available Cab Id: 0 Problem signature: P1: 53621FSApps.FluentTerminal_0.7.1.0_x64__zzw7cgfsy6dd6 P2: praid:App P3: 1.0.0.0 P4: 5ec843cf P5: combase.dll P6: 10.0.19041.508 P7: ce0f364c P8: 800706be P9: 0000000000026156 P10: Attached files: \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER8FDA.tmp.mdmp \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER93E3.tmp.WERInternalMetadata.xml \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER9403.tmp.xml \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER9424.tmp.csv \\?\C:\ProgramData\Microsoft\Windows\WER\Temp\WER94D1.tmp.txt These files may be available here: \\?\C:\ProgramData\Microsoft\Windows\WER\ReportArchive\AppCrash_53621FSApps.Flue_9a42c5adbf707dc297614913721ddccf34eeba56_97094591_0660f65d-1576-4a6a-acd0-aa690cf55bca Analysis symbol: Rechecking for solution: 0 Report Id: 336928ee-b901-4fc1-bfbf-182d23f93db6 Report Status: 268435456 Hashed bucket: a2ea5d4fc73fcb71ba36a0e6f8249c76 Cab Guid: 0
fluentterminal.app20200921.log 2020-09-21 11:02:44.677 -07:00 [FTL] Initialized 2020-09-21 11:02:44.684 -07:00 [DBG] Created ApplicationViewAdapter for ApplicationView with Id: [-199493] 2020-09-21 11:02:46.912 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:02:47.022 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":0,"Size":{"Columns":189,"Rows":53,"$type":"TerminalSize"},"Profile":{"Id":"e39856d5-c706-4200-84d1-8066bdabf5f3","PreInstalled":false,"Name":"Powershell 7","Arguments":null,"Location":"C:\\Users\\CraigFleming\\.dotnet\\tools\\pwsh.exe","WorkingDirectory":null,"TabThemeId":0,"EnvironmentVariables":{},"UseConPty":true,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[{"Command":"e39856d5-c706-4200-84d1-8066bdabf5f3","Key":49,"Ctrl":true,"Alt":true,"Shift":false,"Meta":false,"$type":"KeyBinding"}],"$type":"ShellProfile"},"SessionType":"ConPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:02:47.197 -07:00 [DBG] MainViewModel with ApplicationView Id: [-199493] activated. 2020-09-21 11:02:47.971 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"Powershell 7","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:03:05.426 -07:00 [DBG] MainViewModel with ApplicationView Id: [-199493] activated. 2020-09-21 11:03:05.551 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:03:05.694 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":1,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"dotnet run --project C:\\work\\JUDI.Server.Tenant\\JUDI.Server.Tenant.API","Location":null,"WorkingDirectory":"C:\\Users\\CraigFleming","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:03:05.922 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"dotnet","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:03:18.830 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:03:18.919 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":2,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"C:\\work\\JUDI.Server.Categorization\\JUDI.Server.Categorization\\bin\\Debug\\JUDI.Server.Categorization.exe C:\\work\\JUDI.Server.Categorization\\LTI.API.Categorization\\web.config","Location":null,"WorkingDirectory":"C:\\Users\\CraigFleming","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:03:19.295 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"C:\\work\\JUDI.Server.Categorization\\JUDI.Server.Categorization\\bin\\Debug\\JUDI.Server.Categorization.exe","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:03:26.763 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:03:26.839 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":3,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"dotnet run --project C:\\work\\lending\\src\\JUDI.Server.Pricing\\JUDI.API.Pricing","Location":null,"WorkingDirectory":"C:\\Users\\CraigFleming","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:03:27.010 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"dotnet","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:03:37.996 -07:00 [DBG] MainViewModel with ApplicationView Id: [-199493] activated. 2020-09-21 11:03:38.137 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:03:38.306 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":4,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"dotnet run --project C:\\work\\lending\\src\\Lending.Mock\\JUDI.Server.Mock","Location":null,"WorkingDirectory":"C:\\Users\\CraigFleming","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:03:38.771 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"dotnet","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:03:59.684 -07:00 [ERR] Unhandled Exception System.Exception: The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xc5 at __Interop.ForwardComStubs.Stub_11[TThis](__ComObject, Int32) + 0x24 at System.IDisposable__Impl.Dispatcher.Dispose() + 0x18 at FluentTerminal.App.App.d__20.MoveNext() + 0xc24 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb at FluentTerminal.App.App.<>c__DisplayClass23_0.<b__1>d.MoveNext() + 0x91 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__7_0(Object) + 0x1e at System.Action`1.Invoke(T) + 0x28 at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33 2020-09-21 11:04:23.478 -07:00 [FTL] Initialized 2020-09-21 11:04:23.489 -07:00 [DBG] Created ApplicationViewAdapter for ApplicationView with Id: [-723881] 2020-09-21 11:04:24.116 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:04:24.407 -07:00 [DBG] MainViewModel with ApplicationView Id: [-723881] activated. 2020-09-21 11:04:24.412 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":0,"Size":{"Columns":189,"Rows":53,"$type":"TerminalSize"},"Profile":{"Id":"e39856d5-c706-4200-84d1-8066bdabf5f3","PreInstalled":false,"Name":"Powershell 7","Arguments":null,"Location":"C:\\Users\\CraigFleming\\.dotnet\\tools\\pwsh.exe","WorkingDirectory":null,"TabThemeId":0,"EnvironmentVariables":{},"UseConPty":true,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[{"Command":"e39856d5-c706-4200-84d1-8066bdabf5f3","Key":49,"Ctrl":true,"Alt":true,"Shift":false,"Meta":false,"$type":"KeyBinding"}],"$type":"ShellProfile"},"SessionType":"ConPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:04:25.039 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"Powershell 7","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:04:32.081 -07:00 [DBG] Sending TerminalExitedRequest: [{"Identifier":6,"TerminalId":0,"ExitCode":-1,"$type":"TerminalExitedRequest"}] 2020-09-21 11:04:32.123 -07:00 [DBG] Received TerminalExitedRequest: [{"Identifier":6,"TerminalId":0,"ExitCode":-1,"$type":"TerminalExitedRequest"}] 2020-09-21 11:09:08.703 -07:00 [FTL] Initialized 2020-09-21 11:09:08.706 -07:00 [DBG] Created ApplicationViewAdapter for ApplicationView with Id: [-331119] 2020-09-21 11:09:10.032 -07:00 [DBG] MainViewModel with ApplicationView Id: [-331119] activated. 2020-09-21 11:09:10.080 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:09:10.261 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":0,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"e39856d5-c706-4200-84d1-8066bdabf5f3","PreInstalled":false,"Name":"Powershell 7","Arguments":null,"Location":"C:\\Users\\CraigFleming\\.dotnet\\tools\\pwsh.exe","WorkingDirectory":null,"TabThemeId":0,"EnvironmentVariables":{},"UseConPty":true,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[{"Command":"e39856d5-c706-4200-84d1-8066bdabf5f3","Key":49,"Ctrl":true,"Alt":true,"Shift":false,"Meta":false,"$type":"KeyBinding"}],"$type":"ShellProfile"},"SessionType":"ConPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:09:10.447 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"Powershell 7","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:09:14.598 -07:00 [DBG] MainViewModel with ApplicationView Id: [-331119] activated. 2020-09-21 11:09:22.573 -07:00 [DBG] MainViewModel with ApplicationView Id: [-331119] activated. 2020-09-21 11:09:22.751 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:09:22.828 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:09:22.863 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":1,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"npm.cmd start","Location":null,"WorkingDirectory":"C:\\work\\lending\\src\\Lending\\ACF.UI.LoanOriginationAdmin.React","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:09:22.940 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":2,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"npm.cmd start","Location":null,"WorkingDirectory":"C:\\work\\lending\\src\\Lending\\ACF.UI.LoanOrigination.React","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:09:23.109 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"npm.cmd","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:09:23.290 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"npm.cmd","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:09:51.639 -07:00 [DBG] MainViewModel with ApplicationView Id: [-331119] activated. 2020-09-21 11:09:51.850 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:09:52.120 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":3,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"dotnet run --project C:\\work\\lending\\src\\JUDI.Server.Pricing\\JUDI.API.Pricing","Location":null,"WorkingDirectory":"C:\\Users\\CraigFleming","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:09:52.571 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"dotnet","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:10:12.720 -07:00 [DBG] MainViewModel with ApplicationView Id: [-331119] activated. 2020-09-21 11:10:12.918 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:10:13.386 -07:00 [ERR] Unhandled Exception System.Exception: The remote procedure call failed. (Exception from HRESULT: 0x800706BE) at System.Runtime.InteropServices.McgMarshal.ThrowOnExternalCallFailed(Int32, RuntimeTypeHandle) + 0x21 at __Interop.ComCallHelpers.Call(__ComObject, RuntimeTypeHandle, Int32) + 0xc5 at __Interop.ForwardComStubs.Stub_11[TThis](__ComObject, Int32) + 0x24 at System.IDisposable__Impl.Dispatcher.Dispose() + 0x18 at FluentTerminal.App.App.d__20.MoveNext() + 0xc24 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task) + 0x70 at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task) + 0x38 at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task) + 0x17 at System.Runtime.CompilerServices.TaskAwaiter.GetResult() + 0xb at FluentTerminal.App.App.<>c__DisplayClass23_0.<b__1>d.MoveNext() + 0x91 --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() + 0x21 at System.Runtime.CompilerServices.AsyncMethodBuilderCore.<>c.b__7_0(Object) + 0x1e at System.Action`1.Invoke(T) + 0x28 at System.Threading.WinRTSynchronizationContext.Invoker.InvokeCore() + 0x33 2020-09-21 11:10:28.537 -07:00 [FTL] Initialized 2020-09-21 11:10:28.542 -07:00 [DBG] Created ApplicationViewAdapter for ApplicationView with Id: [-396875] 2020-09-21 11:10:29.040 -07:00 [DBG] MainViewModel with ApplicationView Id: [-396875] activated. 2020-09-21 11:10:29.133 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:10:29.261 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":0,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"e39856d5-c706-4200-84d1-8066bdabf5f3","PreInstalled":false,"Name":"Powershell 7","Arguments":null,"Location":"C:\\Users\\CraigFleming\\.dotnet\\tools\\pwsh.exe","WorkingDirectory":null,"TabThemeId":0,"EnvironmentVariables":{},"UseConPty":true,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[{"Command":"e39856d5-c706-4200-84d1-8066bdabf5f3","Key":49,"Ctrl":true,"Alt":true,"Shift":false,"Meta":false,"$type":"KeyBinding"}],"$type":"ShellProfile"},"SessionType":"ConPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:10:29.529 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"Powershell 7","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:10:42.981 -07:00 [FTL] Initialized 2020-09-21 11:10:42.993 -07:00 [DBG] Created ApplicationViewAdapter for ApplicationView with Id: [-461915] 2020-09-21 11:10:43.435 -07:00 [DBG] MainViewModel with ApplicationView Id: [-461915] activated. 2020-09-21 11:10:43.534 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:10:43.703 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":0,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"e39856d5-c706-4200-84d1-8066bdabf5f3","PreInstalled":false,"Name":"Powershell 7","Arguments":null,"Location":"C:\\Users\\CraigFleming\\.dotnet\\tools\\pwsh.exe","WorkingDirectory":null,"TabThemeId":0,"EnvironmentVariables":{},"UseConPty":true,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[{"Command":"e39856d5-c706-4200-84d1-8066bdabf5f3","Key":49,"Ctrl":true,"Alt":true,"Shift":false,"Meta":false,"$type":"KeyBinding"}],"$type":"ShellProfile"},"SessionType":"ConPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:10:43.830 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"Powershell 7","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:10:49.340 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:10:49.460 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":1,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"dotnet run --project C:\\work\\lending\\src\\JUDI.Server.Pricing\\JUDI.API.Pricing","Location":null,"WorkingDirectory":"C:\\Users\\CraigFleming","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:10:49.607 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"dotnet","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:11:00.564 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:11:00.710 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":2,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"npm.cmd start","Location":null,"WorkingDirectory":"C:\\work\\lending\\src\\Lending\\ACF.UI.LoanOrigination.React","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:11:00.879 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"npm.cmd","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:11:08.860 -07:00 [DBG] MainViewModel with ApplicationView Id: [-461915] activated. 2020-09-21 11:11:09.069 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:11:09.170 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":3,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"npm.cmd start","Location":null,"WorkingDirectory":"C:\\work\\lending\\src\\Lending\\ACF.UI.LoanOriginationAdmin.React","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:11:09.347 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"npm.cmd","Success":true,"Error":null,"$type":"CreateTerminalResponse"}] 2020-09-21 11:11:18.364 -07:00 [DBG] MainViewModel with ApplicationView Id: [-461915] activated. 2020-09-21 11:11:18.595 -07:00 [DBG] WebView navigation completed. Target: ["ms-appx-web://53621fsapps.fluentterminal/Client/index.html"] 2020-09-21 11:11:18.790 -07:00 [DBG] Sending CreateTerminalRequest: [{"Identifier":1,"Id":4,"Size":{"Columns":189,"Rows":51,"$type":"TerminalSize"},"Profile":{"Id":"00000000-0000-0000-0000-000000000000","PreInstalled":false,"Name":null,"Arguments":"dotnet run --project C:\\work\\lending\\src\\Lending.Mock\\JUDI.Server.Mock","Location":null,"WorkingDirectory":"C:\\Users\\CraigFleming","TabThemeId":0,"EnvironmentVariables":{},"UseConPty":false,"UseBuffer":true,"MigrationVersion":1,"Tag":{"$type":"DelayedHistorySaver"},"TerminalThemeId":"00000000-0000-0000-0000-000000000000","KeyBindings":[],"$type":"ShellProfile"},"SessionType":"WinPty","$type":"CreateTerminalRequest"}] 2020-09-21 11:11:19.080 -07:00 [DBG] Received CreateTerminalResponse: [{"Identifier":8,"Name":"dotnet","Success":true,"Error":null,"$type":"CreateTerminalResponse"}]
fluentterminal.systemtray20200921.log 2020-09-21 11:02:46.548 -07:00 [FTL] Initialized 2020-09-21 11:02:46.603 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 6788 2020-09-21 11:02:46.645 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 10544 2020-09-21 11:02:46.674 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 6788 2020-09-21 11:02:46.707 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 10544 2020-09-21 11:02:46.745 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 6788 2020-09-21 11:02:46.771 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 10544 2020-09-21 11:02:46.804 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 6788 2020-09-21 11:02:46.856 -07:00 [DBG] Spawned conhost process id=16112. Starting muting of generated bell sound. 2020-09-21 11:02:51.483 -07:00 [DBG] Set conhost process mute state to True. 2020-09-21 11:02:51.500 -07:00 [DBG] SpawnConhostProcess finishes mute=True 2020-09-21 11:09:09.883 -07:00 [FTL] Initialized 2020-09-21 11:09:10.004 -07:00 [DBG] SpawnConhostProcess starts mute=True 2020-09-21 11:09:10.168 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 6788 2020-09-21 11:09:10.272 -07:00 [DBG] Exception with message "Access is denied" on getting process parent id for conhost process 10544 2020-09-21 11:09:10.501 -07:00 [DBG] Spawned conhost process id=6560. Starting muting of generated bell sound. 2020-09-21 11:09:13.317 -07:00 [DBG] Set conhost process mute state to True. 2020-09-21 11:09:13.401 -07:00 [DBG] SpawnConhostProcess finishes mute=True 2020-09-21 11:10:30.102 -07:00 [ERR] Unobserved Task Exception System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.NullReferenceException: Object reference not set to an instance of an object. at FluentTerminal.SystemTray.Services.AppCommunicationService._terminalsManager_DisplayOutputRequested(Object sender, TerminalOutput e) at FluentTerminal.SystemTray.BufferedReader.SendBuffer() at FluentTerminal.SystemTray.BufferedReader.d__21.MoveNext() --- End of inner exception stack trace --- ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object. at FluentTerminal.SystemTray.Services.AppCommunicationService._terminalsManager_DisplayOutputRequested(Object sender, TerminalOutput e) at FluentTerminal.SystemTray.BufferedReader.SendBuffer() at FluentTerminal.SystemTray.BufferedReader.d__21.MoveNext()<--- 2020-09-21 11:10:30.102 -07:00 [ERR] Unobserved Task Exception System.AggregateException: A Task's exception(s) were not observed either by Waiting on the Task or accessing its Exception property. As a result, the unobserved exception was rethrown by the finalizer thread. ---> System.NullReferenceException: Object reference not set to an instance of an object. at FluentTerminal.SystemTray.Services.AppCommunicationService._terminalsManager_DisplayOutputRequested(Object sender, TerminalOutput e) at FluentTerminal.SystemTray.BufferedReader.SendBuffer() at FluentTerminal.SystemTray.BufferedReader.d__21.MoveNext() --- End of inner exception stack trace --- ---> (Inner Exception #0) System.NullReferenceException: Object reference not set to an instance of an object. at FluentTerminal.SystemTray.Services.AppCommunicationService._terminalsManager_DisplayOutputRequested(Object sender, TerminalOutput e) at FluentTerminal.SystemTray.BufferedReader.SendBuffer() at FluentTerminal.SystemTray.BufferedReader.d__21.MoveNext()<---

Thank you!

felixse commented 4 years ago

Didn't see anything suspicious in the logs. So you have a bat that spawns 7 tabs via CLI? I honestly never tried this, I will try to reproduce it

rythos42 commented 4 years ago

Damn. My workflow is that I open a PowerShell 7 tab and we have a node.js CLI program we've written that spawns other tabs. Each tab runs either a C# or node.js console that I want to keep running.

(It simulates running our microservices and React apps on my development machine)

rythos42 commented 4 years ago

I don't know if it will help, but here's a piece of the CLI we use to run flute. It isn't a runnable piece of code, requires some frameworks and maybe boilerplate, but maybe it will help. I took out a bunch of the configuration values to make it smaller.

const { Command } = require('@oclif/command');
const { spawn, exec } = require('child_process');
const dotenv = require('dotenv');

dotenv.config({ path: __dirname + '/../../.env' });

const { GIT_ROOT } = process.env;

if (!GIT_ROOT) {
  console.error(
    'Please create .env file in the root folder of CLI repo and set GIT_ROOT to the path of Lending git repo',
  );
  process.exit();
}

const projectsConfiguration = {
  WebAPI: {
    type: 'Framework',
    exec:
      GIT_ROOT +
      '\\Server.WebAPI\\bin\\Debug\\Server.WebAPI.exe',
    args:
      GIT_ROOT +
      '\\WebAPI\\web.config',
  },
  Tenant: {
    type: 'Core',
    project: GIT_ROOT + '\\Server.Tenant\\Server.Tenant.API',
  },
  Admin: {
    type: 'Npm',
    project:
      GIT_ROOT + '\\Admin.React',
  },
};

const Terminals = {
  Default: 0,
  FluentTerminal: 1,
};

class RunCommand extends Command {
  startProject(project, terminal) {
    this[`run${project.type}`](project, terminal);
  }

  runCore(project, terminal) {
    // You will need .NET Core SDK installed to run this. (https://dotnet.microsoft.com/download)
    if (terminal === Terminals.FluentTerminal) {
      spawn('flute.exe', ['run', `dotnet run --project ${project.project}`]);
    } else {
      exec(`start cmd.exe /c dotnet run --project ${project.project}`);
    }
  }

  runFramework(project, terminal) {
    if (terminal === Terminals.FluentTerminal) {
      spawn('flute.exe', ['run', `${project.exec} ${project.args}`]);
    } else {
      exec(`start cmd.exe /c ${project.exec} ${project.args}`);
    }
  }

  runNpm(project, terminal) {
    if (terminal === Terminals.FluentTerminal) {
      spawn('flute.exe', [
        'run',
        'npm.cmd start',
        '--directory',
        project.project,
      ]);
    } else {
      exec(`start cmd.exe /c npm.cmd start`, { cwd: project.project });
    }
  }

  async run() {
    const { argv: projects } = this.parse(RunCommand);

    const terminal =
      process.env.TERM_PROGRAM === 'FluentTerminal'
        ? Terminals.FluentTerminal
        : Terminals.Default;
    const runProjects =
      projects.indexOf('All') !== -1
        ? Object.keys(projectsConfiguration)
        : projects;

    console.log(`Running ${runProjects.join(', ')}.`);

    runProjects.forEach((projectName) =>
      this.startProject(projectsConfiguration[projectName], terminal),
    );
  }
}

RunCommand.description = `Run services as console apps.
You can start multiple projects at once by supplying multiple project arguments.
`;

RunCommand.args = [
  {
    name: 'project',
    required: true,
    description: 'project to run',
    options: ['All'].concat(Object.keys(projectsConfiguration)),
  },
];
RunCommand.strict = false;

module.exports = RunCommand;
felixse commented 4 years ago

Didn't have time to look at it yet, but did you already try adding some delay between the flute run calls?

rythos42 commented 4 years ago

Yes. :( The CLI is built to be able to run it all at once, or run individually. I started running them individually because I felt like I had better success doing that. Sometimes Fluent will crash on the first one, sometimes on the 2nd or 5th. I run one command, wait for it to finish starting the server or web startup, then run the next one.

Kuuo commented 3 years ago

same problem here, I use flute run to fire up 6 console programs (1 window, 6 tabs) at the same time, we need these 6 console programs working concurrently.

sometimes it works fine, but sometimes it just crash:

The code is just like this:

flute run "cmd /k chcp 65001 && <console program1> some params"
flute run "cmd /k chcp 65001 && <console program2> some params"
flute run "cmd /k chcp 65001 && <console program3> some params"
flute run "cmd /k chcp 65001 && <console program4> some params"
flute run "cmd /k chcp 65001 && <console program5> some params"
flute run "cmd /k chcp 65001 && <console program6> some params"

I'm on Windows, the code is written in a .bat file, I double click the bat file to run it.