Hello people of the DaniWebs! It's been a long time since I've been talking and asking here, under the name of katmai539. I've lost account information and also the email address linked to it. I haven't been active in the software development-branch for the past few years but recently I decided to pick up the old habit of coding some stuff, next to my awesome job as a cashier at the local supermarket monopolist Albert Heijn.
Now to BUSINESS!
As you can see I'm still using SDL for a thing and another. I managed to compile a dll for sdl_draw in an environment I do not regularly use (Code::Blocks). The dll works fine with the included sdldrawtest.c file in Eclipse, though, which really set me at rest.
The question!
I have a class, in which the constructor assigns limited random numbers to the private variables. This works excellent. The function that draws a circle using these variables, however, hangs the program and quits it with exit code -1073741819, according to the debugger.
Upon step-by-step execution, I find this:
the Draw_circle function somehow refers to the following piece of code
/* Lock surface */
if (SDL_MUSTLOCK(super)) {
if (SDL_LockSurface(super) < 0) { return; }
}
which, upon execution, kills the process. The code is in the file Draw_Circle.c
Does anyone with some SDL experience knows why this is? I've checked the manual (which isn't very helpful at all).
I'm developing with Eclipse and MinGW using SDL and SDL_draw libraries. Thank you in advance and it's good to be back!
EDIT: Wow, that was a quick edit for my first post in a long time!
I forgot to tell you that, if I draw the circle directly to the screen SDL_Surface, the program just works fine. However, this isn't what I want to do!