Uploaded image for project: 'MediaPortal 1'
  1. MediaPortal 1
  2. MP1-295

OverflowException in MyStatus

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.1.0.3
    • 0.1.0.2
    • Status
    • None

    Description

      When using MyStatus I get the following OverflowException:

      ************** Exception Text **************
      System.OverflowException: Value was either too large or too small for an Int32.
         at System.Convert.ToInt32(Double value)
         at System.Convert.ToInt16(Double value)
         at MediaPortal.GUI.GUIStatus.GUIStatus.UpdateFields() in f:\Scratch\mediaportal\WindowPlugins\GUIStatus\GUIStatus.cs:line 508
         at MediaPortal.GUI.GUIStatus.GUIStatus.OnTimer(Object sender, EventArgs e) in f:\Scratch\mediaportal\WindowPlugins\GUIStatus\GUIStatus.cs:line 304
         at System.Windows.Forms.Timer.OnTick(EventArgs e)
         at System.Windows.Forms.Timer.Callback(IntPtr hWnd, Int32 msg, IntPtr idEvent, IntPtr dwTime)

      The previous version of MyStatus worked just fine.
      I had the debugger break on the exception and noted down the values.

      p=Convert.ToInt16(act/(max/100)); <-- The line where it goes wrong (508)
      act = 2666.0
      max = 0.0

      BTW: 2666 is my CPU speed, maybe it helps with locating the problem.

      BTW2: Problem is gone when I uncheck the checkbox with the MHz caption

      Attachments

        Activity

          People

            Frodo Frodo (Inactive)
            Anonymous Anonymous
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: