Hi,
I was experimenting with the jpype wrapper on Windows and noticed that some of our tests (executed with pytest) failed:
Current thread 0x00000c10 (most recent call first):
[...] [A few more lines here in our own code which eventually point to the issue below] [...]
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\python.py", line 159 in pytest_pyfunc_call
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\python.py", line 1627 in runtest
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\runner.py", line 174 in pytest_runtest_call
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\runner.py", line 242 in <lambda>
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\runner.py", line 341 in from_call
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\runner.py", line 241 in call_and_report
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\runner.py", line 132 in runtestprotocol
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\runner.py", line 113 in pytest_runtest_protocol
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\main.py", line 362 in pytest_runtestloop
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\main.py", line 337 in _main
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\main.py", line 283 in wrap_session
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\main.py", line 330 in pytest_cmdline_main
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_callers.py", line 121 in _multicall
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_manager.py", line 120 in _hookexec
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\pluggy\_hooks.py", line 512 in __call__
File "C:\Logiciels\poetry\virtualenvs\utops-AOXWnQ9h-py3.12\Lib\site-packages\_pytest\config\__init__.py", line 175 in main
File "C:\Users\Cl\xe9ment MASSON\AppData\Local\Programs\PyCharm Community\plugins\python-ce\helpers\pycharm\_jb_pytest_runner.py", line 75 in <module>
Process finished with exit code -1073741819 (0xC0000005)
Weirdly, this doesn’t just make the test fail, it crashes pytest entirely: the tests is shown as Terminated
, and pytest stops.
I’m using orekit 13.1.0.0 with jpype 1.6.0, python 3.12, pytest 8.3.5 and the Java version included when the wrapper is installed with jdk4py
.
In the migration from the JCC to Jpype wrapper, I replaced usages of ArrayList.of_(TypeOfTheItems)
to ArrayList.of(TypeOfTheItems)
. This new syntax was the cause of the issue. Removing the of()
and only using ArrayList()
, with no type info, seems to solve the problem, and the type info is apparently not needed for jpype.
I’m leaving this here in case someone else runs into the same obscure issue !
Clément