-
-
Notifications
You must be signed in to change notification settings - Fork 112
-
-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input is dropped from large redirections #2548
Comments
nope, this seems to happen with 3.0.4 as well =. they're not dropped at the input side, but internally. we ought be strong against this (we ought just wait on the client input buffer). |
so yeah, it starts right at 8192 bytes (coincidentally the size of our input buffers). testing with dd:
|
|
alright, unwinding from the core:
the inner read loop looks like:
so we only need to be processing to the end in |
so i think we need check for available space all the way back in |
so if we drop out from |
we get a signal from the client when it reads from its buffer, providing us the space necessary to process input. so we ought be fine so long as we check the number free, see there are none, and enter the |
well, that appears to fix it, as expected...let's think this through some more. |
hrmmm, still a few errors, but far fewer:
|
down further, and we've eliminated a bunch of busy work:
|
|
the error i'm seeing is happening at the beginning: process_escape:2118:walk result on 116 (t): 2 274
process_escape:2106:initialized automaton to 1
process_escape:2118:walk result on 91 ([): 0 4
process_escape:2118:walk result on 63 (?): 0 304
process_escape:2118:walk result on 54 (6): 0 346
process_escape:2118:walk result on 50 (2): 0 305
process_escape:2118:walk result on 59 (;): 0 357
da1_attrs_cb:1173:read primary device attributes
da1_attrs_cb:1176:DA1: 62 []
process_escape:2118:walk result on 99 (c): 1 358
handoff_initial_responses_late:1119:handing off initial responses
block_on_input:2356:blocking on input availability
block_on_input:2401:output queues full; blocking on ipipes
block_on_input:2413:waiting on 2 fds (ibuf: 8192/8192)
ncplane_new_internal:671:created new 60x128 plane "std" @ 0x0
ncplane_new_internal:671:created new 6x56 plane "plot" @ 53x36
ncplane_new_internal:671:created new 6x56 plane "plot" @ 53x36
ncplane_erase:2385:erasing 6x56 plane
ncvisual_blit:1116:inblit 132x616 0@0 0x0 @ 0x0 0x56333ad16a80
ncvisual_geom_inner:277:vis 0x0+0x0 0x7f70ccc42010
ncvisual_geom_inner:370:pixel prescale: 132 616 132 616
ncvisual_geom_inner:385:pblit: 132x616 ← 0x0 of 132/616 stride 2496 @0x0 0x7f70ccc42010 11
ncvisual_geom_inner:445:rgeom: 6 56 132 616 @ 0/0 (6 on 0x56333ad16a80)
ncvisual_blit:1165:blit to plane 0x56333ad16a80 at 53/36 geom 6x56
ncvisual_render_pixels:1027:pblit: rows/cols: 6x56 plane: 6/56
block_on_input:2440:poll returned 1
block_on_input:2458:got events: Ti
read_input_nblock:2069:read 9B from 8 (8183B left)
process_escape:2106:initialized automaton to 1
process_escape:2118:walk result on 91 ([): 0 4
process_escape:2118:walk result on 49 (1): 0 24
process_escape:2118:walk result on 51 (3): 0 269
process_escape:2118:walk result on 59 (;): 0 270
process_escape:2118:walk result on 49 (1): 0 271
process_escape:2118:walk result on 58 (:): 0 278
process_escape:2118:walk result on 51 (3): 0 279
kitty_kbd:797:v/m/e 1115121 1 3
load_ncinput:518:dropping input 0x001103f1
inc_input_errors:123:ZORP ZORP ZORP ZORP ZORP |
so we start off in this situation:
|
ok, so that's the enter+release at the end of a kitty command line, and then mouse movement events. this is all stuff coming in over the true terminal fd, which we do indeed have to read through. that's not a problem. this is fixed. |
Try running e.g.
(cat ../src/lib/*.c) | ./notcurses-input
. It'll report a lot of input errors at the end, which I'm pretty certain it didn't do before (i'm checking 3.0.4 now).The text was updated successfully, but these errors were encountered: