Skip to content

Crash on exit with code 3221225477 #106

Description

@kenniskoldewyn

I've followed the installation instructions to the letter as per https://github.com/arrayfire/arrayfire-rust when installing on Windows 10 x64: installed the x86_64-pc-windows-msvc version of Rust 1.15.1, installed the ArrayFire binaries, set up the AF_PATH and PATH environment variables, and added arrayfire = "3.4.1" to my Cargo.toml file. Unfortunately, any attempt to use ArrayFile crashes on exit with code 3221225477. For example, if my code is:

extern crate arrayfire;
use arrayfire as af;
fn main() {
let dims = af::Dim4::new(&[3, 5, 1, 1]);
let a = af::randu::<f32>(dims);
af::print(&a);
}

Then executing produces the following output:

 Running `target\debug\example.exe`
[3 5 1 1]
0.3990 0.1386 0.3932 0.1587 0.7089
0.6720 0.7353 0.2706 0.8831 0.9434
0.5339 0.5160 0.9455 0.0621 0.1227
error: process didn't exit successfully: `target\debug\example.exe` (exit code: 3221225477)

I'm guessing that there's something strange about my environment. For example, I used to have Visual Studio Community 2015 installed, but I got rid of it when I started trying to use ArrayFire in Rust (with Emacs as IDE, not Visual Studio). Any ideas on how to track this weirdness down? Here's the full results of cargo run -vv in case that helps any:

c:\Users\kennis\Dropbox\Programming\Projects\example>cargo run -vv
Compiling rustc-serialize v0.3.22
Compiling semver v0.1.20
Compiling lazy_static v0.2.2
Compiling num-traits v0.1.36
Running `rustc --crate-name rustc_serialize C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\rustc-serialize-0.3.22\src\lib.rs --crate-type lib -g -C metadata=03b62901d97343ea -C extra-filename=-03b62901d97343ea --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps`
Running `rustc --crate-name semver C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\semver-0.1.20\src\lib.rs --crate-type lib -g -C metadata=dad6bdfe0e69f878 -C extra-filename=-dad6bdfe0e69f878 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps`
Running `rustc --crate-name lazy_static C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\lazy_static-0.2.2\src\lib.rs --crate-type lib -g -C metadata=13daae1d9a07c252 -C extra-filename=-13daae1d9a07c252 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps`
Running `rustc --crate-name num_traits C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-traits-0.1.36\src\lib.rs --crate-type lib -g -C metadata=ba977ae2944b0245 -C extra-filename=-ba977ae2944b0245 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps`
Compiling libc v0.2.20
Running `rustc --crate-name libc C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\libc-0.2.20\src\lib.rs --crate-type lib -g --cfg "feature=\"use_std\"" --cfg "feature=\"default\"" -C metadata=83c2bd88b43ecde3 -C extra-filename=-83c2bd88b43ecde3 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps`
Compiling rand v0.3.15
Running `rustc --crate-name rand C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\rand-0.3.15\src\lib.rs --crate-type lib -g -C metadata=26cfd8d095643d5f -C extra-filename=-26cfd8d095643d5f --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern libc=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\liblibc-83c2bd88b43ecde3.rlib`
warning: patterns aren't allowed in methods without bodies, #[warn(patterns_in_fns_without_body)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-traits-0.1.36\src\int.rs:277:18
|
Compiling rustc_version v0.1.7
277 Running `rustc --crate-name rustc_version C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\rustc_version-0.1.7\src\lib.rs --crate-type lib -g -C metadata=990a3fd610d67d6c -C extra-filename=-990a3fd610d67d6c --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern semver=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libsemver-dad6bdfe0e69f878.rlib`
| fn pow(self, mut exp: u32) -> Self;
| ^^^^^^^
|
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
= note: for more information, see issue #35203 <https://github.com/rust-lang/rust/issues/35203>
Compiling num-integer v0.1.32
Running `rustc --crate-name num_integer C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-integer-0.1.32\src\lib.rs --crate-type lib -g -C metadata=4c819e48d5fcce89 -C extra-filename=-4c819e48d5fcce89 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern num_traits=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_traits-ba977ae2944b0245.rlib`
Compiling num-iter v0.1.32
Running `rustc --crate-name num_iter C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-iter-0.1.32\src\lib.rs --crate-type lib -g -C metadata=a08cc27ee32e82a2 -C extra-filename=-a08cc27ee32e82a2 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern num_integer=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_integer-4c819e48d5fcce89.rlib --extern num_traits=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_traits-ba977ae2944b0245.rlib`
Compiling num-complex v0.1.35
Compiling arrayfire v3.4.1
Compiling num-bigint v0.1.35
Running `rustc --crate-name num_complex C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-complex-0.1.35\src\lib.rs --crate-type lib -g --cfg "feature=\"rustc-serialize\"" --cfg "feature=\"default\"" -C metadata=997460ed3f3b74aa -C extra-filename=-997460ed3f3b74aa --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern num_traits=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_traits-ba977ae2944b0245.rlib --extern rustc_serialize=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\librustc_serialize-03b62901d97343ea.rlib`
Running `rustc --crate-name build_script_build C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\build.rs --crate-type bin -g -C metadata=f9b9680006fb1743 -C extra-filename=-f9b9680006fb1743 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\build\arrayfire-f9b9680006fb1743 --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern rustc_serialize=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\librustc_serialize-03b62901d97343ea.rlib --extern rustc_version=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\librustc_version-990a3fd610d67d6c.rlib`
Running `rustc --crate-name num_bigint C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-bigint-0.1.35\src\lib.rs --crate-type lib -g --cfg "feature=\"rand\"" --cfg "feature=\"default\"" --cfg "feature=\"rustc-serialize\"" -C metadata=ab518bd16dd376c5 -C extra-filename=-ab518bd16dd376c5 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern rustc_serialize=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\librustc_serialize-03b62901d97343ea.rlib --extern num_integer=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_integer-4c819e48d5fcce89.rlib --extern num_traits=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_traits-ba977ae2944b0245.rlib --extern rand=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\librand-26cfd8d095643d5f.rlib`
Running `c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\build\arrayfire-f9b9680006fb1743\build-script-build`
cargo:rustc-link-lib=dylib=af
cargo:rustc-link-search=native=C:\Program Files\ArrayFire\v3\lib
cargo:rustc-cfg=op_assign
Compiling num-rational v0.1.35
Running `rustc --crate-name num_rational C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-rational-0.1.35\src\lib.rs --crate-type lib -g --cfg "feature=\"default\"" --cfg "feature=\"num-bigint\"" --cfg "feature=\"bigint\"" --cfg "feature=\"rustc-serialize\"" -C metadata=d0b5e68d571128ad -C extra-filename=-d0b5e68d571128ad --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern num_bigint=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_bigint-ab518bd16dd376c5.rlib --extern rustc_serialize=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\librustc_serialize-03b62901d97343ea.rlib --extern num_integer=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_integer-4c819e48d5fcce89.rlib --extern num_traits=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_traits-ba977ae2944b0245.rlib`
Compiling num v0.1.36
Running `rustc --crate-name num C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\num-0.1.36\src\lib.rs --crate-type lib -g --cfg "feature=\"complex\"" --cfg "feature=\"default\"" --cfg "feature=\"num-rational\"" --cfg "feature=\"rustc-serialize\"" --cfg "feature=\"bigint\"" --cfg "feature=\"num-bigint\"" --cfg "feature=\"num-complex\"" --cfg "feature=\"rational\"" -C metadata=8e9b9597520b1b0d -C extra-filename=-8e9b9597520b1b0d --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern num_rational=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_rational-d0b5e68d571128ad.rlib --extern num_iter=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_iter-a08cc27ee32e82a2.rlib --extern num_bigint=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_bigint-ab518bd16dd376c5.rlib --extern num_traits=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_traits-ba977ae2944b0245.rlib --extern num_integer=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_integer-4c819e48d5fcce89.rlib --extern num_complex=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum_complex-997460ed3f3b74aa.rlib`
Running `rustc --crate-name arrayfire C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src/lib.rs --crate-type lib -g -C metadata=1477eabfdf091f86 -C extra-filename=-1477eabfdf091f86 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern lazy_static=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\liblazy_static-13daae1d9a07c252.rlib --extern num=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libnum-8e9b9597520b1b0d.rlib --extern libc=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\liblibc-83c2bd88b43ecde3.rlib -L "native=C:\Program Files\ArrayFire\v3\lib" --cfg op_assign -l dylib=af`
warning: type alias is never used: `MutDouble`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\array.rs:11:1
|
11 | type MutDouble = *mut self::libc::c_double;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `MutUint`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\array.rs:12:1
|
12 | type MutUint = *mut self::libc::c_uint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `VoidPtr`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\array.rs:16:1
|
16 | type VoidPtr = self::libc::c_ulonglong;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `MutDouble`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\arith/mod.rs:17:1
|
17 | type MutDouble = *mut self::libc::c_double;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `MutUint`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\arith/mod.rs:18:1
|
18 | type MutUint = *mut self::libc::c_uint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `MutDouble`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\data/mod.rs:14:1
|
14 | type MutDouble = *mut self::libc::c_double;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `MutUint`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\data/mod.rs:15:1
|
15 | type MutUint = *mut self::libc::c_uint;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `AfArray`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\random/mod.rs:11:1
|
11 | type AfArray = self::libc::c_longlong;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
warning: type alias is never used: `Intl`, #[warn(dead_code)] on by default
--> C:\Users\kennis\.cargo\registry\src\github.com-1ecc6299db9ec823\arrayfire-3.4.1\src\random/mod.rs:15:1
|
15 | type Intl = self::libc::c_longlong;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Compiling example v0.1.0 (file:///C:/Users/kennis/Dropbox/Programming/Projects/example)
Running `rustc --crate-name example src\main.rs --crate-type bin -g -C metadata=7ec7f7ef32a23851 -C extra-filename=-7ec7f7ef32a23851 --out-dir c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --emit=dep-info,link -L dependency=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps --extern arrayfire=c:\Users\kennis\Dropbox\Programming\Projects\example\target\debug\deps\libarrayfire-1477eabfdf091f86.rlib -L "native=C:\Program Files\ArrayFire\v3\lib"`
Finished debug [unoptimized + debuginfo] target(s) in 37.31 secs
Running `target\debug\example.exe`
[3 5 1 1]
0.3990 0.1386 0.3932 0.1587 0.7089
0.6720 0.7353 0.2706 0.8831 0.9434
0.5339 0.5160 0.9455 0.0621 0.1227
error: process didn't exit successfully: `target\debug\example.exe` (exit code: 3221225477)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions