Threading issues with GUI. Connection needs to be created in the same thread it's being used in, and disconnected from that thread when it's done.