We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3515

Summary: SDL_CreateWindow segfaults with SDL_VIDEODRIVER=dummy macOS Sierra
Product: SDL Reporter: Darren Kulp <darren>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: 2.0.5   
Hardware: x86_64   
OS: Mac OS X 10.11   
See Also: https://bugzilla.libsdl.org/show_bug.cgi?id=3061
Attachments: small.c

Description Darren Kulp 2016-12-10 18:36:57 UTC
Created attachment 2649 [details]
small.c

Since bug 3061 was resolved, I can do SDL_Init() with SDL_VIDEODRIVER=dummy in my environment. Unfortunately, I crash now in SDL_CreateWindow().

Attached is a small testcase (small.c).

$ cc --version
Apple LLVM version 8.0.0 (clang-800.0.42.1)
Target: x86_64-apple-darwin16.1.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
$ sdl2-config --version
2.0.5
$ cc -g $(sdl2-config --libs --cflags) small.c -o small
$ ./small # default driver works, creates a window and exits
$ SDL_VIDEODRIVER=dummy ./small
Segmentation fault: 11

A backtrace in gdb is not helpful :

Thread 2 received signal SIGSEGV, Segmentation fault.
0x0000000100126aa0 in ?? ()
(gdb) where
#0  0x0000000100126aa0 in ?? ()
#1  0x00007fff5fbff660 in ?? ()
#2  0x00000001000be69c in ?? ()
#3  0x0000000000000000 in ?? ()

The Bugzilla database does not allow me to select Mac OS X 10.12 aka macOS Sierra. I do not know whether this bug is specific to OS version.
Comment 1 Sam Lantinga 2016-12-11 20:04:14 UTC
Fixed, thanks!
https://hg.libsdl.org/SDL/rev/044ef09cda20