Added a try-catch around the text initialization in 2d.cpp.