rio icon indicating copy to clipboard operation
rio copied to clipboard

Crash whith invalid working-dir

Open silentbat opened this issue 11 months ago • 1 comments

Error:

---------------------------
Rio: Runtime Error
---------------------------
panicked at frontends\rioterm\src\screen\mod.rs:1501:22:
attempt to calculate the remainder with a divisor of zero

Press Ctrl-C to Copy
---------------------------
OK   
---------------------------

How to replicate:

  • on win10
  • set working-dir in the config to something invalid ("~" for example)
  • start rio (and get the error message)
  • try to close with Alt-F4
  • then instead of pressing enter, press esc (to continue)
  • takes a bit, then error

sometimes i needed to press escape multiple times, but always get this error.

Sorry if this information is insufficient, please tell me what you need. I just started using rio and have no idea whether there is logging.

Nice work on a new terminal, I like it, thank you!


edit:

line of code from the panic: https://github.com/raphamorim/rio/blob/v0.2.2/frontends/rioterm/src/screen/mod.rs#L1501

version from rio -V is rioterm 0.2.2

silentbat avatar Jan 09 '25 19:01 silentbat

Yea, it's a bad behaviour on Rio. Ideally Rio should check if the path exists and then allow to proceed otherwise trigger an error. Marking it as a bug

raphamorim avatar Jan 26 '25 01:01 raphamorim