| Summary: | arguments to dbus_type_is_basic() were incorrect | ||
|---|---|---|---|
| Product: | SDL | Reporter: | Aaron <aaronbpaden> |
| Component: | *don't know* | Assignee: | Ryan C. Gordon <icculus> |
| Status: | RESOLVED FIXED | QA Contact: | Sam Lantinga <slouken> |
| Severity: | blocker | ||
| Priority: | P2 | CC: | lgblgblgb, s.jegen, sezeroz |
| Version: | 2.0.6 | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
|
Description
Aaron
2017-09-29 12:56:54 UTC
Reproduced this on Fedora 20 / x86_64: running the checkkeys test against a newly built SDL2 fails: $ LD_LIBRARY_PATH=$HOME/opt/SDL2/lib ./checkkeys process 12645: arguments to dbus_type_is_basic() were incorrect, assertion "dbus_type_is_valid (typecode) || typecode == DBUS_TYPE_INVALID" failed in file dbus-signature.c line 322. This is normally a bug in some application using the D-Bus library. D-Bus not built with -rdynamic so unable to print a backtrace Aborted (core dumped) The issue seems to have started with changeset 11042 by Ryan: https://hg.libsdl.org/SDL/rev/303c875e47f0 Rev. 11041 does not have this issue. This issue has been reported to RedHat/Fedora, too : https://bugzilla.redhat.com/show_bug.cgi?id=1496895 Ryan, this is a critical bug affecting Steam as well. Can you fix ASAP? Thanks! I can confirm this issue on Arch Linux as well. Please find a stacktrace below.
process 3729: arguments to dbus_type_is_basic() were incorrect, assertion "dbus_type_is_valid (typecode) || typecode == DBUS_TYPE_INVALID" failed in file dbus-signature.c line 322.
This is normally a bug in some application using the D-Bus library.
D-Bus not built with -rdynamic so unable to print a backtrace
Program received signal SIGABRT, Aborted.
0x00007ffff77088a0 in raise () from /usr/lib/libc.so.6
(gdb) bt
#0 0x00007ffff77088a0 in raise () from /usr/lib/libc.so.6
#1 0x00007ffff7709f09 in abort () from /usr/lib/libc.so.6
#2 0x00007ffff495d8a7 in ?? () from /usr/lib/libdbus-1.so.3
#3 0x00007ffff49543e7 in _dbus_warn_check_failed () from /usr/lib/libdbus-1.so.3
#4 0x00007ffff494f4ed in dbus_type_is_basic () from /usr/lib/libdbus-1.so.3
#5 0x00007ffff4946863 in dbus_message_append_args_valist () from /usr/lib/libdbus-1.so.3
#6 0x00007ffff7b8414c in SDL_DBus_CallVoidMethodInternal (ap=0x7fffffffd870, method=0x55555578bb40 "\001",
interface=0x7ffff7ba5c80 <IBUS_INPUT_INTERFACE> "org.freedesktop.IBus.InputContext", path=<optimized out>,
node=0x7ffff7ba5cf0 <IBUS_SERVICE> "org.freedesktop.IBus", conn=0x55555578ff70) at /home/silvan/build/SDL2-2.0.6/src/core/linux/SDL_dbus.c:220
#7 SDL_DBus_CallVoidMethodOnConnection (conn=0x55555578ff70, node=node@entry=0x7ffff7ba5cf0 <IBUS_SERVICE> "org.freedesktop.IBus", path=<optimized out>,
interface=interface@entry=0x7ffff7ba5c80 <IBUS_INPUT_INTERFACE> "org.freedesktop.IBus.InputContext", method=method@entry=0x7ffff7ba5baf "FocusOut")
at /home/silvan/build/SDL2-2.0.6/src/core/linux/SDL_dbus.c:240
#8 0x00007ffff7b851c6 in IBus_SimpleMessage (method=0x7ffff7ba5baf "FocusOut") at /home/silvan/build/SDL2-2.0.6/src/core/linux/SDL_ibus.c:482
#9 SDL_IBus_SetFocus (focused=<optimized out>) at /home/silvan/build/SDL2-2.0.6/src/core/linux/SDL_ibus.c:490
#10 IBus_SetupConnection (dbus=dbus@entry=0x7ffff7dd7480 <dbus>,
addr=addr@entry=0x55555578bcb0 "unix:abstract=/tmp/dbus-OWLLq6hr,guid=ccac163e8d8b220cedc3577559d09fe4")
at /home/silvan/build/SDL2-2.0.6/src/core/linux/SDL_ibus.c:346
#11 0x00007ffff7b852f4 in SDL_IBus_Init () at /home/silvan/build/SDL2-2.0.6/src/core/linux/SDL_ibus.c:436
#12 0x00007ffff7b84836 in SDL_IME_Init () at /home/silvan/build/SDL2-2.0.6/src/core/linux/SDL_ime.c:91
#13 0x00007ffff7b6f11a in X11_InitKeyboard (_this=_this@entry=0x555555759660) at /home/silvan/build/SDL2-2.0.6/src/video/x11/SDL_x11keyboard.c:410
#14 0x00007ffff7b7710c in X11_VideoInit (_this=0x555555759660) at /home/silvan/build/SDL2-2.0.6/src/video/x11/SDL_x11video.c:446
#15 0x00007ffff7b618e3 in SDL_VideoInit_REAL (driver_name=<optimized out>, driver_name@entry=0x0) at /home/silvan/build/SDL2-2.0.6/src/video/SDL_video.c:532
#16 0x00007ffff7aa50d7 in SDL_InitSubSystem_REAL (flags=16928) at /home/silvan/build/SDL2-2.0.6/src/SDL.c:170
#17 SDL_Init_REAL (flags=<optimized out>) at /home/silvan/build/SDL2-2.0.6/src/SDL.c:241
#18 0x0000555555555350 in main (argc=<optimized out>, argv=0x7fffffffe5f8) at testjoystick.c:252
This line is most likely the culprit.
if ((firstarg == DBUS_TYPE_INVALID) || dbus.message_append_args_valist(msg, firstarg, ap)) {
it looks like there would be an invalid type passed to dbus.message_append_args_valist.
IBus_SimpleMessage() doesn't pass any vargars to SDL_DBus_CallVoidMethodOnConnection() therefore it receives garbage I guess. The following patch fixes it for me: please review.
diff --git a/src/core/linux/SDL_ibus.c b/src/core/linux/SDL_ibus.c
--- a/src/core/linux/SDL_ibus.c
+++ b/src/core/linux/SDL_ibus.c
@@ -479,7 +479,7 @@ IBus_SimpleMessage(const char *method)
SDL_DBusContext *dbus = SDL_DBus_GetContext();
if (IBus_CheckConnection(dbus)) {
- SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, method);
+ SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, input_ctx_path, IBUS_INPUT_INTERFACE, method, DBUS_TYPE_INVALID);
}
}
(In reply to Ozkan Sezer from comment #7) > The following patch fixes it for me: please review. > > diff --git a/src/core/linux/SDL_ibus.c b/src/core/linux/SDL_ibus.c > --- a/src/core/linux/SDL_ibus.c > +++ b/src/core/linux/SDL_ibus.c > @@ -479,7 +479,7 @@ IBus_SimpleMessage(const char *method) > SDL_DBusContext *dbus = SDL_DBus_GetContext(); > > if (IBus_CheckConnection(dbus)) { > - SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, > input_ctx_path, IBUS_INPUT_INTERFACE, method); > + SDL_DBus_CallVoidMethodOnConnection(ibus_conn, IBUS_SERVICE, > input_ctx_path, IBUS_INPUT_INTERFACE, method, DBUS_TYPE_INVALID); > } > } I can confirm that this fixes the issue for me as well. To me it looks like this would be the correct way to call SDL_DBus_CallVoidMethodOnConnection with no further arguments but somebody who is more familiar with that code should do a proper review. PING? Fixed, thanks! https://hg.libsdl.org/SDL/rev/dc7245e3d1f2 Marking fixed *** Bug 3863 has been marked as a duplicate of this bug. *** |