Skip to content

let Jvm live longer - #104

Merged
astonbitecode merged 1 commit into
astonbitecode:masterfrom
pickleburger:bugfix
May 13, 2024
Merged

astonbitecode merged 1 commit into
astonbitecode:masterfrom
pickleburger:bugfix

Conversation

@pickleburger

@pickleburger pickleburger commented May 10, 2024 •

Copy link
Copy Markdown
Contributor

Thanks for putting up a quick fix for sendable futures!

I tested it with my code base and found an issue with the implementation.

Basically, the result from Jvm::attach_thread() is discarded immediately after taking out the pointer, causing the thread to be detached and the error below to occur.

FATAL Error in native method: Using JNIEnv in non-java thread

Fixing this issue by creating a local variable to let Jvm live longer.

@astonbitecode

Copy link
Copy Markdown
Owner

Thanks!

@pickleburger
pickleburger deleted the bugfix branch May 13, 2024 17:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants