Issue1662936

classification
Title: line number lost form stacktrace
Type: Severity: normal
Components: Jythonc compiler Versions:
Milestone:
process
Status: closed Resolution: duplicate
Dependencies: Superseder:
Assigned To: Nosy List: cgroves, nhiro
Priority: normal Keywords:

Created on 2007-02-18.17:44:53 by nhiro, last changed 2007-02-20.06:29:51 by cgroves.

Messages
msg1493 (view) Author: NISHIO Hirokazu (nhiro) Date: 2007-02-18.17:44:53
When I compiled a script to JAR,
all line numbers on stacktrace are zero.

================
C:\jython2.2b1>java -jar test.jar
Exception in thread "main" Traceback (innermost last):
  File "C:\jython2.2b1\test.py", line 0, in main
  File "C:\jython2.2b1\test.py", line 0, in foo
  File "C:\jython2.2b1\test.py", line 0, in bar
ZeroDivisionError: integer division or modulo by zero
================

I write how to reproduce the problem below.

1: Make a script 'test.py'

================
def foo():
  bar()

def bar():
  1/0

foo()
================

2: Run it on jython. it works well.

================
C:\jython2.2b1>jython test.py
Traceback (innermost last):
  File "test.py", line 7, in ?
  File "test.py", line 2, in foo
  File "test.py", line 5, in bar
ZeroDivisionError: integer division or modulo by zero
================

3: Compile it by jythonc...

================
C:\jython2.2b1>jythonc --jar test.jar --core test.py
processing test

Required packages:

Creating adapters:

Creating .java files:
  test module

Compiling .java to .class...
Compiling with args: ['C:\\Program Files\\Java\\jdk1.5.0_10\\bin\\javac', '-clas
spath', 'C:\\jython2.2b1\\jython.jar;C:\\Program Files\\Java\\jre1.5.0_05\\lib\\
ext\\QTJava.zip;.\\jpywork;;C:\\jython2.2b1\\Tools\\jythonc;C:\\jython2.2b1;C:\\
jython2.2b1\\Lib;__classpath__', '.\\jpywork\\test.java']
0
Building archive: test.jar
Tracking java dependencies:
================

4: And run it. It doesn't work well

================
C:\jython2.2b1>java -jar test.jar
Exception in thread "main" Traceback (innermost last):
  File "C:\jython2.2b1\test.py", line 0, in main
  File "C:\jython2.2b1\test.py", line 0, in foo
  File "C:\jython2.2b1\test.py", line 0, in bar
ZeroDivisionError: integer division or modulo by zero
================
msg1494 (view) Author: Charlie Groves (cgroves) Date: 2007-02-20.06:29:51
This is a dupe of https://sourceforge.net/tracker/index.php?func=detail&aid=904322&group_id=12867&atid=112867  
Essentially, jythonc is unmaintained at this point.  We're distributing it with 2.2 since it works as well as it ever did and doesn't require any new language level features for 2.2, but it will be replaced with a different system in the 2.3 release.  If someone wants to contribute patches for jythonc, I imagine they would be applied, but I don't know of anyone doing that now.
History
Date User Action Args
2007-02-18 17:44:53nhirocreate