You start with
Gtk::TextView* textview = 0;
Later you do:
textview->set_buffer(text);
Maybe I missed something but at no point I see you point textview at an actual textview object. I would expect something like:
refBuilder->get_widget("???", textview );
during initialization.
Also you should use nullptr
instead of 0. Or NULL
assuming you do not use c++11