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

Error when getting position of CircleShape #16

Open
Peterculazh opened this issue Nov 26, 2020 · 1 comment
Open

Error when getting position of CircleShape #16

Peterculazh opened this issue Nov 26, 2020 · 1 comment

Comments

@Peterculazh
Copy link

Hello, found this issue when I were playing with shapes and getting it position.
For start I were using b2::CircleShape::new without passing Vec2 and radius, which I thought was a problem of crash, but once I used new_with() with Vec2 and radius, nothing changes. I have feeling that problem with getting position of CircleShape itself.

Error: process didn't exit successfully: 'target\debug\examples\samples.exe' (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Example:

let test_circle_shape = b2::CircleShape::new_with(b2::Vec2{x: -3., y: 0.}, 3.0);
test_circle_shape.position();

You might run it and it will crash immediately.

@Bastacyclop
Copy link
Owner

I think that this might be an instance of #3, since CircleShape::position has signature pub fn position(&self) -> Vec2, returning a struct by value. Looking at your error message it seems like you are running on Windows? We could try to run this on Linux (where I expect it to work).

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

No branches or pull requests

2 participants