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 - SDL_CreateWindow segfaults with SDL_VIDEODRIVER=dummy macOS Sierra
Summary: SDL_CreateWindow segfaults with SDL_VIDEODRIVER=dummy macOS Sierra
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: video (show other bugs)
Version: 2.0.5
Hardware: x86_64 Mac OS X 10.11
: P2 normal
Assignee: Sam Lantinga
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-10 18:36 UTC by Darren Kulp
Modified: 2016-12-11 20:04 UTC (History)
0 users

See Also:


Attachments
small.c (173 bytes, text/x-csrc)
2016-12-10 18:36 UTC, Darren Kulp
Details

Note You need to log in before you can comment on or make changes to this bug.
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