desed icon indicating copy to clipboard operation
desed copied to clipboard

Add timeout to sed, aborting if it takes too long and guessing where the infinite loop might be

Open SoptikHa2 opened this issue 4 years ago • 1 comments

When one makes an error in script and loads it with desed or presses l to reload source code, and the sed script makes sed enter infinite loop, desed hangs and trusts sed to actually exit. We shouldn't assume everything will be ok and after a while just exit with an error. It would be great if we could actually try to guess where did sed loop so we can point user at that.

SoptikHa2 avatar Apr 22 '20 12:04 SoptikHa2

One way: if we loaded output from sed asynchronously, we could just stop reading after n states. This would also enable user to nicely debug where and why is the infinite loop there. It would be best if we could add way to send warnings from debugger straight to TUI, so we can warn user that full sed state wasn't loaded, probably due to infinite loop.

SoptikHa2 avatar Apr 23 '20 14:04 SoptikHa2