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

jme3-core: make PrimitiveAllocator default #1915

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

Ali-RS
Copy link
Member

@Ali-RS Ali-RS commented Jan 15, 2023

The ReflectionAllocator uses unsafe and needs to add special flags to work on java 11+ ("--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED", "--add-exports=java.base/sun.nio.ch=ALL-UNNAMED"). It might break again in the future.

Related forum post:
https://hub.jmonkeyengine.org/t/deprecating-reflectionallocator/46350

Related issue: #1674

…ses unsafe and needs to add special flags to work on java 11+ ("--add-opens=java.base/jdk.internal.ref=ALL-UNNAMED", "--add-exports=java.base/sun.nio.ch=ALL-UNNAMED"). It might break again in the future.
@Ali-RS Ali-RS marked this pull request as draft January 15, 2023 08:00
@theMinka
Copy link
Contributor

How is the status of this pull request? We have faced the same issues in our game and looking forward for your fix. :)

@Ali-RS
Copy link
Member Author

Ali-RS commented Jul 20, 2023

Hi,

I am not sure when/if this would be merged but you can switch it to the primitive allocator by passing a system property:

-Dcom.jme3.BufferAllocatorImplementation=com.jme3.util.PrimitiveAllocator

by the way, if you use jme3-lwjgl3, you do not need to do this as lwjgl3 has its own allocator.

@theMinka
Copy link
Contributor

Oh, I wasn't aware of the lwjgl3 option. I switched our projet to it and everything was working as before, just without the Error from the ReflectionAllocator. Thank you for this nice little hint. :D

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