Skip to content

bug(mat-slider): Out of memory with large value domain #26317

@ChristofferGersen

Description

@ChristofferGersen

Is this a regression?

  • Yes, this behavior used to work in the previous version

The previous version in which this bug was not present was

14.2.2

Description

Specifying a large value domain (min/max values far apart) in combination with a relatively small step size will cause an out of memory exception. This is caused by _tickMarks being updated, regardless of showTickMarks.

Reproduction

Steps to reproduce:

  1. Go to https://material.angular.io/components/slider/examples#slider-configurable
  2. Pick 2147483647 as max value (leave the rest at the default, so min value = 0, step size = 1 and show ticks = false)
  3. Browser hangs until the out of memory error shows up (Firefox only shows the error in the console)

Expected Behavior

Expect a large value domain to work, as long as showTickMarks remains false.

Actual Behavior

Get an out of memory error even with showTickMarks being false

Environment

  • Angular: 15.0.4
  • CDK/Material: 15.0.3
  • Browser(s): Chrome 108.0.5359.125, Edge 108.0.1462.54, Firefox 108.0.1
  • Operating System (e.g. Windows, macOS, Ubuntu): Windows 10 21H2

Metadata

Metadata

Assignees

Labels

P3An issue that is relevant to core functions, but does not impede progress. Important, but not urgentarea: material/slider

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions