This error happens when there is an issue with DirectX 9 on Windows 10 and newer computers.
Rather than fighting to get DirectX 9 installed, the easiest solution is to switch to the OpenGL renderer using the external settings tool. Please see the external settings page for how to access the program.