After trying to come up with a fallback for wrong locale I've to say
this cannot be fixed at the point we hit the problem in unity-scopes-
shell. It's already too late, and moreover there seem to be issues with
the libstdc++ library when locale setup is broken and it's impossible to
recover.

Related to this:
http://stackoverflow.com/questions/1745045/stdlocale-breakage-on-macos-10-6-with-lang-en-us-utf-8
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15467

When the locale setup is broken (which I can easily reproduce in my VM with 
only minimal ubuntu system with some locale settings pointing to non-existing 
PL locales, and LC_ALL is unset), all the locale-related C++ functions throw 
when trying to get current locale name and they also throw after trying to set 
LC_ALL to "C" at this point. In summary, these method calls throw:
std::locale("") (should get us current locale setup)
std::setlocale(LC_ALL, "C")
std::locale::global(std::locale::classic())

The only workaround I can think of is to avoid the crash, end up with a blank 
Dash page and log an error message to unity8-dash.log.
For the occasional problem with the tests we see when landing the package, I'll 
make sure LC_ALL=C when tests are executed.

** Bug watch added: GCC Bugzilla #15467
   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=15467

** Bug watch added: GCC Bugzilla #70493
   https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70493

-- 
You received this bug notification because you are a member of Ubuntu
Touch seeded packages, which is subscribed to unity-scopes-shell in
Ubuntu.
https://bugs.launchpad.net/bugs/1363946

Title:
  unity8-dash crashed with SIGABRT in qt_message_fatal() under incorrect
  locale

Status in unity-scopes-api package in Ubuntu:
  Confirmed
Status in unity-scopes-shell package in Ubuntu:
  Confirmed

Bug description:
  unity8-dash gets into a respawn loop when the selected locale is
  unavailable. While it's understood that incorrect locale might result
  in unexpected behaviour, but aborting feels excessive.

  .log file mentions:

  ERROR! Caught unity::scopes::ConfigException: Cannot instantiate run time for 
client, config file: :
      unity::scopes::MiddlewareException: cannot initialize zmq middleware for 
scope c-17178aae00000000:
          locale::facet::_S_create_c_locale name not

  ProblemType: Crash
  DistroRelease: Ubuntu 14.10
  Package: unity8 8.00+14.10.20140828.1-0ubuntu1
  Uname: Linux 3.4.0-5-mako armv7l
  ApportVersion: 2.14.7-0ubuntu1
  Architecture: armhf
  CurrentDesktop: Unity
  Date: Mon Sep  1 11:55:15 2014
  ExecutablePath: /usr/bin/unity8-dash
  ExecutableTimestamp: 1409258182
  InstallationDate: Installed on 2014-09-01 (0 days ago)
  InstallationMedia: Ubuntu Utopic Unicorn (development branch) - armhf 
(20140901-020204)
  LocalLibraries: /android/system/lib/libGLES_trace.so 
/android/system/lib/libstlport.so /android/system/lib/libgccdemangle.so 
/android/system/lib/libm.so /android/system/lib/libcorkscrew.so 
/android/system/lib/liblog.so /android/system/lib/libstdc++.so 
/android/system/lib/libutils.so /android/system/lib/libc.so 
/android/system/lib/libcutils.so /android/system/lib/libGLESv2.so 
/android/system/lib/libEGL.so /android/system/lib/libdsyscalls.so
  ProcCmdline: unity8-dash 
--desktop_file_hint=/usr/share/applications/unity8-dash.desktop
  ProcCwd: /home/phablet
  Signal: 6
  SourcePackage: unity8
  StacktraceTop:
   ?? () from /lib/arm-linux-gnueabihf/libc.so.6
   raise () from /lib/arm-linux-gnueabihf/libc.so.6
   abort () from /lib/arm-linux-gnueabihf/libc.so.6
   QMessageLogger::fatal(char const*, ...) const () from 
/usr/lib/arm-linux-gnueabihf/libQt5Core.so.5
   ?? () from 
/usr/lib/arm-linux-gnueabihf/qt5/plugins/platforms/libqpa-ubuntumirclient.so
  Title: unity8-dash crashed with SIGABRT in raise()
  UpgradeStatus: No upgrade log present (probably fresh install)
  UserGroups: adm cdrom dialout dip plugdev sudo tty video

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/unity-scopes-api/+bug/1363946/+subscriptions

-- 
Mailing list: https://launchpad.net/~touch-packages
Post to     : [email protected]
Unsubscribe : https://launchpad.net/~touch-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to