Page 2 of 3

Re: Build 3308 - Improvements in the built-in terminal

Posted: Mon Jan 04, 2021 8:07 am
by mike
lonelykid wrote:
Mon Jan 04, 2021 4:13 am
I'm still getting exactly the same problem with your latest 1.29 RC -- Black window with a cursor, does not respond to any inputs. BTW terminal loading is also slow, with the spinning color wheel showing up. I can open iTerm2 almost instantly, so it's not hardware performance issue.
Hi, sorry about that. Unfortunately I can't help without additional information about your setup.
Could you run NC in a terminal with logging enabled?
The syntax is "-NCLogLevel {trace|debug|info|warn|err|critical}", e.g.

Code: Select all

migun@Michaels-MBP-13-2020 / % /Applications/Nimble\ Commander.app/Contents/MacOS/Nimble\ Commander -NCLogLevel debug
Entries related to the terminal emulator are marked with "[term]".
Another thing to look at is your local shell config - does it contain anything special?

Re: Build 3308 - Improvements in the built-in terminal

Posted: Sat Jan 23, 2021 10:28 am
by merlino73
mike wrote:
Sun Dec 06, 2020 11:19 pm
Hi Massimiliano,
Unfortunately I wasn't able to reproduce this issue either. Could you try the latest build and, if the issue persists, provide a terminal debug output as described in the #3441 topic?

Sorry, I miss the message, but I've the same problem with Version 1.2.9 (3532).

Below you can see the problem.

A list of `Missed a CSI` are printed on console each command I write on terminal.

Thank you


out.gif
out.gif (262.61 KiB) Viewed 16145 times

Code: Select all

[2021-01-23 11:22:31.647] [term] [info] [ShellTask.cpp:241] Starting a new shell: /bin/bash
[2021-01-23 11:22:31.647] [term] [info] [ShellTask.cpp:242] Initial work directory: /Users/max/
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:246] Environment:
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:248] 	LC_CTYPE = UTF-8
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:248] 	TERM = xterm-16color
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:248] 	TERM_PROGRAM = Nimble_Commander
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:256] posix_openpt(O_RDWR) returned 38 (master_fd)
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:279] ptsname: /dev/ttys003
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:287] slave_fd: 39
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:345] cwd_pipe: 40, 41
[2021-01-23 11:22:31.648] [term] [debug] [ShellTask.cpp:346] semaphore_pipe: 42, 43
[2021-01-23 11:22:31.662] [term] [debug] [ShellTask.cpp:362] fork() returned 74694
[2021-01-23 11:22:31.667] [term] [debug] [ShellTask.cpp:388] started a background thread 0x70000517e000
[2021-01-23 11:22:31.667] [term] [debug] [ShellTask.cpp:412] prompt_setup:  PROMPT_COMMAND='if [ $$ -eq 74694 ]; then pwd>&20; read sema <&21; fi'

[2021-01-23 11:22:34.207] [term] [info] [ShellTask.cpp:545] pwd prompt from shell_pid=74694: /Users/max/
[2021-01-23 11:22:37.817] [term] [info] [ShellTask.cpp:545] pwd prompt from shell_pid=74694: /Users/max/
Missed a CSI: 48;5;35m
Missed a CSI: 38;5;35;48;5;240m
Missed a CSI: 38;5;35;48;5;240m
Missed a CSI: 38;5;35;48;5;240m
Missed a CSI: 48;5;240m
Missed a CSI: 48;5;240m
Missed a CSI: 38;5;240m
Missed a CSI: 38;5;240m
Missed a CSI: 38;5;240m
Missed a CSI: 38;5;240m
Missed a CSI: 48;5;240m
Missed a CSI: 48;5;240m

Re: Build 3308 - Improvements in the built-in terminal

Posted: Sat Jan 23, 2021 9:03 pm
by mike
merlino73 wrote:
Sat Jan 23, 2021 10:28 am
Sorry, I miss the message, but I've the same problem with Version 1.2.9 (3532).
Below you can see the problem.
A list of `Missed a CSI` are printed on console each command I write on terminal.

Code: Select all

Missed a CSI: 48;5;35m
Missed a CSI: 38;5;35;48;5;240m
Missed a CSI: 48;5;240m
Hi, thank you for the output, it starts to make sense now.
Essentially your Bash tries to use VT100 commands that aren't supported by NimbleCommander.
CSI 48/38;5...m set colours using RGB and index encoding, which is not implemented now and wasn't implemented before.
Now, I'm not sure why Bash uses it.
Do you have a non-standard Bash config on your system?
Out of interest, could you create a fresh user and check if that would make any difference in observed behaviour?

Re: Build 3308 - Improvements in the built-in terminal

Posted: Sun Jan 24, 2021 11:43 am
by merlino73
Hi Mike,
In the new user there are no problems at all.
So I made some tests and I think the problem is related to oh-my-bash that setup a fancy prompt.

Re: Build 3308 - Improvements in the built-in terminal

Posted: Sun Jan 24, 2021 6:33 pm
by buzy
I'm also not using the bash version that comes as default but the latest version of bash installed with homebrew and the built-in terminal also takes a couple seconds to switch on but when it switches off it's quick.

Re: Build 3308 - Improvements in the built-in terminal

Posted: Tue Jan 26, 2021 10:08 pm
by mike
buzy wrote:
Sun Jan 24, 2021 6:33 pm
I'm also not using the bash version that comes as default but the latest version of bash installed with homebrew and the built-in terminal also takes a couple seconds to switch on but when it switches off it's quick.
Well, any chance to look at the logs to find out at which point it gets stuck?

Re: Build 3308 - Improvements in the built-in terminal

Posted: Thu Jan 28, 2021 2:56 pm
by buzy
Here is the output from Terminal:

Last login: Thu Jan 28 15:58:08 on ttys000
Restored session: Thu Jan 28 16:01:50 EET 2021
Stefans-MacBook-Pro:~ buzy$ /Applications/Nimble\ Commander.app/Contents/MacOS/Nimble\ Commander -NCLogLevel debug
[2021-01-28 16:55:35.372] [utility] [debug] [NativeFSManagerImpl.mm:53] Started initializing NativeFSManagerImpl 0x7f881c6497d0
[2021-01-28 16:55:35.372] [utility] [info] [NativeFSManagerImpl.mm:145] Gatherning info about /
[2021-01-28 16:55:35.376] [utility] [info] [NativeFSManagerImpl.mm:145] Gatherning info about /dev
[2021-01-28 16:55:35.377] [utility] [info] [NativeFSManagerImpl.mm:145] Gatherning info about /System/Volumes/Data
[2021-01-28 16:55:35.377] [utility] [info] [NativeFSManagerImpl.mm:145] Gatherning info about /private/var/vm
[2021-01-28 16:55:35.378] [utility] [info] [NativeFSManagerImpl.mm:145] Gatherning info about /System/Volumes/Data/home
[2021-01-28 16:55:35.550] [utility] [debug] [NativeFSManagerImpl.mm:79] Finished initializing NativeFSManagerImpl 0x7f881c6497d0
[2021-01-28 16:55:43.165] [term] [info] [ShellTask.cpp:241] Starting a new shell: /usr/local/bin/bash
[2021-01-28 16:55:43.165] [term] [info] [ShellTask.cpp:242] Initial work directory: /Users/buzy/Desktop/UPT/Anu 3/sem 1/MTP/Curs/
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:246] Environment:
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:248] LC_CTYPE = UTF-8
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:248] TERM = xterm-16color
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:248] TERM_PROGRAM = Nimble_Commander
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:256] posix_openpt(O_RDWR) returned 25 (master_fd)
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:279] ptsname: /dev/ttys001
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:287] slave_fd: 92
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:345] cwd_pipe: 93, 94
[2021-01-28 16:55:43.166] [term] [debug] [ShellTask.cpp:346] semaphore_pipe: 95, 96
[2021-01-28 16:55:43.203] [term] [debug] [ShellTask.cpp:362] fork() returned 3152
[2021-01-28 16:55:48.204] [term] [warning] [ShellTask.cpp:374] forked process failed to become a shell!

Re: Build 3308 - Improvements in the built-in terminal

Posted: Thu Jan 28, 2021 10:29 pm
by mike
buzy wrote:
Thu Jan 28, 2021 2:56 pm
Here is the output from Terminal:
[2021-01-28 16:55:43.165] [term] [info] [ShellTask.cpp:241] Starting a new shell: /usr/local/bin/bash
[2021-01-28 16:55:48.204] [term] [warning] [ShellTask.cpp:374] forked process failed to become a shell!
By any chance is

Code: Select all

/usr/local/bin/bash
a symlink?

Re: Build 3308 - Improvements in the built-in terminal

Posted: Fri Jan 29, 2021 2:42 pm
by buzy
I think so. It's installed with homebrew.

Stefans-MacBook-Pro:~ buzy$ ls -als /usr/local/bin/bash
0 lrwxr-xr-x 1 buzy admin 30 Jul 16 2020 /usr/local/bin/bash -> ../Cellar/bash/5.0.18/bin/bash

Re: Build 3308 - Improvements in the built-in terminal

Posted: Sat Jan 30, 2021 10:09 am
by mike
buzy wrote:
Fri Jan 29, 2021 2:42 pm
I think so. It's installed with homebrew.

Stefans-MacBook-Pro:~ buzy$ ls -als /usr/local/bin/bash
0 lrwxr-xr-x 1 buzy admin 30 Jul 16 2020 /usr/local/bin/bash -> ../Cellar/bash/5.0.18/bin/bash
Ok, that explains what's happening.
The implementation didn't support symlinks in shell paths.
Now I fixed this issue and next releases should behave as expected.