Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A fatal error has been detected by the Java Runtime Environment # Problematic frame: # C [jnius.cpython-38-x86_64-linux-gnu.so+0x12d74] __Pyx_PyObject_GetAttrStr+0x4 #611

Closed
Aashish07 opened this issue Nov 16, 2021 · 6 comments
Labels

Comments

@Aashish07
Copy link

No description provided.

@Aashish07 Aashish07 changed the title A fatal error has been detected by the Java Runtime Environment A fatal error has been detected by the Java Runtime Environment # Problematic frame: # C [jnius.cpython-38-x86_64-linux-gnu.so+0x12d74] __Pyx_PyObject_GetAttrStr+0x4 Nov 16, 2021
@Aashish07
Copy link
Author

Sometimes the system crashes and sometimes it doesn't.
I am copying the log trace file.
hs_err_pid3868.log

@cmacdonald
Copy link
Contributor

Top frame is:

j  org.jnius.NativeInvocationHandler.invoke0(Ljava/lang/Object;Ljava/lang/reflect/Method;[Ljava/lang/Object;)Ljava/lang/Object;+0

In my experience, this can ALWAYS be explained by passing a Python object into the Java, where its lifetime in Java exceeds that in Python. In this case, I see you have a thread; so probably the Thread is dealing with a Python object that has since been GC'd by Python. The trick is to hold a Python reference for the lifetime of the object in Java.

@cmacdonald
Copy link
Contributor

Did this hint help?

@Aashish07
Copy link
Author

this is working beneath the wrapper, which is not in control. This hint looks like a obvious explanation to the issue, but , its application is not in the scope.

@cmacdonald
Copy link
Contributor

cmacdonald commented Nov 22, 2021

I dont know which wrapper code to which you refer, but as a general usage of Jnius, it can be considered a bug in that wrapper if it lets a Python object go out of scope while the JVM holds a reference to its corresponding proxy object.

@github-actions
Copy link

👋 We use the issue tracker exclusively for bug reports and feature requests. However, this issue appears to be a support request. Please use our support channels to get help with the project.
Let us know if this comment was made in error, and we'll be happy to reopen the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants