Setting DISPLAY to anything at all gets around it (eg. even "foobar" ... or "wayland-0"). I guess it has something to do with the dbus call attempt or registration since --disable-server also gets around it.
Thanks for the report! Is there any way you could provide me with a stack trace? I have no Wayland machine around, unfortunately.
Yes, I was being lazy and didnt bother to figure out building it (and the default stack trace was pretty useless)... anyhows: (gdb) bt #0 0xb616b5fc in malloc_printerr () at /usr/lib/libc.so.6 #1 0xb616d210 in _int_free () at /usr/lib/libc.so.6 #2 0x0040e564 in terminal_gdbus_invoke_launch (argc=<optimized out>, argv=<optimized out>, error=0xbefffabc) at terminal-gdbus.c:240 #3 0x0040b774 in main (argc=<optimized out>, argv=<optimized out>) at main.c:260 And i think i actually figured it out, terminal-gdbus.c:240 is g_free (display_name); and display_name is terminal_gdbus_display_name() which does: display_name = g_getenv ("DISPLAY"); if (G_UNLIKELY (display_name == NULL)) return ""; so you try to free() a not-allocated pointer. I tested changing the return line to display_name = ""; and that fixes it (since you strdup() display_name in the function).
Igor referenced this bugreport in commit fa0c839722244e88ae0db3bcd40a3af7b4768bee Fix handling empty $DISPLAY env var https://git.xfce.org/apps/xfce4-terminal/commit?id=fa0c839722244e88ae0db3bcd40a3af7b4768bee
Fixed, thank you!