Closed Folcon closed 1 year ago
It may be a code path that I never really tested. Would you be able to share a sample repo? it would help me a lot to be able to just run some code and see what's going on. Thanks!
Didn't you also have an issue with rotation here?
Are you using our fork of jbox2d?
lambdaisland/jbox2d-library {:mvn/version "2.3.1.756"}
Didn't you also have an issue with rotation here?
This turned out to be more me not using the :density
, :friction
, :restitution
numbers correctly, so I removed that part from the issue, my bad 😊...
Are you using our fork of jbox2d?
lambdaisland/jbox2d-library {:mvn/version "2.3.1.756"}
As far as I can tell I am using that? At least
lein deps :tree
says so =)...It may be a code path that I never really tested. Would you be able to share a sample repo? it would help me a lot to be able to just run some code and see what's going on. Thanks!
I've created a branch here, I've reproed the issue running on corretto-19
, but from my reading this is related to changes in access to reflection/isolation changes and likely will be an issue with any "newer" JDK.
Ok as I suspected this was simply an untested code path, I hadn't used the 2-arity version of the circle constructor. Apparently the m_p
vector is final, so you have to mutate the vector itself, rather than re-assigning it.
I cut a release from main
, which also contains some other changes that hadn't been released yet.
[com.lambdaisland/cljbox2d "0.7.43"]
{com.lambdaisland/cljbox2d {:mvn/version "0.7.43"}}
I ran through all the demos, and your repro, and they run find on Java 11 (which is post-jigsaw, so any issues with the module system should already be apparent.)
The error message you got about modules being inaccessible was a red herring, the real issue is we're trying to mutate a final field.
public class CircleShape extends Shape {
public final Vec2 m_p;
...
}
Please give this a whirl and let me know how it goes. If you make something halfway cool then you are very much encouraged to submit it to the demos.
Thanks for trying cljbox2d.
So I've been using this lib and following on with a series of tutorials by coding train and I'm seeing some odd behaviour + some minor issues. I thought it might be worthwhile documenting them here for the moment.
If they're in scope as things to fix to improve the library and need new issues focused on them to be opened for traceability / reproduction steps, happy to help and write up.
This occurred when I tried creating:
This occurred when I tried creating:
I'm trying to figure out a workaround for these and there is some information available however, getting the correct module name for
org.jbox2d.dynamics.joints.DistanceJointDef
is like pulling teeth...""
, does not appear to be acceptable with many variants of:Trying to filter the module layer does not seem to work either:
I'll add more here as I find issues.