Opened 3 years ago

Last modified 23 months ago

#18920 assigned defect infinite loop

Reported by: Chris Reynolds Owned by: dylan
Priority: blocker Milestone: 1.14
Component: DojoX Mobile Version: 1.11.0
Keywords: Cc:
Blocked By: Blocking:


It is possible for an infinite loop to occur in onComplete at the line (Carousel.js:285):

for(i = 0; i < nPages; i++){

due to nPages being Infinity.

This happens if the width of the carousel is less than the width specified for it's items. This can happen as the carousel resizes with the page, and the area for it is smaller than the width specified for items when creating the carousel.

The cause is this.numVisible being set to 0 in 'resize' due to this.itemWidth > this.domNode.offsetWidth the line:

var num = Math.floor(this.domNode.offsetWidth / this.itemWidth);

this.numVisible is used to calculate nPages making it Infinity in this case.

In Chrome (54) this causes it to max out CPU with continually growing memory use. The only way to stop it is to kill it in Task Manager. You cannot reload or navigate to a different page.

Change History (5)

comment:1 Changed 3 years ago by dylan

Milestone: tbd1.12
Priority: undecidedhigh

Not sure if we'll get this fixed for 1.12, but 1.12.1 and backported should be possible.

comment:2 Changed 3 years ago by dylan


comment:3 Changed 3 years ago by dylan


Moving 1.12.1 tickets to 1.12.2

comment:4 Changed 2 years ago by dylan

Owner: set to dylan
Priority: highblocker
Status: newassigned

comment:5 Changed 23 months ago by dylan

Note: See TracTickets for help on using tickets.