Hey folks! I'm trying to create a game using sfml and Qt on Windows! I want to separate all the game logic and rendering to a separate QThread and draw the result on a canvas on the main gui-thread. I was hoping I could render the picture in a sf::RenderTexture and signal the texture using Qt:s signal/slot system to the gui-thread. However, the program always crashes with a segmentation fault when calling the sf::RenderTexture::getTexture() in the game-thread. Any ideas? Here's some debug-info:
0 ntdll!RtlReleaseSRWLockShared 0x77e64d78
1 ntdll!RtlAllocateHeap 0x77e62eab
2 ntdll!RtlAllocateHeap 0x77e62c0e
3 ntdll!RtlpNtSetValueKey 0x77f0d199
4 ntdll!RtlReleaseSRWLockShared 0x77e64b10
5 ntdll!RtlAllocateHeap 0x77e62eab
6 ntdll!RtlAllocateHeap 0x77e62c0e
7 msvcrt!malloc 0x77ba7990
8 libstdc++-6!_Znwj 0xab372da
9 (anonymous namespace)::getInternalContext GlContext.cpp 155 0xa81b35
10 sf::priv::GlContext::ensureContext GlContext.cpp 213 0xa81dd6