Possible infinite loop.... why?

Hi !

Why do i get this message, saying "javascript error, possible infinite loop at line 764" ?
Thank you

var index = getIndex(this)
var indexRep = [0,6,12,33,60,61,63,84,103,118,133,142,149,152,155,164,191,209,230,244,272,291,297,304,312,317]
var indexToutesPistes = Array(336).fill(0).map((el, i) => i).filter(i => !indexRep.includes(i))
  

  for(var i = 0 ; i < indexToutesPistes.length ; i++)   // this is line 764...
   {
     if (value == 1)
       {
       if (index == indexToutesPistes[i] && index < 128)		              { send('midi:SEL','/control',1,getIndex(this),1); }  
       if (index == indexToutesPistes[i] && index >= 128 && index < 256)	{ send('midi:SEL','/control',2,getIndex(this)-128,1); }  
       if (index == indexToutesPistes[i] && index >= 256)		              { send('midi:SEL','/control',3,getIndex(this)-256,1); }  
       
       locals.ActDesact = setInterval(function(){if(locals.Timer < 60) locals.Timer += 1 },10)
       console.log(locals.Timer)
       }
  
     if(value === 0 && index == indexToutesPistes[i])
	     { 
         clearInterval(locals.ActDesact) 
         
         if(locals.Timer == 60 && Piste_Active === 0)             // On va activer la piste
           { 
            setVar('parent','PisteActive'+index,index)                // On envoie le numéro d'index dans un array qui traduit l'activation des pistes (numéro indispensable, plutôt que 1 ou true)
            setVar('this','Couleur_Text_Active','rgba(0,250,250,1)')
           }
           
         else if(locals.Timer == 60 && Piste_Active == 1)        // On va désactiver la piste
           { 
            setVar('parent','PisteActive'+index,false)                 // On envoie false dans un array qui traduit l'activation des pistes
            setVar('this','Couleur_Text_Active','rgba(70,70,70,1)') 
           }
           
    	  send('midi:OSC','/control',1,55,127)
	      locals.Timer = 0
	     }
   }

Does it run forever if you add the line // no protect in your code ? If not it's just that it takes long to execute.

Ok, well, it seems to take too long... I'll try to set the code another way.

Thank you