Strange segfault (Derelict/OpenGL)

via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Aug 29 04:51:46 PDT 2014


On Friday, 29 August 2014 at 11:23:34 UTC, Robin Schroer wrote:
> I'm not entirely sure where to post, so I will put it here.

This is the right place.

>
> I'm playing around with D and Derelict 3 to make something with 
> OpenGL (don't really know what yet). I managed to open a 
> window, add an OpenGL context, clear the screen and flip 
> buffers. But as soon as I try to render a triangle, my program 
> crashes. I already tried hardcoding values in the shaders to 
> rule them out. I end up with:
>
> Error executing command run: Program exited with code -11
>
> Upon running with gdb, I get:
>
> Program received signal SIGSEGV, Segmentation fault.
> 0x0000000000000000 in ?? ()
>
> which is not really helpful to me.

Can you still try to get a backtrace with `bt`? This looks like 
it's calling a null function pointer. I'm not familiar with 
Derelict, but I remember that some initialization needs to be 
done which involves setting up function pointers; your problem is 
probably related to that.


More information about the Digitalmars-d-learn mailing list