Skip to content

Crashes on multiple monitors in Windows #156

@Czappi

Description

@Czappi

I tested with one monitor and worked.

stack backtrace:
   0: std::panicking::begin_panic_handler
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\std\src\panicking.rs:517
   1: core::panicking::panic_fmt
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\core\src\panicking.rs:100
   2: core::panicking::panic
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\/library\core\src\panicking.rs:50
   3: core::ops::arith::impl$9::add
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\ops\arith.rs:100
   4: nativeshell::shell::geometry::_Point<i32>::distance<i32>
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\geometry.rs:144
   5: nativeshell::shell::platform::platform_impl::display::impl$0::display_for_physical_point::closure$1::closure$0
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\display.rs:98
   6: core::ops::function::impls::impl$4::call_once<tuple$<ref$<ref$<nativeshell::shell::platform::platform_impl::display::Display> >,ref$<ref$<nativeshell::shell::platform::platform_impl::display::Display> > >,nativeshell::shell::platform::platform_impl::displ
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\ops\function.rs:280
   7: core::cmp::min_by<ref$<nativeshell::shell::platform::platform_impl::display::Display>,ref_mut$<nativeshell::shell::platform::platform_impl::display::impl$0::display_for_physical_point::closure$1::closure$0> >
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\cmp.rs:1145
   8: core::iter::traits::iterator::Iterator::min_by::fold::closure$0<ref$<nativeshell::shell::platform::platform_impl::display::Display>,nativeshell::shell::platform::platform_impl::display::impl$0::display_for_physical_point::closure$1::closure$0>
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\iter\traits\iterator.rs:2788
   9: core::iter::traits::iterator::Iterator::fold<core::slice::iter::Iter<nativeshell::shell::platform::platform_impl::display::Display>,ref$<nativeshell::shell::platform::platform_impl::display::Display>,core::iter::traits::iterator::Iterator::min_by::fold::c
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\iter\traits\iterator.rs:2171
  10: core::iter::traits::iterator::Iterator::reduce<core::slice::iter::Iter<nativeshell::shell::platform::platform_impl::display::Display>,core::iter::traits::iterator::Iterator::min_by::fold::closure$0>
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\iter\traits\iterator.rs:2216
  11: core::iter::traits::iterator::Iterator::min_by<core::slice::iter::Iter<nativeshell::shell::platform::platform_impl::display::Display>,nativeshell::shell::platform::platform_impl::display::impl$0::display_for_physical_point::closure$1::closure$0>
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\iter\traits\iterator.rs:2791
  12: nativeshell::shell::platform::platform_impl::display::impl$0::display_for_physical_point::closure$1
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\display.rs:94
  13: enum$<core::option::Option<ref$<nativeshell::shell::platform::platform_impl::display::Display> >, 1, 18446744073709551615, Some>::or_else<ref$<nativeshell::shell::platform::platform_impl::display::Display>,nativeshell::shell::platform::platform_impl::disp
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\option.rs:1149
  14: nativeshell::shell::platform::platform_impl::display::Displays::display_for_physical_point
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\display.rs:90
  15: nativeshell::shell::platform::platform_impl::display::Displays::convert_physical_to_logical
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\display.rs:120
  16: nativeshell::shell::platform::platform_impl::window_base::WindowBaseState::to_logical
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\window_base.rs:400
  17: nativeshell::shell::platform::platform_impl::window_base::WindowBaseState::get_frame_rect
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\window_base.rs:291
  18: nativeshell::shell::platform::platform_impl::window_base::WindowBaseState::adjust_window_position
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\window_base.rs:324
  19: nativeshell::shell::platform::platform_impl::window_base::WindowBaseState::handle_message
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\window_base.rs:664
  20: nativeshell::shell::platform::platform_impl::window::PlatformWindow::handle_message
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\window.rs:640
  21: nativeshell::shell::platform::platform_impl::window::impl$1::wnd_proc
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\window.rs:176
  22: nativeshell::shell::platform::platform_impl::window_adapter::wnd_proc
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\window_adapter.rs:179
  23: CallWindowProcW
  24: EnumChildWindows
  25: SetTimer
  26: KiUserCallbackDispatcher
  27: NtUserGetMessage
  28: GetMessageW
  29: windows::Windows::Win32::UI::WindowsAndMessaging::GetMessageW<windows::Windows::Win32::Foundation::HWND>
             at C:\Users\SkyGh\.cargo\registry\src\github.com-1ecc6299db9ec823\windows-0.28.0\src\Windows\Win32\UI\WindowsAndMessaging\mod.rs:4228
  30: nativeshell::shell::platform::platform_impl::run_loop::State::run
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\run_loop.rs:164
  31: nativeshell::shell::platform::platform_impl::run_loop::PlatformRunLoop::run
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\platform\win32\run_loop.rs:240
  32: nativeshell::shell::run_loop::RunLoop::run
             at C:\Users\SkyGh\Desktop\nativeshell-main\nativeshell\src\shell\run_loop.rs:59
  33: build_test1::main
             at .\src\main.rs:28
  34: core::ops::function::FnOnce::call_once<void (*)(),tuple$<> >
             at /rustc/f1edd0429582dd29cccacaf50fd134b05593bd9c\library\core\src\ops\function.rs:227

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