Closed uucly closed 3 years ago
Hi,
if i run the following code
let options = ops::ThumbnailImageOptions { height: 600, ..ops::ThumbnailImageOptions::default() };
let resized_image = ops::thumbnail_image_with_opts(&new_image, 1200,&options).expect("");
even if i just create an
let options = ops::ThumbnailImageOptions::default()
i get an
stack backtrace: 0: 0x10fb3029c - std::backtrace_rs::backtrace::libunwind::trace::hd4e4f36eb9f0f866 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5 1: 0x10fb3029c - std::backtrace_rs::backtrace::trace_unsynchronized::h713e8299cd20066f at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x10fb3029c - std::sys_common::backtrace::_print_fmt::h10db128357fb183a at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:67:5 3: 0x10fb3029c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha6f5ddd5259d3e16 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:46:22 4: 0x10fb42fad - core::fmt::write::hefe95a44532fe6ed at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/fmt/mod.rs:1078:17 5: 0x10fb2e3c6 - std::io::Write::write_fmt::hf513c99961415bff at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/io/mod.rs:1519:15 6: 0x10fb31ec9 - std::sys_common::backtrace::_print::he8e57200c2a0a691 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:49:5 7: 0x10fb31ec9 - std::sys_common::backtrace::print::hab21ea437dd3480e at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:36:9 8: 0x10fb31ec9 - std::panicking::default_hook::{{closure}}::h70a3a940826edea5 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:208:50 9: 0x10fb31a59 - std::panicking::default_hook::h9520f36dd50be056 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:225:9 10: 0x10fb3254b - std::panicking::rust_panic_with_hook::h102f8bee4e0ef4c7 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:591:17 11: 0x10fb32075 - std::panicking::begin_panic_handler::{{closure}}::hb72eee9aad2e147c at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:497:13 12: 0x10fb30758 - std::sys_common::backtrace::__rust_end_short_backtrace::h372ff87ecb2667f3 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:141:18 13: 0x10fb31fda - rust_begin_unwind at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:493:5 14: 0x10fb4878f - core::panicking::panic_fmt::h261fd45d36f74dfa at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/panicking.rs:92:14 15: 0x10fb48695 - core::option::expect_none_failed::hf2a36714418ff407 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/option.rs:1268:5 16: 0x10fb0cf02 - core::result::Result<T,E>::expect::h3b25c5c22e7faa0a at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:933:23 17: 0x10fb0cd8c - image_scaler_rust::main::h7be8ddb99663c41b at /Users/../private_project/image-scaler-rust/src/main.rs:75:25 18: 0x10fb0cf6e - core::ops::function::FnOnce::call_once::h7cc2d67b840e39d4 at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5 19: 0x10fb0ce71 - std::sys_common::backtrace::__rust_begin_short_backtrace::h91e221f83582994e at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125:18 20: 0x10fb0cc44 - std::rt::lang_start::{{closure}}::h03b3e5dc117dc421 at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:66:18 21: 0x10fb328c4 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h4ab201f754b12ec0 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/ops/function.rs:259:13 22: 0x10fb328c4 - std::panicking::try::do_call::h2d40bab4a9c2dc4b at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:379:40 23: 0x10fb328c4 - std::panicking::try::hedf52334a975e681 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:343:19 24: 0x10fb328c4 - std::panic::catch_unwind::hb38d8390232c8f25 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panic.rs:396:14 25: 0x10fb328c4 - std::rt::lang_start_internal::hebea83fb59fe572e at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/rt.rs:51:25 26: 0x10fb0cc21 - std::rt::lang_start::ha49e5215e73c4ec7 at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:65:5 27: 0x10fb0ce52 - _main
Am i doing something wrong or is there a bug?
Thanks for your support Sven
Can you post the full code that you're trying?
You could print the error buffer as well to check what went wrong.
Hi,
if i run the following code
let options = ops::ThumbnailImageOptions { height: 600, ..ops::ThumbnailImageOptions::default() };
let resized_image = ops::thumbnail_image_with_opts(&new_image, 1200,&options).expect("");
even if i just create an
let options = ops::ThumbnailImageOptions::default()
i get an
stack backtrace: 0: 0x10fb3029c - std::backtrace_rs::backtrace::libunwind::trace::hd4e4f36eb9f0f866 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5 1: 0x10fb3029c - std::backtrace_rs::backtrace::trace_unsynchronized::h713e8299cd20066f at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5 2: 0x10fb3029c - std::sys_common::backtrace::_print_fmt::h10db128357fb183a at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:67:5 3: 0x10fb3029c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::ha6f5ddd5259d3e16 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:46:22 4: 0x10fb42fad - core::fmt::write::hefe95a44532fe6ed at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/fmt/mod.rs:1078:17 5: 0x10fb2e3c6 - std::io::Write::write_fmt::hf513c99961415bff at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/io/mod.rs:1519:15 6: 0x10fb31ec9 - std::sys_common::backtrace::_print::he8e57200c2a0a691 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:49:5 7: 0x10fb31ec9 - std::sys_common::backtrace::print::hab21ea437dd3480e at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:36:9 8: 0x10fb31ec9 - std::panicking::default_hook::{{closure}}::h70a3a940826edea5 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:208:50 9: 0x10fb31a59 - std::panicking::default_hook::h9520f36dd50be056 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:225:9 10: 0x10fb3254b - std::panicking::rust_panic_with_hook::h102f8bee4e0ef4c7 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:591:17 11: 0x10fb32075 - std::panicking::begin_panic_handler::{{closure}}::hb72eee9aad2e147c at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:497:13 12: 0x10fb30758 - std::sys_common::backtrace::__rust_end_short_backtrace::h372ff87ecb2667f3 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/sys_common/backtrace.rs:141:18 13: 0x10fb31fda - rust_begin_unwind at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:493:5 14: 0x10fb4878f - core::panicking::panic_fmt::h261fd45d36f74dfa at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/panicking.rs:92:14 15: 0x10fb48695 - core::option::expect_none_failed::hf2a36714418ff407 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/option.rs:1268:5 16: 0x10fb0cf02 - core::result::Result<T,E>::expect::h3b25c5c22e7faa0a at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/result.rs:933:23 17: 0x10fb0cd8c - image_scaler_rust::main::h7be8ddb99663c41b at /Users/../private_project/image-scaler-rust/src/main.rs:75:25 18: 0x10fb0cf6e - core::ops::function::FnOnce::call_once::h7cc2d67b840e39d4 at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/core/src/ops/function.rs:227:5 19: 0x10fb0ce71 - std::sys_common::backtrace::__rust_begin_short_backtrace::h91e221f83582994e at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:125:18 20: 0x10fb0cc44 - std::rt::lang_start::{{closure}}::h03b3e5dc117dc421 at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:66:18 21: 0x10fb328c4 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h4ab201f754b12ec0 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/core/src/ops/function.rs:259:13 22: 0x10fb328c4 - std::panicking::try::do_call::h2d40bab4a9c2dc4b at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:379:40 23: 0x10fb328c4 - std::panicking::try::hedf52334a975e681 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panicking.rs:343:19 24: 0x10fb328c4 - std::panic::catch_unwind::hb38d8390232c8f25 at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/panic.rs:396:14 25: 0x10fb328c4 - std::rt::lang_start_internal::hebea83fb59fe572e at /rustc/0b644e419681835bd0f5871c3bfbd648aa04f157/library/std/src/rt.rs:51:25 26: 0x10fb0cc21 - std::rt::lang_start::ha49e5215e73c4ec7 at /Users/../.rustup/toolchains/nightly-x86_64-apple-darwin/lib/rustlib/src/rust/library/std/src/rt.rs:65:5 27: 0x10fb0ce52 - _main
Am i doing something wrong or is there a bug?
Thanks for your support Sven