In the context of smart grid transformation of existing electricity networks, optimal power flow (OPF) and security-constrained OPF (SCOPF) studies remain to be very important for power system planning, operation and market analysis. OPF study involves finding the (global) optimum solution to a set of nonlinear algebraic equations, subjected to a set of equality and inequality constraints. When the system is heavily stressed, particularly following a severe contingency, the conventional OPF methods may fail due to the problem or solution infeasibility, or inability to select proper initial values. The soft constraint handling approach and repetitive constraint relaxation in finding the causes of infeasibility could be either tedious, or may not be practical for the large-scale problems. This paper presents an alternative approach, based on use of meta-heuristic method, to pinpoint the main reasons for the failure of solution algorithms in nonlinear optimization, in general, and OPF problem, in particular. The presented approach is illustrated on commonly used IEEE 14-bus and 30-bus test networks.