***glibc detected**** free(): Invalid next size (fast)
What is this error??
Related to some memory issues
That's generally an attempt to free something that has already been freed.
this error while I was trying to remove I stopped calling a function which was in some header file and then this gone away.
This is thus you are right Maschops but there came another error now
***stack smashing detected***
You most likely write beyond array bounds somewhere.
If you're running this under Linux or Darwin (OS X), run it under valgrind and it will tell you the problem.