Strain localization at nanoscales as an instability event