Make sure X-Plane is fully up to date. If you aren't using X-Plane purchased through Steam, you should run the installer & pick the update option. This will scan the install and replace any missing files.
If that doesn't fix it, you should submit a bug report with a copy of the log.txt and the exact steps you take to see this (what aircraft, airport, etc).