Skip to content

DCHECK in autofill relating to zero-sized windows on macOS #26667

Closed

Description

@nornagon

Version: 6932e02
OS: macOS

No repro unfortunately, observed running Slack under a debug build of Electron.

[29366:1123/155917.793910:FATAL:native_widget_ns_window_bridge.mm(499)] Check failed: !clamped_content_size.IsEmpty(). Zero-sized windows not supported on Mac
0   Electron Framework                  0x0000000120a74569 base::debug::CollectStackTrace(void**, unsigned long) + 9
1   Electron Framework                  0x00000001206fc9f3 base::debug::StackTrace::StackTrace() + 19
2   Electron Framework                  0x000000012076cd0a logging::LogMessage::~LogMessage() + 1146
3   Electron Framework                  0x000000012076fa6e logging::LogMessage::~LogMessage() + 14
4   Electron Framework                  0x0000000128d8b21f remote_cocoa::NativeWidgetNSWindowBridge::SetBounds(gfx::Rect const&, gfx::Size const&) + 799
5   Electron Framework                  0x00000001348ef62a views::NativeWidgetMacNSWindowHost::SetBoundsInScreen(gfx::Rect const&) + 794
6   Electron Framework                  0x0000000134923cd1 views::NativeWidgetMac::SetBounds(gfx::Rect const&) + 289
7   Electron Framework                  0x000000010fb72e49 electron::AutofillPopupView::Show() + 1401
8   Electron Framework                  0x000000010f8e45f8 electron::AutofillPopup::CreateView(content::RenderFrameHost*, content::RenderFrameHost*, bool, views::View*, gfx::RectF const&) + 1336
9   Electron Framework                  0x000000010f7a376c electron::AutofillDriver::ShowAutofillPopup(gfx::RectF const&, std::__1::vector<std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> >, std::__1::allocator<std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > > > const&, std::__1::vector<std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> >, std::__1::allocator<std::__1::basic_string<unsigned short, base::string16_internals::string16_char_traits, std::__1::allocator<unsigned short> > > > const&) + 1244
10  Electron Framework                  0x000000011e85c519 electron::mojom::ElectronAutofillDriverStubDispatch::Accept(electron::mojom::ElectronAutofillDriver*, mojo::Message*) + 1577
[...]

Activity

  1. twitharshil commented on Feb 4, 2022

    @twitharshil
    Contributor

    Hey @nornagon
    I also went into the same where a Dcheck is stopping me to create zero-sized invisible windows

    new BrowserWindow ({ width: 0, height: 0, show: false})

    I have opened a CL with chromium to get their point of view on this issue. Ref

  2. avidrissman commented on Feb 4, 2022

    @avidrissman

    Hi from the Chrome Mac team, and from the individual who added the prohibition of empty windows many years ago.

    When we added that DCHECK we did have to go through Chromium code and make sure that no windows were created empty. In many cases, just creating the window as a 1×1 window rather than as an empty one was sufficient. For the electron::AutofillDriver::ShowAutofillPopup case, that’s what I’d recommend.

    For the BrowserWindow construction case, I would extend the input value validation to reject empty windows. If your underlying platform doesn’t allow for empty windows, you should reject such values rather than just pass those values to the underlying platform and crash.

  3. github-actions commented on Oct 6, 2022

    @github-actions
    Contributor

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

  4. github-actions commented on Jan 23, 2023

    @github-actions
    Contributor

    This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions