Session logging can mangle large output
Thanks for filing an issue! Please answer the questions below so I can help you.
- iTerm2 version: 3.3.11
- OS version: 10.15.5
- Attach com.googlecode.iterm2.plist here (drag-drop from finder into this window)com.googlecode.iterm2.plist
- Attach a debug log, if possible. Instructions at https://iterm2.com/debuglog
I attempted to run this under debug logging, however the problem didn't manifest for me when debug logging was running. Heisenbug for the win.
Detailed steps to reproduce the problem:
I first noticed the issue when attempting to use session logging to store the (long) JSON output from a command run on a remote server. I replicated the issue locally like this:
- Generate a JSON blob; I used the code in the attached generate_json.py; generating 5000-10000 entries does the trick. To make it easy to see, I run the command like this: ./generate_json.py 5000 | python -mjson.tool > generated_file.json
- Start session logging; save to 'session_generated_file.json' or some such
- Run: cat generated_file.json
- Stop session logging
- Clean up the top and bottom of the 'session_generated_file.json' so that it's (in theory) valid json
- Attempt to parse the new file: cat session_generated_file.json | python -mjson.tool ; this fails for me.
What should have happened: The file generated by script and the file generated by session logging should, after the aforementioned header/footer cleanup, be identical
Another way to duplicate this without using the script is to start session logging and run 'cat /usr/share/dict/words' and then compare the original file with the one generated from the session.