Details
-
Bug
-
Resolution: Done
-
P2: Important
-
5.5.0
-
None
-
ded4d7b006180d12f4f2e7642877ffc6586a5331
Description
I have a QML application which uses Radio element and it's radioData variable for accessing RDS channel name etc.
In environment without radio hardware, the radioData (in c++ side) is null and accessing it's variables causes the QML program to crash. This could be easily fixed with sanity checks in qdeclarativeradiodata.cpp.
Top of stack trace:
#0 QRadioData::stationName (this=0x0) at radio/qradiodata.cpp:300
#1 0x678b02e9 in QDeclarativeRadioData::stationName (this=0x9636170) at qdeclarativeradiodata.cpp:242
#2 0x678be082 in QDeclarativeRadioData::qt_metacall (this=0x9636170, _c=QMetaObject::ReadProperty, _id=3,
This is enough to trigger the bug:
import QtQuick 2.4 import QtQuick.Window 2.2 import QtMultimedia 5.0 Window { visible: true Radio { id: radio band: Radio.FM } Text { text: radio.radioData.stationName } }
It must be run in an environment with no radio hardware.