[gtk-mac-integration] gtkosxapplication_quartz.c - fix crash with some locales
- From: John Ralls <jralls src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-mac-integration] gtkosxapplication_quartz.c - fix crash with some locales
- Date: Sat, 6 Aug 2022 19:03:22 +0000 (UTC)
commit fbb806cf65c4e3ff91047847b61dcc21cc8ed3dc
Author: parafin <parafin paraf in>
Date: Thu Aug 4 13:38:10 2022 +0000
gtkosxapplication_quartz.c - fix crash with some locales
Tested with darktable on macOS 10.14/10.15.
Without this change e.g. English and Deutsch UI language works,
but for example choosing Italian or Russian results in the following crash:
2022-08-04 15:35:14.327 darktable[15963:302678] *** Assertion failure in -[NSMenuItem
initWithTitle:action:keyEquivalent:],
/AppleInternal/BuildRoot/Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1894.70.110/Menus.subproj/NSMenuItem.m:424
2022-08-04 15:35:14.329 darktable[15963:302678] *** Terminating app due to uncaught exception
'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: aString != nil'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff39fcba17 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff71edda9e objc_exception_throw + 48
2 CoreFoundation 0x00007fff39ff4d40 +[NSException raise:format:arguments:]
+ 88
3 Foundation 0x00007fff3c70c91d -[NSAssertionHandler
handleFailureInMethod:object:file:lineNumber:description:] + 191
4 AppKit 0x00007fff371f6eb9 -[NSMenuItem
initWithTitle:action:keyEquivalent:] + 324
5 libgtkmacintegration-gtk3.4.dylib 0x0000000108e49079 gtkosx_application_set_menu_bar + 1119
6 libdarktable.dylib 0x0000000105cca914 dt_gui_gtk_init + 340
7 libdarktable.dylib 0x0000000105b44120 dt_init + 8896
8 darktable 0x0000000105aecf3a main + 42
9 libdyld.dylib 0x00007fff7307dcc9 start + 1
)
libc++abi.dylib: terminating with uncaught exception of type NSException
src/gtkosxapplication_quartz.c | 1 +
1 file changed, 1 insertion(+)
---
diff --git a/src/gtkosxapplication_quartz.c b/src/gtkosxapplication_quartz.c
index 7dc362e..32f9558 100644
--- a/src/gtkosxapplication_quartz.c
+++ b/src/gtkosxapplication_quartz.c
@@ -593,6 +593,7 @@ gtkosx_application_init (GtkosxApplication *self)
[NSApp setDelegate: [GtkApplicationDelegate new]];
self->priv->delegate = [NSApp delegate];
bindtextdomain (PACKAGE_NAME, LOCALEDIR);
+ bind_textdomain_codeset(PACKAGE_NAME, "UTF-8");
/* Check if we're running inside an application bundle and overwrite the
* previously bound domain to a location inside the bundle.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]