Nevermind I figured it out man am I such a godforsaken Moron.
upon hitting the event SDL_EVENT not only was I already closing there I was also closing in MAIN too!!!!!!!!!!!!!!!!!!!!!!!
(for everyone not familiar with C/C++)
basically in laymans terms i was calling free() twice probably triple before I found out.
lmain.h
if(event.type == SDL_QUIT){
quit == true;
SDL_KillThread(thread);
SDL_Quit();
lua_close(L);
}
lsmain.cpp
lsmain(L,Event);
lua_close(L);
SDL_Quit();
just wow man no wonder I wasn't getting any help that was such an idiotic thing of me to do.
Also C/C++ are my main languages Lua I know almost as well as C/C++ and I have been coding off and on for about 3 years I just lack common sense and a part of my brain :p
Now that I have solved my issue can a mod please delete "lua and SDL having a hard time" because that only covered one half of my problems.
Basically this is what happened during this project:Lua and SDL both running at the same time just fine(no multithreading yet)
realized that SDL can't parse events because cin.getline was blocking the input to it(thank you
#lua from irc.freenode.net)
so tried multithreading it seemed to work with boost::thread alright wait a sec nope.
Switched to SDL_Thread worked perfectly.
then I got the glibc core dump problem was initially going to solve it with an export to
malloc_check = 0 but then realized that it shouldn't be needed in the first place.
then i came back to DW(as i always do when i need help) wait and worked for about a total of 3
hours decided to try valgrind as was recommended here(i think) and on (#lua) instead of starting
from the last error from valgrind i went up as far as i could then worked down after recompiling.
Eventually realized that I was calling lua_close(L) and SDL_Quit() multiple times. Removed and
WORKS PERFECTLY.