Catch an exception that might be thrown by the localEnergy_ and solve the problem again using a smaller trust region. Also make sure the ADOLC-Tape gets closed properly