arcnmx / ddc-hi-rs

DDC/CI high level crate
MIT License
23 stars 8 forks source link

`Display::enumerate` crashes on Windows in release mode #10

Closed fenhl closed 1 month ago

fenhl commented 4 months ago

Cargo.toml:

[package]
name = "ddc-hi-min"
edition = "2021"

[dependencies]
ddc-hi = { git = "https://github.com/arcnmx/ddc-hi-rs", rev = "646398ff31de85fd40df639f281d89d0e30f3fc8" }

main.rs:

fn main() {
    ddc_hi::Display::enumerate();
}

Command to reproduce:

cargo run --release

Output:

   Compiling ddc-hi v0.5.0 (https://github.com/arcnmx/ddc-hi-rs?rev=646398ff31de85fd40df639f281d89d0e30f3fc8#646398ff)
   Compiling ddc-hi-min v0.0.0 (C:\Users\fenhl\git\fenhl.net\night\min)
    Finished `release` profile [optimized] target(s) in 0.94s
warning: the following packages contain code that will be rejected by a future version of Rust: nom v3.2.1
note: to see what the problems were, use the option `--future-incompat-report`, or run `cargo report future-incompatibilities --id 1`
     Running `target\release\ddc-hi-min.exe`
error: process didn't exit successfully: `target\release\ddc-hi-min.exe` (exit code: 0xc000041d)
fenhl commented 3 months ago

Did some more digging and it turns out the cause of this has already been reported as https://github.com/arcnmx/ddc-winapi-rs/issues/7

fenhl commented 1 month ago

Updating ddc-winapi to version 0.2.2 fixes this.