I am working on getting gps input into a Map that is based on QML. PositionSource QML type's nmeaSource expects socket input to QML Type "Map". And QML Type "Map" reads NMEA data and shows a marker on the coordinates. This works without a problem. But when tcpsocket closed from server it gives segmentation fault. I want to introduce some sort of error handling to QTCPServer implementation that will communicate with PositionSource type. But I am unable to proceed since destruction or closing of QTcpServer or QTcpSocket causes Segmentation Fault, when used with QML PositionSource.