Created attachment 27891 [details] [review] Correct the GType of XklEngineFeatures GDM crashes with a libxklavier assertion at startup. GDM is at version 2.27.4, and libxklavier is at version 4.0. The stack trace is: GLib-GObject-CRITICAL: g_param_spec_flags: assertion `G_TYPE_IS_FLAGS (flags_type)' failed aborting... Jul 21 17:51:25 jclarke-pc gdm[7671]: [New Thread 29001140 (LWP 100162)] Jul 21 17:51:26 jclarke-pc gdm[7671]: [Switching to Thread 29001140 (LWP 100162)] Jul 21 17:51:26 jclarke-pc gdm[7671]: 0x28ef15f9 in wait4 () at wait4.S:3 Jul 21 17:51:26 jclarke-pc gdm[7671]: 3 RSYSCALL(wait4) Jul 21 17:51:26 jclarke-pc gdm[7671]: #0 0x28ef15f9 in wait4 () at wait4.S:3 Jul 21 17:51:26 jclarke-pc gdm[7671]: #1 0x28ecb363 in __waitpid (pid=7671, istat=0xbfbfdb18, options=0) Jul 21 17:51:26 jclarke-pc gdm[7671]: at /usr/src/lib/libc/gen/waitpid.c:46 Jul 21 17:51:26 jclarke-pc gdm[7671]: #2 0x28e856f2 in ___waitpid (wpid=7671, status=0xbfbfdb18, options=0) Jul 21 17:51:26 jclarke-pc gdm[7671]: at /usr/src/lib/libthr/thread/thr_syscalls.c:592 Jul 21 17:51:26 jclarke-pc gdm[7671]: #3 0x0806fda7 in gdm_signal_handler_backtrace () at gdm-signal-handler.c:196 Jul 21 17:51:26 jclarke-pc gdm[7671]: ) at gdm-signal-handler.c:251 Jul 21 17:51:26 jclarke-pc gdm[7671]: #5 <signal handler called> Jul 21 17:51:26 jclarke-pc gdm[7671]: #6 IA__g_logv (log_domain=0x28b428c7 "GLib-GObject", Jul 21 17:51:26 jclarke-pc gdm[7671]: log_level=G_LOG_LEVEL_CRITICAL, Jul 21 17:51:26 jclarke-pc gdm[7671]: format=0x28bc3414 "%s: assertion `%s' failed", Jul 21 17:51:26 jclarke-pc gdm[7671]: args1=0xbfbfe31c "=S�(�N�(H��(@)\016)�(�(H��(") at gmessages.c:512 Jul 21 17:51:26 jclarke-pc gdm[7671]: #7 0x28b8d399 in IA__g_log (log_domain=0x28b428c7 "GLib-GObject", Jul 21 17:51:26 jclarke-pc gdm[7671]: log_level=G_LOG_LEVEL_CRITICAL, Jul 21 17:51:26 jclarke-pc gdm[7671]: format=0x28bc3414 "%s: assertion `%s' failed") at gmessages.c:526 Jul 21 17:51:26 jclarke-pc gdm[7671]: #8 0x28b8d5db in IA__g_return_if_fail_warning ( Jul 21 17:51:26 jclarke-pc gdm[7671]: log_domain=0x28b428c7 "GLib-GObject", Jul 21 17:51:26 jclarke-pc gdm[7671]: pretty_function=0x28b4533d "g_param_spec_flags", Jul 21 17:51:26 jclarke-pc gdm[7671]: expression=0x28b44ef5 "G_TYPE_IS_FLAGS (flags_type)") at gmessages.c:541 Jul 21 17:51:26 jclarke-pc gdm[7671]: #9 0x28b24ba1 in IA__g_param_spec_flags (name=0x28991728 "features", Jul 21 17:51:26 jclarke-pc gdm[7671]: nick=0x28991488 "Features", blurb=0x28991720 "Backend features", Jul 21 17:51:26 jclarke-pc gdm[7671]: flags_type=688793920, default_value=0, flags=G_PARAM_READABLE) Jul 21 17:51:26 jclarke-pc gdm[7671]: at gparamspecs.c:2001 Jul 21 17:51:26 jclarke-pc gdm[7671]: #10 0x28985b79 in xkl_engine_class_intern_init (klass=0x290f0880) Jul 21 17:51:26 jclarke-pc gdm[7671]: at xklavier.c:817 Jul 21 17:51:26 jclarke-pc gdm[7671]: #11 0x28b3b075 in IA__g_type_class_ref (type=688793728) at gtype.c:1989 Jul 21 17:51:26 jclarke-pc gdm[7671]: #12 0x28b1e8f1 in IA__g_object_new_valist (object_type=688793728, Jul 21 17:51:26 jclarke-pc gdm[7671]: first_property_name=0x289916e6 "display", var_args=0xbfbfe588 "") Jul 21 17:51:26 jclarke-pc gdm[7671]: at gobject.c:1280 Jul 21 17:51:26 jclarke-pc gdm[7671]: #13 0x28b1ecb0 in IA__g_object_new (object_type=688793728, Jul 21 17:51:26 jclarke-pc gdm[7671]: first_property_name=0x289916e6 "display") at gobject.c:1060 Jul 21 17:51:26 jclarke-pc gdm[7671]: #14 0x28986d24 in xkl_engine_get_instance (display=0x29051200) Jul 21 17:51:26 jclarke-pc gdm[7671]: at xklavier.c:213 Jul 21 17:51:26 jclarke-pc gdm[7671]: #15 0x0806a823 in init_xkl () at gdm-layouts.c:52 Jul 21 17:51:26 jclarke-pc gdm[7671]: #16 0x0806a8c1 in gdm_layout_activate (layout=0x0) at gdm-layouts.c:249 It seems to me that XklEngineFeatures should be a G_FLAGS_CLASS instead of a G_ENUM_CLASS. Attached is a patch which corrects this, and fixes the crash in gdm.
This seems correct. I will commit it once we are out of the freeze
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.