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

Deserializing minimum value numbers leads to error #185

Open
carbotaniuman opened this issue Jun 23, 2020 · 0 comments
Open

Deserializing minimum value numbers leads to error #185

carbotaniuman opened this issue Jun 23, 2020 · 0 comments

Comments

@carbotaniuman
Copy link

    Finished dev [unoptimized + debuginfo] target(s) in 1.51s
     Running `target\debug\vision_manager.exe`
thread 'main' panicked at 'attempt to negate with overflow', C:\Users\quydx\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\json-0.12.4\src\number.rs:495:1
stack backtrace:
   0: backtrace::backtrace::trace_unsynchronized
             at C:\Users\VssAdministrator\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\backtrace-0.3.46\src\backtrace\mod.rs:66
   1: std::sys_common::backtrace::_print_fmt
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\sys_common\backtrace.rs:78
   2: std::sys_common::backtrace::_print::{{impl}}::fmt
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\sys_common\backtrace.rs:59
   3: core::fmt::write
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libcore\fmt\mod.rs:1076
   4: std::io::Write::write_fmt<std::sys::windows::stdio::Stderr>
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\io\mod.rs:1537
   5: std::sys_common::backtrace::_print
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\sys_common\backtrace.rs:62
   6: std::sys_common::backtrace::print
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\sys_common\backtrace.rs:49
   7: std::panicking::default_hook::{{closure}}
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\panicking.rs:198
   8: std::panicking::default_hook
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\panicking.rs:218
   9: std::panicking::rust_panic_with_hook
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\panicking.rs:477
  10: std::panicking::begin_panic_handler
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\panicking.rs:385
  11: core::panicking::panic_fmt
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libcore\panicking.rs:86
  12: core::panicking::panic
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libcore\panicking.rs:51
  13: json::number::{{impl}}::from
             at C:\Users\quydx\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\json-0.12.4\src\number.rs:443
  14: core::convert::{{impl}}::into<i32,json::number::Number>
             at C:\Users\quydx\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libcore\convert\mod.rs:559
  15: json::value::implements::{{impl}}::from
             at C:\Users\quydx\.cargo\registry\src\github.aaakk.us.kg-1ecc6299db9ec823\json-0.12.4\src\value\implements.rs:46
  16: core::convert::{{impl}}::into<i32,json::value::JsonValue>
             at C:\Users\quydx\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libcore\convert\mod.rs:559
  17: vision_traits::editable::{{impl}}::schema
             at C:\Users\quydx\Documents\Code\vision_traits\src\editable.rs:18
  18: modules::opencv::camera_input::{{impl}}::schema
             at .\modules\src\opencv\camera_input.rs:8
  19: vision_traits::{{impl}}::get_schema<modules::opencv::camera_input::CameraInput>
             at C:\Users\quydx\Documents\Code\vision_traits\src\lib.rs:95
  20: vision_manager::manager::Manager::register<modules::opencv::camera_input::CameraInput>
             at .\src\manager.rs:31
  21: vision_manager::main
             at .\src\main.rs:20
  22: std::rt::lang_start::{{closure}}<()>
             at C:\Users\quydx\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libstd\rt.rs:67
  23: std::rt::lang_start_internal::{{closure}}
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\rt.rs:52
  24: std::panicking::try::do_call
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\panicking.rs:297
  25: std::panicking::try
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\panicking.rs:274
  26: std::panic::catch_unwind
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\panic.rs:394
  27: std::rt::lang_start_internal
             at /rustc/feb3536eba10c2e4585d066629598f03d5ddc7c6\/src\libstd\rt.rs:51
  28: std::rt::lang_start<()>
             at C:\Users\quydx\.rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib\rustlib\src\rust\src\libstd\rt.rs:67
  29: main
  30: invoke_main
             at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:78
  31: __scrt_common_main_seh
             at d:\agent\_work\3\s\src\vctools\crt\vcstartup\src\startup\exe_common.inl:288
  32: BaseThreadInitThunk
  33: RtlUserThreadStart

I am trying to convert a number to a JsonValue. Largest datatype is i32, which should fit comfortably in an f64.

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

1 participant