title: Why my HMI is rebooting while entering the foreach loop in program ? C#
body: <pre><code>void Button3_Click(System.Object sender, System.EventArgs e)
      {
          try  
          {  
              string path = (@"Hard Disk\POINTS.txt"); 
              StreamReader sr = new StreamReader(path); 
              int k = 0;
              string[] chartlines = sr.ReadToEnd().Split(new char[]{'\n'});
              foreach(string file in chartlines) 
              { 
                  string Chart = chartlines[k]; 
                  string xchart = Chart.Split(';')[0]; 
                  string ychart = Chart.Split(';')[1];
                  int xval = Int32.Parse(xchart); 
                  int yval = Int32.Parse(ychart);
  
                  Globals.Tags.X_ARRAY[k].Value = xval;
                  Globals.Tags.Y_ARRAY[k].Value = yval; 
  
                  k++;
              } 
              Globals.Tags.CHECK.Value =  Globals.Tags.X_ARRAY[15].Value;
              //check values on screen 
              Globals.Tags.CHECK1.Value = Globals.Tags.Y_ARRAY[15].Value;
          } 
          catch 
          {   
            MessageBox.Show("Error"):
          }  
  }        
  </code></pre>
  
  <p>The Error is shown everytime I run proogram and no values are set to arrays.Any ideas why ? I write program on iXDeveloper and export it to X2 pro 7 HMI.      </p>