ladybird icon indicating copy to clipboard operation
ladybird copied to clipboard

Web page crash when zoom

Open SINF-KEN opened this issue 10 months ago • 6 comments

Summary

when you load fr.wikipedia.org in lb and zoom ( cmd + ) it crashes at +250% zoom ( apparently on linux its 300% maybe scaling )

or apple.com works at 180% crashes at 190% or amd.com works at 190 crashes at 200% or linuxfoundation.org works at 190 crashes at 200%

idk why it crashes

Operating system

macOS ( my system ) / the bug also works on linux

Steps to reproduce

  1. go to fr.wikipedia.org ( the main page )
  2. zoom to +250%
  3. crash

Expected behavior

should not crash

Actual behavior

Image

URL for a reduced test case

https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Accueil_principal

HTML/SVG/etc. source for a reduced test case

N/A

Log output and (if possible) backtrace

ninja: Entering directory `/Users/computer/ladybird/Build/release'
[0/2] Re-checking globbed directories...
ninja: no work to do.
Ladybird PID file '/Users/computer/Library/Application Support/Ladybird.pid' exists with PID 57328, but process cannot be found
2025-03-17 20:50:50.372 Ladybird[57677:1340125] +[IMKClient subclass]: chose IMKClient_Modern
2025-03-17 20:50:50.430 Ladybird[57677:1340125] +[IMKInputSession subclass]: chose IMKInputSession_Modern
103974.535 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.536 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.536 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.537 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.538 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.539 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.539 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.539 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.539 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.539 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.540 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.540 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.540 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.540 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.540 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.540 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103974.540 WebContent(57681): FIXME: HTMLImageElement.decoding = 'async' is not implemented yet
103975.109 WebContent(57681): (js warn) "This page is using the deprecated ResourceLoader module "mediawiki.Uri".\n[1.43] Please use browser native URL."
103975.289 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.290 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.290 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.290 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.290 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.291 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.291 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.291 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.292 WebContent(57681): FIXME: Implement HTMLElement::access_key_label()
103975.394 WebContent(57681): (js log) "Exception in module-execute in module ext.centralNotice.startUp:"
103975.394 WebContent(57681): (js warn) [Error] Bad constructor arguments
103983.635 WebContent(57681): FIXME: InlineFormattingContext::dimension_box_on_line got unexpected box in inline context:
103983.635 WebContent(57681): BlockContainer <figure.mw-halign-right> at (528.1875,2187.96875) content-size 86x111 [8+0+0 86 0+0+0] [0+0+0 111 0+0+8] children: inline
  InlineNode <a.mw-file-description> [0+0+0 86 0+0+0] [0+0+0 111 0+0+0]
    frag 0 from ImageBox start: 0, length: 0, rect: [528.1875,2187.96875 86x111] baseline: 59.65625
    ImageBox <img.mw-file-element> at (528.1875,2187.96875) content-size 86x111 [0+0+0 86 0+0+0] [0+0+0 111 0+0+0] children: not-inline

VERIFICATION FAILED: i < m_size at /Users/computer/ladybird/AK/Vector.h:139
0   liblagom-ak.0.0.0.dylib             0x00000001015920f8 ak_trap + 56
1   liblagom-ak.0.0.0.dylib             0x0000000101592400 ak_assertion_failed + 0
2   liblagom-web.0.0.0.dylib            0x00000001034f6ab4 Web::Layout::LayoutState::commit(Web::Layout::Box&) + 3336
3   liblagom-web.0.0.0.dylib            0x00000001031d5520 Web::DOM::Document::update_layout(Web::DOM::UpdateLayoutReason) + 1260
4   liblagom-web.0.0.0.dylib            0x000000010332e7d8 Web::HTML::EventLoop::update_the_rendering() + 652
5   liblagom-web.0.0.0.dylib            0x0000000102fc51b0 AK::Function<void ()>::operator()() const + 76
6   liblagom-web.0.0.0.dylib            0x000000010332d880 Web::HTML::EventLoop::process() + 84
7   liblagom-web.0.0.0.dylib            0x0000000102fc51b0 AK::Function<void ()>::operator()() const + 76
8   liblagom-core.0.0.0.dylib           0x000000010136d718 AK::Function<void ()>::operator()() const + 76
9   liblagom-core.0.0.0.dylib           0x000000010136cb48 Core::EventReceiver::dispatch_event(Core::Event&, Core::EventReceiver*) + 132
10  liblagom-core.0.0.0.dylib           0x000000010137a188 Core::ThreadEventQueue::process() + 404
11  liblagom-core.0.0.0.dylib           0x0000000101382214 Core::EventLoopImplementationUnix::exec() + 44
12  liblagom-core.0.0.0.dylib           0x000000010136a704 Core::EventLoop::exec() + 72
13  WebContent                          0x0000000100bceb78 serenity_main(Main::Arguments) + 4484
14  WebContent                          0x0000000100c8721c main + 196
15  dyld                                0x0000000189274274 start + 2840
103983.641 Ladybird(57677): WebContent process crashed! Last page loaded: https://fr.wikipedia.org/wiki/Wikip%C3%A9dia:Accueil_principal
103983.641 Ladybird(57677): Consider raising an issue at https://github.com/LadybirdBrowser/ladybird/issues/new/choose

Screenshots or screen recordings

No response

Build flags or config settings

No response

Contribute a patch?

  • [ ] I’ll contribute a patch for this myself.

SINF-KEN avatar Mar 17 '25 20:03 SINF-KEN

the same issue affects apple.com

SINF-KEN avatar Mar 17 '25 21:03 SINF-KEN

the same issue affects amd.com

SINF-KEN avatar Mar 17 '25 21:03 SINF-KEN

the same issue affects linuxfoundation.org

SINF-KEN avatar Mar 17 '25 21:03 SINF-KEN

It crashes consistently at 230% for me (linux).

manuel-za avatar Mar 19 '25 13:03 manuel-za

It crashes consistently at 230% for me (linux).

Welcome to the hell that is touching AK/Variant.h i think maybe scaling or SVG related but this is way above my paygrade for the moment

SINF-KEN avatar Mar 19 '25 13:03 SINF-KEN

Analysis:

  • Clash between static and responsive float CSS directives.
  • The responsive size dictates the zoom level where it crashes.
  • Appears to need an img element. (I tried with span and div no joy.)
Reduced example
<!doctype html>
  <head>
    <style>
      .right {
        float: right;
      }
      @media max-width: 1024px {
        .none {
          float: none;
        }
      }
    </style>
  </head>
  <body class="none right">
      <img src="data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg'><circle style='fill:red' cx='20' cy='20' r='20'/></svg>"/>
  </body>
</html>

manuel-za avatar Mar 24 '25 20:03 manuel-za