diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 107722d1..d74a2a1c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -238,3 +238,13 @@ any other information that is requested: This will generate a large file called `core` in the current directory; it can be later re-loaded using `lldb -c core`. + +### Debugging GUI-related bugs on Linux + +There are several environment variables available that make crashes +earlier and errors more informative. Before running SolveSpace, run +the following commands in your shell: + + export G_DEBUG=fatal_warnings + export LIBGL_DEBUG=1 + export MESA_DEBUG=1 diff --git a/src/platform/gtkmain.cpp b/src/platform/gtkmain.cpp index 19365b51..249db3ae 100644 --- a/src/platform/gtkmain.cpp +++ b/src/platform/gtkmain.cpp @@ -1433,6 +1433,9 @@ int main(int argc, char** argv) { while(*langNames) { if(SetLocale(*langNames++)) break; } + if(!*langNames) { + SetLocale("en_US"); + } #if defined(HAVE_SPACEWARE) && defined(GDK_WINDOWING_X11) if(GDK_IS_X11_DISPLAY(Gdk::Display::get_default()->gobj())) {