package gv
tags 439067 + pending confirmed
thanks

* Paul Kimoto <[EMAIL PROTECTED]> [070822 16:53]:
> > Is the environment variable XUSERFILESEARCHPATH set?
>
> Yes, to "/home/mopsa/kimoto/app-defaults/%N".  It doesn't seem to matter
> whether I have a "GV" file there or not.
>
> However! gv does not segfault if I unset XUSERFILESEARCHPATH.

Thanks for your feedback. I've finaly found the cause
(resource_buildDatabase implicitly destroying the display's database,
but calling XtResolvePathname when XUSERFILESEARCHPATH is set which
still needs it).

I'll upload a new package fixing this (most likely with the attached
patch) within the next days.

Hochachtungsvoll,
        Bernhard R. Link
--- a/src/main.c	2007-08-27 17:20:30.000000000 +0200
+++ b/src/main.c	2007-08-27 17:05:02.000000000 +0200
@@ -597,13 +597,10 @@
      }
 
    /*### getting resources ############################################*/
-   gv_database = resource_buildDatabase (XtDatabase(gv_display),
-                                         gv_display,
+   gv_database = resource_buildDatabase (gv_display,
                                          gv_class,
                                          gv_name,
                                          &argc,argv);
-   XrmSetDatabase (gv_display, gv_database);
-
 
 /*### initializing widget set and creating application shell #########################*/
 
--- a/src/resource.c	2007-08-27 17:20:30.000000000 +0200
+++ b/src/resource.c	2007-08-27 17:08:50.000000000 +0200
@@ -114,13 +114,14 @@
   #######################################################*/
 
 XrmDatabase
-resource_buildDatabase (XrmDatabase gvdb,
+resource_buildDatabase (
                         Display *display,
                         char *app_class,
                         char *app_name,
                         int *argcP,
                         char **argv)
 {
+  XrmDatabase gvdb = XtDatabase(display);
   XrmDatabase db = NULL;
   String *sP;
   String s,t, rpath;
@@ -147,6 +148,9 @@
   }
 
   XrmCombineDatabase (gvdb, &db, True);
+  /* CombineDatabase destroyed gvdb==XtDatabase(display), which
+   * XtResolvePathname will access soon, so repair it: */
+  XrmSetDatabase (display, db);
 
   /* ### user resources ################# */
   INFMESSAGE(checking for user resources)
--- a/src/resource.h	2007-06-27 16:42:13.000000000 +0200
+++ b/src/resource.h	2007-08-27 17:09:25.000000000 +0200
@@ -38,9 +38,8 @@
 #endif
 );
 
-extern XrmDatabase  resource_buildDatabase (
+extern XrmDatabase resource_buildDatabase (
 #if NeedFunctionPrototypes
-  XrmDatabase ,                                           
   Display *,
   char *,
   char *,

Reply via email to