Exported application crashes -- illegal reflective access operation error

I have a processing.py sketch that runs fine in the IDE but when I export it (I’m running a mac), I get the following error:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.python.core.PyJavaType (file:/Users/basic/Documents/your_story1/your_story7/application.macosx/your_story7.app/Contents/Processing/lib/jycessing/jython.jar) to method java.lang.Object.finalize()
WARNING: Please consider reporting this to the maintainers of org.python.core.PyJavaType
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
java.lang.reflect.InaccessibleObjectException: Unable to make private java.lang.constant.ConstantDesc java.lang.constant.DynamicConstantDesc.tryCanonicalize() accessible: module java.base does not "opens java.lang.constant" to unnamed module @378542de
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:344)
	at java.base/java.lang.reflect.AccessibleObject.checkCanSetAccessible(AccessibleObject.java:284)
	at java.base/java.lang.reflect.Method.checkCanSetAccessible(Method.java:198)
	at java.base/java.lang.reflect.Method.setAccessible(Method.java:192)
	at org.python.core.PyJavaType.init(PyJavaType.java:298)
	at org.python.core.PyType.createType(PyType.java:1523)
	at org.python.core.PyType.addFromClass(PyType.java:1462)
	at org.python.core.PyType.fromClassSkippingInners(PyType.java:1585)
	at org.python.core.PyJavaType.init(PyJavaType.java:270)
	at org.python.core.PyType.createType(PyType.java:1523)
	at org.python.core.PyType.addFromClass(PyType.java:1462)
	at org.python.core.PyType.fromClass(PyType.java:1551)
	at org.python.core.PyType.fromClass(PyType.java:1569)
	at org.python.core.PyType.fromClass(PyType.java:1569)
	at org.python.core.PyJavaType.wrapJavaObject(PyJavaType.java:90)
	at org.python.core.adapter.ClassicPyObjectAdapter.adapt(ClassicPyObjectAdapter.java:135)
	at org.python.core.Py.java2py(Py.java:2017)
	at org.python.core.PyReflectedField._doget(PyReflectedField.java:42)
	at org.python.core.PyObject._doget(PyObject.java:1173)
	at org.python.core.PyObject.__get__(PyObject.java:3816)
	at org.python.core.PyType.type___findattr_ex__(PyType.java:1620)
	at org.python.core.PyType.__findattr_ex__(PyType.java:1599)
	at org.python.core.PyObject.__findattr__(PyObject.java:965)
	at org.python.core.PyObject.__findattr__(PyObject.java:950)
	at org.python.core.imp.ensureFromList(imp.java:1016)
	at org.python.core.imp.ensureFromList(imp.java:1012)
	at org.python.core.imp.ensureFromList(imp.java:990)
	at org.python.core.imp.import_module_level(imp.java:977)
	at org.python.core.imp.importName(imp.java:1057)
	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
	at org.python.core.PyObject.__call__(PyObject.java:450)
	at org.python.core.__builtin__.__import__(__builtin__.java:1232)
	at org.python.core.imp.importAll(imp.java:1176)
	at os$py.f$0(os.py:726)
	at os$py.call_function(os.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:171)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.imp.createFromCode(imp.java:436)
	at org.python.core.util.importer.importer_load_module(importer.java:116)
	at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:170)
	at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
	at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)
	at org.python.core.imp.loadFromLoader(imp.java:593)
	at org.python.core.imp.find_module(imp.java:547)
	at org.python.core.imp.import_next(imp.java:838)
	at org.python.core.imp.import_module_level(imp.java:957)
	at org.python.core.imp.importName(imp.java:1057)
	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
	at org.python.core.PyObject.__call__(PyObject.java:450)
	at org.python.core.__builtin__.__import__(__builtin__.java:1232)
	at org.python.core.imp.importOne(imp.java:1076)
	at linecache$py.f$0(linecache.py:68)
	at linecache$py.call_function(linecache.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:171)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.imp.createFromCode(imp.java:436)
	at org.python.core.util.importer.importer_load_module(importer.java:116)
	at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:170)
	at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
	at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)
	at org.python.core.imp.loadFromLoader(imp.java:593)
	at org.python.core.imp.find_module(imp.java:547)
	at org.python.core.imp.import_next(imp.java:838)
	at org.python.core.imp.import_module_level(imp.java:957)
	at org.python.core.imp.importName(imp.java:1057)
	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
	at org.python.core.PyObject.__call__(PyObject.java:450)
	at org.python.core.__builtin__.__import__(__builtin__.java:1232)
	at org.python.core.imp.importOne(imp.java:1076)
	at warnings$py.f$0(/Users/basic/Documents/your_story1/your_story7/application.macosx/your_story7.app/Contents/Processing/lib/jycessing/jython.jar/Lib/warnings.py:424)
	at warnings$py.call_function(/Users/basic/Documents/your_story1/your_story7/application.macosx/your_story7.app/Contents/Processing/lib/jycessing/jython.jar/Lib/warnings.py)
	at org.python.core.PyTableCode.call(PyTableCode.java:171)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.imp.createFromCode(imp.java:436)
	at org.python.core.util.importer.importer_load_module(importer.java:116)
	at org.python.modules.zipimport.zipimporter.zipimporter_load_module(zipimporter.java:170)
	at org.python.modules.zipimport.zipimporter$zipimporter_load_module_exposer.__call__(Unknown Source)
	at org.python.core.PyBuiltinMethodNarrow.__call__(PyBuiltinMethodNarrow.java:46)
	at org.python.core.imp.loadFromLoader(imp.java:593)
	at org.python.core.imp.find_module(imp.java:547)
	at org.python.core.imp.import_next(imp.java:838)
	at org.python.core.imp.import_module_level(imp.java:957)
	at org.python.core.imp.importName(imp.java:1057)
	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
	at org.python.core.PyObject.__call__(PyObject.java:450)
	at org.python.core.__builtin__.__import__(__builtin__.java:1232)
	at org.python.core.__builtin__.__import__(__builtin__.java:1192)
	at org.python.core.Py.importWarnings(Py.java:479)
	at org.python.core.Py.warning(Py.java:504)
	at org.python.core.Py.warning(Py.java:499)
	at org.python.core.imp.loadFromSource(imp.java:628)
	at org.python.core.imp.find_module(imp.java:551)
	at org.python.core.imp.import_next(imp.java:838)
	at org.python.core.imp.import_module_level(imp.java:957)
	at org.python.core.imp.importName(imp.java:1057)
	at org.python.core.ImportFunction.__call__(__builtin__.java:1280)
	at org.python.core.PyObject.__call__(PyObject.java:450)
	at org.python.core.__builtin__.__import__(__builtin__.java:1232)
	at org.python.core.imp.importFromAs(imp.java:1149)
	at org.python.core.imp.importFrom(imp.java:1124)
	at org.python.pycode._pyx2.f$0(/Users/basic/Documents/your_story1/your_story7/application.macosx/your_story7.app/Contents/Processing/source/your_story7.pyde:91)
	at org.python.pycode._pyx2.call_function(/Users/basic/Documents/your_story1/your_story7/application.macosx/your_story7.app/Contents/Processing/source/your_story7.pyde)
	at org.python.core.PyTableCode.call(PyTableCode.java:171)
	at org.python.core.PyCode.call(PyCode.java:18)
	at org.python.core.Py.runCode(Py.java:1614)
	at org.python.core.Py.exec(Py.java:1658)
	at org.python.util.PythonInterpreter.exec(PythonInterpreter.java:276)
	at jycessing.PAppletJythonDriver.processSketch(PAppletJythonDriver.java:230)
	at jycessing.PAppletJythonDriver.<init>(PAppletJythonDriver.java:409)
	at jycessing.Runner.runSketchBlocking(Runner.java:386)
	at jycessing.Runner.runSketchBlocking(Runner.java:280)
	at jycessing.Runner.main(Runner.java:185)

here is a link to the sketch and the application.

may i ask if you already exported any example sketch
and that worked well?

and what export options did you click?


if you have a problem with some code
and you want to share it,
please spend some time and cut it down to the problem
means make a MVCE
and not send us a 500MB download
with all this pictures ( where one might be enough for a test )
and all that code making this flickering screen what not fits on my monitor

possibly even that process,
cutting your project down to the line what causes the problem
helps you already to find or narrow down the error.

1 Like