iTunes locks up (library on NAS)
Your assumption that it locks up because the iTunes library is located on the NAS is likely correct. Some NAS's offer a setting/app to run an iTunes-Server. If your NAS offers something like that you should use that instead of just putting the library on a shared drive. (E.g. http://qnap.com/en/index.php?lang=en&amp;sn=2674)

If your NAS doesn't have iTunes Server functionality you could try going through the NAS settings and see if there are power-saving options like "spinning down the harddrive" that you can disable. By disabling those settings the NAS will remain active all the time and there will be less of a delay when iTunes tries get the next track etc.

If you need more help you should post the exact model of your NAS and people may be able to tell you something more specific.