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 3601

Summary: SDL_Init VIDEO segfault
Product: SDL Reporter: Paul <Paul.Hancock.17041993>
Component: videoAssignee: Sam Lantinga <slouken>
Status: RESOLVED INVALID QA Contact: Sam Lantinga <slouken>
Severity: blocker    
Priority: P2 CC: icculus
Version: don't knowKeywords: target-2.0.6
Hardware: x86_64   
OS: Linux   
Attachments: stacktrace

Description Paul 2017-03-07 23:50:23 UTC
Created attachment 2703 [details]
stacktrace

After updating to mesa 17, my project segfaults inside SDL_init for SDL_INIT_VIDEO, previous calls to SDL_Init for timers and events completed just fine however.

I've tried with GL forced to compatibility and 3.0 but the results are still exactly the same.

Stacktrace attached.
Comment 1 Paul 2017-03-07 23:52:53 UTC
using Kubuntu 16.10 x64, compiling with clang over (and with) llvm 3.8, using mesa releases from https://launchpad.net/~paulo-miguel-dias/+archive/ubuntu/pkppa/
Comment 2 Ryan C. Gordon 2017-08-09 05:25:35 UTC
(Sorry if you get a lot of copies of this email, we're touching dozens of bug reports right now.)

Tagging a bunch of bugs as target-2.0.6.

This means we're in the final stretch for an official SDL 2.0.6 release! These are the bugs we really want to fix before shipping if humanly possible.

That being said, we don't promise to fix them because of this tag, we just want to make sure we don't forget to deal with them before we bless a final 2.0.6 release, and generally be organized about what we're aiming to ship. After some debate, we might just remove this tag again and deal with it for a later release.

Hopefully you'll hear more about this bug soon. If you have more information (including "this got fixed at some point, nevermind"), we would love to have you come add more information to the bug report when you have a moment.

Thanks!
--ryan.
Comment 3 Ryan C. Gordon 2017-08-20 20:07:36 UTC
This is such a weird looking stacktrace. Is this from LLDB or something?

X11_GL_InitExtensions is likely where this is happening:

https://hg.libsdl.org/SDL/file/e3797888c6f1/src/video/x11/SDL_x11opengl.c#l322

In that call to glXQueryExtensionsString(), where apparently it blows up deep under dlopen(), presumably in some __attribute__ ((constructor)) code somewhere in Mesa, talking to LLVM (for...LLVMpipe...?).

We don't need a GL context to call glXQueryExtensionsString(), so that's not the usual problem at play here.

My inclination is to say this is not an SDL bug, but either a Mesa bug or a package update gone bad.

--ryan.
Comment 4 Ryan C. Gordon 2017-08-30 18:23:15 UTC
I'm assuming this is a corrupt install or a Mesa bug and resolving it here. If this situation changes, feel free to reopen this bug!

--ryan.