You should USE the debugger, not just run the script.
Use the commands it provides (e.g. backtrace, brakepoints etc) to identify the problem.
More probably you are trying to access something that is not there (e.g. from a vector). It could be that there is not interface as you mention in your previous email.
You said "Actually for some nodes there are no interfaces so i add an interface to use". Make sure that the nodes get their interfaces installed.