Skip to content

Flexbox: thread 'LayoutWorker worker 3/3' panicked at 'attempted to divide by zero' #7316

Closed

Description

@paulrouget
<style>
  div {
    display: flex;
    flex-grow: 1;
  }
</style>

<div>
  <div>
  </div>
</div>
thread 'LayoutWorker worker 3/3' panicked at 'attempted to divide by zero', /components/util/geometry.rs:169

Activity

  1. added
    I-panic
    on Aug 22, 2015
  2. paulrouget commented on Aug 22, 2015

    @paulrouget
    ContributorAuthor

    In components/layout/flex.rs, in inline_mode_assign_inline_sizes, I see:

    let even_content_inline_size = content_inline_size / ImmutableFlowUtils::child_count(self as &Flow) as i32;

    Which I guess is the issue. Adding a child to the empty div doesn't crash.

  3. added 2 commits that reference this issue on Aug 24, 2015
    ad34d48
    524b02d
  4. added a commit that references this issue on Aug 26, 2015
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

    A-layout/flexI-panic

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions