I created win32 program with Forms in Delphi.
Initialization of SDL proceeds by button. SDL2 window is atached to panel object with SDL_CreateWindowFrom().
Program loading images to memory and creating textures for renderer. Then drawing them.
All of actions with SDL2 proceed in separated single thread, created with BeginThread.
And some times, randomly, not all time (or continuously), i catching exceptions in SDL2 dll.
When i try figure out where and what cause exceptions - i can’t find what is wrong.
SDL_GetError() return nothing.
95% of exceptions i catch on SDL_CreateTextureFromSurface(), on initialization of images.
Other times it can be happened in SDL_RenderPresent() or in SDL_SetRenderTarget() - in drawing loop.
I checked thread id - it don’t changed.
I checked inbound surfaces - all ok.
I’m at an impasse.
P.S. Windows 7 x64. SDL 2.0.4. Graphic card Radeon and integrated Intel (on PC and on notebook, problem is on both).