It looks like t_next_contacts() was expecting some xavps to be set (maybe by t_load_contact()), but they didn't exit.
I added safety checks for some of the xavp operations to work with null values.
Use the latest branch 5.2 and if still crashes, then reopen.