Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-40664

winrt: AmbientLightSensor backend has a potential divde-by-zero

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.4.0
    • Fix Version/s: None
    • Component/s: Sensors
    • Labels:
    • Environment:
      Windows Phone 8.1
    • Platform/s:
      WinRT
    • Commits:
       67dc29a96cf78ee4f4f2bfc42bfdde458138cd31

      Description

      When testing the ambient light sensor on a Lumia 1520, a divide-by-zero hits in WinRtAmbientLightSensor::start():

      quint32 reportInterval = qMax(d->minimumReportInterval, quint32(1000/sensor()->dataRate()));

      due to dataRate() returning 0.

        Attachments

        For Gerrit Dashboard: QTBUG-40664
        # Subject Branch Project Status CR V

          Activity

            People

            • Assignee:
              andrew.knight Andrew Knight
              Reporter:
              andrew.knight Andrew Knight
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Gerrit Reviews

                There are no open Gerrit changes