Bug 429078 - No way to recover from a syntax error without restarting the kernel
Summary: No way to recover from a syntax error without restarting the kernel
Status: RESOLVED FIXED
Alias: None
Product: cantor
Classification: Applications
Component: sage-backend (show other bugs)
Version: 20.11.80
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Cantor Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-14 08:29 UTC by Antonio Rojas
Modified: 2020-11-14 15:47 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Cantor info (89.93 KB, image/png)
2020-11-14 15:26 UTC, Nikita Sirgienko
Details
First execution (105.51 KB, image/png)
2020-11-14 15:26 UTC, Nikita Sirgienko
Details
Second execution (92.41 KB, image/png)
2020-11-14 15:26 UTC, Nikita Sirgienko
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Antonio Rojas 2020-11-14 08:29:36 UTC
SUMMARY
Once you hit a syntax error, the session is totally broken with no way to recover other than restarting the kernel

STEPS TO REPRODUCE
1. evaluate "exp(1))"
2. watch a syntax error
3. evaluate the corrected expression "exp(1)"
4. watch a syntax error again
5. evaluate any other expression
6. watch a syntax error again
7. restart the Sage kernel
8. evaluate any expression
9. works


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.9.8
KDE Plasma Version: 5.20.3
KDE Frameworks Version: 5.75.0
Qt Version: 5.15.1
Comment 1 Bug Janitor Service 2020-11-14 14:56:36 UTC
A possibly relevant merge request was started @ https://invent.kde.org/education/cantor/-/merge_requests/22
Comment 2 Nikita Sirgienko 2020-11-14 15:26:25 UTC
Created attachment 133329 [details]
Cantor info
Comment 3 Nikita Sirgienko 2020-11-14 15:26:39 UTC
Created attachment 133330 [details]
First execution
Comment 4 Nikita Sirgienko 2020-11-14 15:26:52 UTC
Created attachment 133331 [details]
Second execution
Comment 5 Nikita Sirgienko 2020-11-14 15:27:09 UTC
Interesting, because I can't reproduce it with 20.11.80 on Ubuntu 20.04.
(I have a problem with creating desktop recording, so I have just make a few screenshots)
Comment 6 Antonio Rojas 2020-11-14 15:30:56 UTC
sage 9.1 used a very old ipython version, which probably behaves differently.
Comment 7 Nikita Sirgienko 2020-11-14 15:31:49 UTC
You use sage 9.2?
Comment 8 Antonio Rojas 2020-11-14 15:34:56 UTC
(In reply to Nikita Sirgienko from comment #7)
> You use sage 9.2?

Yes, but I could also reproduce it with the distro Sage 9.1 package built against ipython 7
Comment 9 Nikita Sirgienko 2020-11-14 15:40:10 UTC
Ok. I also reproduce it with Sage 9.2 on Ubuntu 20.10
Comment 10 Antonio Rojas 2020-11-14 15:47:27 UTC
Git commit 7abf57f88ba69883237d84c82db3f195eb961693 by Antonio Rojas.
Committed on 14/11/2020 at 15:48.
Pushed by arojas into branch 'release/20.12'.

Fix unusable Sage session after a syntax error

When we are thrown to the additional input prompt, simply report and error and send an interrupt signal to exit.

Do not try to guess what the problem is and fix it: this might be caused by an unmatched opening bracket or closing bracket, in which case we would be stuck in the additional input prompt forever

M  +2    -2    src/backends/sage/sageexpression.cpp

https://invent.kde.org/education/cantor/commit/7abf57f88ba69883237d84c82db3f195eb961693