Issue1402

classification
Title: Error during input on interactive console causes interpreter to fail
Type: crash Severity: urgent
Components: None Versions: 2.5.0
Milestone:
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: fwierzbicki Nosy List: fwierzbicki, joey@cadence.com, qny31541
Priority: Keywords:

Created on 2009-07-16.08:26:28 by joey@cadence.com, last changed 2014-05-02.13:43:50 by qny31541.

Messages
msg4911 (view) Author: Joey Jarosz (joey@cadence.com) Date: 2009-07-16.08:26:26
I just noticed that in 2.5.0 if I accidently make a syntax error when 
defining a new function using the interactive shell it appears to stop 
executing any commands I type in. Below are two sessions where I typed 
the same text but got very different results.

 

2.2.1 Flagged the second print statement as a syntax error, but 
further input typed in is handled and processed correctly.

 

2.5.0 Does not flag any errors, but I can no longer get anything to be 
processed. It keeps accepting input, but does not execute it.

 

It looks like down somewhere in InteractiveInterpreter or lower the 
runsource() java method keeps returning ‘true’ as if it needs more 
input. I am actually trying to use Jython inside my application via a 
simple GUI, but since the problem happens with the jython.bat that 
ships with 2.5.0 I cannot proceed with my work.

 

Any ideas? Workarounds?

 

 

D:\jython2.5.0>jython.bat
Jython 2.5.0 (Release_2_5_0:6476, Jun 16 2009, 13:33:26)
[Java HotSpot(TM) Client VM (Sun Microsystems Inc.)] on java1.6.0_13
Type "help", "copyright", "credits" or "license" for more information.

>>> def x():
...   print 'aaa'
... print 'bbb'
...
... print 1111
...
... print 2222
...


D:\jython2.2.1>jython.bat
Jython 2.2.1 on java1.6.0_13
Type "copyright", "credits" or "license" for more information.

>>> def x():
...   print 'aaa'
... print 'bbb'
Traceback (innermost last):
  (no code object) at line 0
  File "<console>", line 3
        print 'bbb'
        ^
SyntaxError: invalid syntax
>>> print 1111
1111
>>> 
>>> print 2222
2222
>>>
msg7700 (view) Author: Frank Wierzbicki (fwierzbicki) Date: 2013-02-19.21:13:52
I don't think this is fixable with Jython's current design.
History
Date User Action Args
2014-05-02 13:43:50qny31541setnosy: + qny31541
2013-02-19 21:13:52fwierzbickisetstatus: open -> closed
resolution: wont fix
messages: + msg7700
2009-10-20 04:40:02pjenveysetassignee: fwierzbicki
nosy: + fwierzbicki
2009-07-16 08:26:28joey@cadence.comcreate