Do not use local variable (like HTML) that is probably out of scope when your lambda executes (hence the crash) - use a property of your class that is still alive and in scope and even then you have to find a way to check if lambda already executed (may be a QFuture or boost::promise)