In the following line in main.cpp, you passed <&a> as an argument for the function. But you did not declare variable before. I think the nullptr error caused by this fault.
QObject::connect(&engine, &QQmlApplicationEngine::objectCreated, &a, [url](QObject *obj, const QUrl &objUrl)