Skip to content

opening window crashes test suite #385

@aleferna12

Description

@aleferna12

Hello, I get a fatal runtime error: Rust cannot catch foreign exceptions, aborting error when running this test on macOS Sequoia:

#[cfg(test)]
mod tests {
    #[test]
    fn test_window() {
        let window = minifb::Window::new(
            "test",
            100,
            100,
            minifb::WindowOptions::default()
        );
        assert!(window.is_ok());
    }
}

Full log is:

fatal runtime error: Rust cannot catch foreign exceptions, aborting
error: test failed, to rerun pass `-p evo-cpm --lib`

Caused by:
  process didn't exit successfully: `/Applications/RustRover.app/Contents/bin/native-helper/intellij-rust-native-helper /Users/aleferna/RustProjects/Projects/evo-cpm/target/debug/deps/evo_cpm-29137b184258c675 --format=json -Z unstable-options --show-output` (exit status: 102)
note: test exited abnormally; to see the full output pass --nocapture to the harness.
error: 1 target failed:
    `-p evo-cpm --lib`

Using --nocapture or RUST_BACKTRACE=1 give the same result, no extra information is added.

Running the same tests on windows and linux works no problem.

Minifb does actually work on my macos system though, which is puzzling. Its just the unit test that crashes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions