segfault when trying to read qmap