Reading AmbientLight from android: Fatal signal 11 (SIGSEGV), code 1,
Solved
Mobile and Embedded
-
Hello, am trying to read the ambientlight from my android and the error: Fatal signal 11 (SIGSEGV), code 1, occurs anytime i push the button to receive the values. Here is my code```
void MainWindow::read()
{ qDebug()<<"here....";
QAmbientLightSensor sensor;
QAmbientLightReading *value = sensor.reading();
qDebug()<<value->lightLevel();
qDebug()<<text;
ui->display->setText(text);
} -
Hi,
Just a wild guess but you should check that "value" Is not a null pointer.