ok so the crashes were because of incorrect configuration.
the code was correct. i've compiled debug and NDEBUG irrlicht static libs and was linking to incorrect version in debug mode. oops.