which crashes and sometimes freezes, when run from a Shin input inside a GTK application on GNOME. When a crash occurs, stdout contains the message
Error reading events from display: Broken pipe
This does not happen on KDE or Sway, even on the same base system and with the same GTK applications.
My guess is that the number 4083 is 4096 minus the size of the DBus header or something. There appears to be a GNOME-specific limit at work here. The other DEs can handle much larger outputs without any problems.
This can be verified by running the commands
which works, versus
which crashes and sometimes freezes, when run from a Shin input inside a GTK application on GNOME. When a crash occurs, stdout contains the message
This does not happen on KDE or Sway, even on the same base system and with the same GTK applications.
My guess is that the number 4083 is 4096 minus the size of the DBus header or something. There appears to be a GNOME-specific limit at work here. The other DEs can handle much larger outputs without any problems.