It seems to me that either the maingl window class isn’t initialized yet - invalid pointer - or the OpenGL display hasn’t been setup correctly. Make sure the thread is created after all necessary setup has been done.
Although “super = (class MainGL*) aSuper;” could be a problem if “void *aSuper” refuses to be a MainGL object. I don’t understand why you are using a void pointer for your data in C++, as the language has usefull features to avoid such things.