dankamongmen / notcurses

blingful character graphics/TUI library. definitely not curses.
https://nick-black.com/dankwiki/index.php/Notcurses
Other
3.48k stars 112 forks source link

notcurses-info hangs after failure building automaton #2644

Open dankamongmen opened 2 years ago

dankamongmen commented 2 years ago

While investigating #2643, I added a new entry to the automaton:

     { "]11;rgb:\\S", bgdef_cb, },
+    { "]\\N;rgb:\\S", palette_cb, }, // deal with broken alacritty responses

this blows up automaton construction, which is its own bug:

link_numeric:380:adding numeric with follow ; following ]4;
link_numeric:393:phi node: 430->439
link_numeric:394:eta node: 440 philink[;]: 440
insert_path:481:added fixed r 114 as 441
insert_path:481:added fixed g 103 as 442
insert_path:481:added fixed b 98 as 443
insert_path:481:added fixed : 58 as 444
esctrie_make_string:181:made string: 446
insert_path:481:added fixed ] 93 as 409
insert_path:481:added fixed 4 52 as 438
insert_path:481:added fixed ; 59 as 430
insert_path:481:added fixed r 114 as 431
insert_path:481:added fixed g 103 as 432
insert_path:481:added fixed b 98 as 433
insert_path:481:added fixed : 58 as 434
esctrie_make_string:138:can't make  -followed string
build_cflow_automaton:1792:failed adding palette_cb
handoff_initial_responses_late:1127:handing off initial responses
block_on_input:2378:blocking on input availability
block_on_input:2435:waiting on 1 fds (ibuf: 0/8192)
inputlayer_get_responses:2806:aborting after automaton construction failure

but we end up hanging, rather than exiting:

block_on_input:2462:poll returned 1
block_on_input:2480:got events: tI
stop_inputlayer:2551:tearing down input thread
read_input_nblock:2092:read 7B from 0 (8185B left)
process_melange:2294:input 0 (0)/7 [0x1b] ( )
process_escape:2129:initialized automaton to 1
process_escape:2141:walk result on 91 ([): 0 2
process_escape:2141:walk result on 49 (1): 0 23
process_escape:2141:walk result on 49 (1): 0 264
process_escape:2141:walk result on 59 (;): 0 265
process_escape:2141:walk result on 49 (1): 0 266
cursor_location_cb:693:cursor location: 10/0
process_escape:2141:walk result on 82 (R): 2 318
block_on_input:2378:blocking on input availability
block_on_input:2435:waiting on 1 fds (ibuf: 0/8192)
FrankRuben commented 2 years ago

I'm getting a similar result, but for different conditions - using WSL2 and the current master: cmake and make did work just fine, I can start notcurses-info in the WSL bash (C:\Windows\System32\bash.exe) and in an Xterm, but it will stop also with "block_on_input:2435:waiting on 1 fds" when running in Windows Terminal. Whenever a enter a key in the WT console, a few more log lines are shown, then again output stops with on "block_on_input".

notcurses_20220516