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

it_always_has_the_normal_pointing_towards_the_first_body quickcheck failure #1

Open
arielb1 opened this issue Aug 21, 2017 · 4 comments

Comments

@arielb1
Copy link

arielb1 commented Aug 21, 2017

As a part of the cargobomb project, we have been testing your crate against both nightly and experimental versions of rustc. cargobomb is a project that runs experimental and nightly versions of the compiler against a large body of public rust code, in order to detect regressions and perform measurements.

During one of these tests with an experimental compiler, a quickcheck test in your code had failed. That could have been caused by a bug in the experimental compiler, but it also might be caused by a problem in your code. The test report is available here.

The test failure is as follows:

Aug 20 23:32:30.000 INFO blam! failures:
Aug 20 23:32:30.000 INFO blam! 
Aug 20 23:32:30.000 INFO blam! ---- collisions::detection::gjkepa::gjk_epa_detection::tests::detection_behaviour::it_always_has_the_normal_pointing_towards_the_first_body stdout ----
Aug 20 23:32:30.001 INFO blam! 	thread 'collisions::detection::gjkepa::gjk_epa_detection::tests::detection_behaviour::it_always_has_the_normal_pointing_towards_the_first_body' panicked at 'Expected the projected relative distance in the direction of the normal to always be positive, but got -0.40838882', src/collisions/detection/gjkepa/../../../../tests/collisions/detection/gjkepa/gjk_epa_detection_test.rs:1:0
Aug 20 23:32:30.001 INFO blam! note: Run with `RUST_BACKTRACE=1` for a backtrace.
Aug 20 23:32:30.001 INFO blam! thread 'collisions::detection::gjkepa::gjk_epa_detection::tests::detection_behaviour::it_always_has_the_normal_pointing_towards_the_first_body' panicked at '[quickcheck] TEST FAILED (runtime error). Arguments: (UnitVec3D(Vec3D { x: -0.08164979, y: 0.41588578, z: -0.905744 }), UnitQuat(Quat { r: -0.9998616, i: 0.00013082517, j: -0.012743562, k: 0.010695696 }))
Aug 20 23:32:30.001 INFO blam! Error: "Expected the projected relative distance in the direction of the normal to always be positive, but got -0.40838882"', /cargo-home/registry/src/github.com-1ecc6299db9ec823/quickcheck-0.4.1/src/tester.rs:147:27
@yggie
Copy link
Owner

yggie commented Aug 29, 2017

@arielb1 is this a consistent failure? if memory serves me right, this test has been known to cause failures from time to time. I have yet to find the time to address this problem, but if this test doesn’t fail consistently, it is unlikely to be related to the compiler but rather an unhandled edge case in my system.

@arielb1
Copy link
Author

arielb1 commented Aug 29, 2017

We did not attempt to run your program again.

This looks like a fuzzer failure - your program was run with the arguments UnitVec3D(Vec3D { x: -0.08164979, y: 0.41588578, z: -0.905744 }), UnitQuat(Quat { r: -0.9998616, i: 0.00013082517, j: -0.012743562, k: 0.010695696 }), and that caused the assertion failure. Can you try testing it?

@yggie
Copy link
Owner

yggie commented Aug 29, 2017

I managed to reproduce the issue on the latest stable Rust compiler:

failures:

---- collisions::detection::gjkepa::gjk_epa_detection::tests::detection_behaviour::it_always_has_the_normal_pointing_towards_the_first_body stdout ----
        thread 'collisions::detection::gjkepa::gjk_epa_detection::tests::detection_behaviour::it_always_has_the_normal_pointing_towards_the_first_body' panicked at 'Expected the projected relative distance in the direction of the normal to always be positive, but got -0.40838885', src/collisions/detection/gjkepa/../../../../tests/collisions/detection/gjkepa/gjk_epa_detection_test.rs:1
note: Run with `RUST_BACKTRACE=1` for a backtrace.


failures:
    collisions::detection::gjkepa::gjk_epa_detection::tests::detection_behaviour::it_always_has_the_normal_pointing_towards_the_first_body

The output closely matches the output in the issue, the discrepancy is likely due to floating point inaccuracies. So I would say yes, this is likely just an issue of a flaky test, nothing wrong with the compiler!

@arielb1
Copy link
Author

arielb1 commented Aug 29, 2017

OK. Then it's up to you to fix it (and meanwhile, we'll mark it so we won't get confused by it on the cargobomb blacklist).

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

No branches or pull requests

2 participants