fix crash(qDebug) on mac, but don't know why