Good that you ask. assert(...) will abort your program and show us in which code line things don't have the expected values. So please start the program in a terminal and send us this output.