Title: ArrayIndexOutOfBounds during import
Type: crash Severity: major
Components: Core Versions: Jython 2.5
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: fleminra, harryb, offbeata, zyasoft
Priority: Keywords:

Created on 2013-05-24.12:20:58 by offbeata, last changed 2015-02-06.20:52:06 by fleminra.

msg8031 (view) Author: Stefan Sechelmann (offbeata) Date: 2013-05-24.12:20:58
When deployed as java webstart a simple import inspect would fail with the following exception:
java.lang.ArrayIndexOutOfBoundsException: java.lang.ArrayIndexOutOfBoundsException: 5
Exception in thread "AWT-EventQueue-0" Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "__pyclasspath__/", line 16, in <module>
  File "__pyclasspath__/", line 6, in <module>
  File "__pyclasspath__/", line 15, in <module>
java.lang.ArrayIndexOutOfBoundsException: 5
	at org.python.objectweb.asm.ClassReader.a(Unknown Source)
	at org.python.objectweb.asm.ClassReader.accept(Unknown Source)
	at org.python.objectweb.asm.ClassReader.accept(Unknown Source)
	at org.python.core.AnnotationReader.<init>(
	at org.python.core.imp.readCode(
	at org.python.core.util.importer.getModuleCode(
	at org.python.core.util.importer.importer_load_module(
	at org.python.core.ClasspathPyImporter.ClasspathPyImporter_load_module(
	at org.python.core.ClasspathPyImporter$ClasspathPyImporter_load_module_exposer.__call__(Unknown Source)
	at org.python.core.PyBuiltinMethodNarrow.__call__(
	at org.python.core.imp.loadFromLoader(
	at org.python.core.imp.find_module(
	at org.python.core.imp.import_next(
	at org.python.core.imp.import_module_level(
	at org.python.core.imp.importName(
	at org.python.core.ImportFunction.__call__(
	at org.python.core.PyObject.__call__(
	at org.python.core.__builtin__.__import__(
	at org.python.core.imp.importOne(
msg8032 (view) Author: Stefan Sechelmann (offbeata) Date: 2013-05-24.14:30:22
Before the exception there are a few other lines of console output that might be helpful:
Mai 24, 2013 4:28:40 PM getInheritableThreadLocalsField
INFO: Couldn't access Thread.inheritableThreadLocals. Reference finalizer threads will inherit thread local values.
JNLPClassLoader: Finding library libjffi-1.0.dylib
msg8052 (view) Author: (harryb) Date: 2013-06-25.20:53:10
I have what appears to be the same problem, and here's a little more data.

Import causes no problems for me when NOT using Java Web Start.  But with JWS, some imports give the same error/Traceback as shown by offbeata.

Specifically: "import copy_reg" is what triggers this problem for me.  So a jython script reading simply "import copy_reg" will fail, whereas, e.g. "import sys" will succeed.

Unfortunately, many standard modules (e.g. string, re) import copy_reg internally, and so they also fail (the traceback in those cases points to their "import copy_reg" line).
msg8496 (view) Author: Jim Baker (zyasoft) Date: 2014-05-21.23:06:34
Is this still an issue with the latest beta?
msg9072 (view) Author: Jim Baker (zyasoft) Date: 2014-10-05.16:47:42
Closing out unless we have another test report confirming for beta 3/trunk. Note that the Google jar dependency has been upgraded as of beta 3.
msg9486 (view) Author: Robert Fleming (fleminra) Date: 2015-02-06.20:52:05
Just for closure:
2.5.2: no problem
2.5.3: ArrayIndexOutOfBoundsException
2.5.4-rc1: no problem
Date User Action Args
2015-02-06 20:52:06fleminrasetnosy: + fleminra
messages: + msg9486
2014-10-05 16:47:42zyasoftsetstatus: open -> closed
resolution: out of date
messages: + msg9072
2014-05-21 23:06:34zyasoftsetnosy: + zyasoft
messages: + msg8496
2013-06-25 20:53:10harrybsetnosy: + harryb
messages: + msg8052
2013-05-24 14:30:22offbeatasetmessages: + msg8032
2013-05-24 12:20:59offbeatacreate