I've been working on a small game of tic tac toe using Derelict SDL, and development has been going along great... Until I tried to develop on my Ubuntu laptop.

I uploaded the code to github, downloaded it on my laptop, installed the prequesites and... The program crashed with error -11 -- a segmentation fault.

Two days of fix attempt laters, here I am. I tried reinstalling and recompiling SDL from source (since the version from apt-get was only 2.0.4 and the one Derelict uses seems to be 2.0.5), and it continues segfaulting at seemingly random places.

I have a function which fills the screen with black using SDL_FillRect... Then, this same function calls another helper function... Which segfaults, at SDL_FillRect. That is, the same function is both working and crashing, when given the exact same arguments, just in different contexts. And I have no idea why.

I'll put a link to the repo. It is a slightly more updated version than the one I've been trying to compile, but it segfaults anyway. I'm continuing to develop just fine on Windows, but Derelict on Ubuntu has proven to be a nightmare.

TL;DR: Same code runs on Windows but not Ubuntu, tried to update and recompile all I could, segmentation faults on seemingly random places.

http://www.github.com/robly18/sdltest/

Reply via email to