sage-windows icon indicating copy to clipboard operation
sage-windows copied to clipboard

Crash when trying to close the terminal window running the sage REPL

Open embray opened this issue 8 years ago • 0 comments

(Copied from embray/sage-windows#16)

If I run the "SageMath" shortcut, which opens mintty and launches directly to the sage REPL interface, if I then try to close that mintty Window I actually get a traceback, and then it is prevented from closing:

**********************************************************************

Oops, Sage crashed. We do our best to make it stable, but...

A crash report was automatically generated with the following information:
  - A verbatim copy of the crash traceback.
  - A copy of your input history during this session.
  - Data on your current Sage configuration.

It was left in the file named:
        '/dot_sage/ipython-5.0.0/Sage_crash_report.txt'
If you can email this file to the developers, the information in it will help
them in understanding and correcting the problem.

You can mail it to: sage-support at [email protected]
with the subject 'Sage Crash Report'.

If you want to do it now, the following command will work (under Unix):
mail -s 'Sage Crash Report' [email protected] < /dot_sage/ipython-5.                   0.0/Sage_crash_report.txt

To ensure accurate tracking of this issue, please file a report about it at:
http://trac.sagemath.org

Hit <Enter> to quit (your terminal may close):Error in sys.excepthook:
Traceback (most recent call last):
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/IPython/core/application.py", line 254, in excepthook
    return self.crash_handler(etype, evalue, tb)
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/IPython/core/crashhandler.py", line 180, in __call__
    input("Hit <Enter> to quit (your terminal may close):")
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/IPython/utils/py3compat.py", line 219, in input
    return builtin_mod.raw_input(prompt)
EOFError: EOF when reading a line

Original exception was:
Traceback (most recent call last):
  File "/opt/sagemath-7.4/src/bin/sage-ipython", line 11, in <module>
    app.start()
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/IPython/terminal/ipapp.py", line 348, in start
    self.shell.mainloop()
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 402, in mainloop
    self.interact()
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 385, in interact
    code = self.prompt_for_code()
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/IPython/terminal/interactiveshell.py", line 321, in prompt_for_code
    pre_run=self.pre_prompt, reset_current_buffer=True)
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/prompt_toolkit/interface.py", line 389, in run
    self.eventloop.run(self.input, self.create_eventloop_callbacks())
  File "/opt/sagemath-7.4/local/lib/python2.7/site-packages/prompt_toolkit/terminal/vt100_input.py", line 424, in __exit__
    termios.tcsetattr(self.fileno, termios.TCSANOW, self.attrs_before)
termios.error: (25, 'Inappropriate ioctl for device')

If I then hit Ctrl-C sage exits and the window closes. It looks like this could be a buglet in prompt_toolkit on Cygwin/mintty, but not sure yet.

embray avatar Aug 28 '17 10:08 embray