Skip to content

Commit

Permalink
apache-directory-studio: fix startup by creating /tmp/SWT-GDBusServer
Browse files Browse the repository at this point in the history
Before:

  $ ./result/bin/ApacheDirectoryStudio
  SWT WebKitGDBus: error creating DBus server Error binding to address (GUnixSocketAddress): No such file or directory
  SWT WebKit: error initializing DBus server, dBusServer == 0

  (Apache Directory Studio:1218305): GLib-GIO-CRITICAL **: 15:17:33.727: g_dbus_server_get_client_address: assertion 'G_IS_DBUS_SERVER (server)' failed
  #
  # A fatal error has been detected by the Java Runtime Environment:
  #
  #  SIGSEGV (0xb) at pc=0x00007fe033c36f48, pid=1218305, tid=1218306
  #
  # JRE version: OpenJDK Runtime Environment (21.0.5+1) (build 21.0.5+1-nixos)
  # Java VM: OpenJDK 64-Bit Server VM (21.0.5+1-nixos, mixed mode, sharing, tiered, compressed oops, compressed class ptrs, g1 gc, linux-amd64)
  # Problematic frame:
  # C  [libswt-gtk-4940r23.so+0x36f48]  Java_org_eclipse_swt_internal_C_strlen+0xf
  #
  # Core dump will be written. Default location: Core dumps may be processed with "/nix/store/jz45idky1nhvf3c9gz20ds2py19kdvgf-systemd/lib/systemd/systemd-coredump %P %u %g %s %t %c %h" (or dumping to /home/bf/nixpkgs/core.1218305)
  #
  # An error report file with more information is saved as:
  # /home/bf/nixpkgs/hs_err_pid1218305.log
  [2.073s][warning][os] Loading hsdis library failed
  #
  # If you would like to submit a bug report, please visit:
  #   https://bugreport.java.com/bugreport/crash.jsp
  # The crash happened outside the Java Virtual Machine in native code.
  # See problematic frame for where to report the bug.
  #

After:

  $ ./result/bin/ApacheDirectoryStudio
  ** (WebKitWebProcess:1221467): ERROR **: 15:18:35.064: Failed to create server: Error binding to address (GUnixSocketAddress): No such file or directory

...but the GUI opens and the application seems fine.
Tested on NixOS with GNOME (Wayland).

Fixes #333377.

(cherry picked from commit b707af9)
  • Loading branch information
bjornfor committed Mar 7, 2025
1 parent eef362c commit d3c73a3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion pkgs/by-name/ap/apache-directory-studio/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ stdenv.mkDerivation rec {
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
"$dest/ApacheDirectoryStudio"
# About `/tmp/SWT-GDBusServer`, see
# https://github.com/adoptium/adoptium-support/issues/785#issuecomment-1866680133
# and
# https://github.com/adoptium/adoptium-support/issues/785#issuecomment-2387481967.
makeWrapper "$dest/ApacheDirectoryStudio" \
"$out/bin/ApacheDirectoryStudio" \
--prefix PATH : "${jdk}/bin" \
Expand All @@ -64,7 +68,8 @@ stdenv.mkDerivation rec {
glib
webkitgtk_4_0
])
}
} \
--run "mkdir -p /tmp/SWT-GDBusServer"
install -D icon.xpm "$out/share/pixmaps/apache-directory-studio.xpm"
install -D -t "$out/share/applications" ${desktopItem}/share/applications/*
'';
Expand Down

0 comments on commit d3c73a3

Please sign in to comment.