bug-ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DDD insists on opening session: problem in pre_main_loop line 2280 o


From: Chris van Engelen
Subject: Re: DDD insists on opening session: problem in pre_main_loop line 2280 of ddd.C
Date: Fri, 08 Apr 2005 10:11:22 +0200
User-agent: Mozilla/5.0 (X11; U; SunOS sun4u; en-US; rv:1.6) Gecko/20040219

On 04/07/05 08:54 Chris van Engelen wrote:<br>

I'm using DDD 3.3.10 on sparc-sun-solaris2.8, and having a problem
with sessions.

Every time I startup ddd, it uses session 110a0a008b000111280421000000083400058

After reading the manual, sections 2.3, I tried everything to delete the 
session:
deleting it in file-> save sessions, making [none] default etcetera.

But then I startup again, and again ddd uses session 
110a0a008b000111280421000000083400058
In this session I also lose all history.


Well, I'm a software developer, so I started debugging the debugger.
The problem is caused by lines 2277-2283 in ddd.C, function pre_main_loop:

  #if XtSpecificationRelease >= 6
     // Synchronize SESSION_ID and APP_DATA.session
     if (session_id == 0)
        XtVaGetValues(toplevel, XtNsessionID, &session_id, XtPointer(0));
     if (session_id != 0)
        app_data.session = session_id;
  #endif


After executing the call to XtVaGetValues, the session_id is suddenly set to:

(gdb) print session_id
$20 = 0x40d410 "110a0a008b000111285601500000083400074"


So this is the session which is then being opened by ddd, and causing the 
problem.
Could it be that there is another application on my Gnome desktop using
a resource called "sessionID" (which is the value of XtNsessionID in the call
to XtVaGetValues) ?

I'm not really good in this X stuff, so could anybody give me some pointers
on how to solve this, besides just removing the lines 2277-2283?

After investigating this a little further, it is my opinion that lines 2277-2283
in ddd.C (pre_main_loop) should be removed:

#if XtSpecificationRelease >= 6
    // Synchronize SESSION_ID and APP_DATA.session
    if (session_id == 0)
        XtVaGetValues(toplevel, XtNsessionID, &session_id, XtPointer(0));

    printf( "pre_main_loop: session id set to: %s\n", session_id );

    if (session_id != 0)
        app_data.session = session_id;
#endif

The call to XtVaGetValues provides a unique session ID from the session
manager, i.e., a string like "110a0a008b000111294615200000083400102"
This string is subsequently used as a DDD session identifier, so all
history items are saved in subdirectory:

  .ddd/sessions/110a0a008b000111294615200000083400102

However, normally a user does not save this special session before exiting DDD,
and therefore the next time DDD is started, all history of this special session
is lost!

Each time ddd is started, the last one or two characters of the session id
as returned by the session manager change, so the end is that all history
of each session is lost.

So for instance the drop down menu with "lookup" items always is empty,
which is really annoying.

If a user really wants to save a session, the user can easily do this
by specifying a useful name in the "save sessions" screen, and use
that session when starting again (e.g., using the =<session> hack,
or the --session option).

Therefore it is my suggestion to remove lines 2277-2283 in ddd.C (pre_main_loop)
This is what I did in my build, and since then it works fine.


Thanks,
--
Chris van Engelen
AimSys bv
Hilversum, The Netherlands
Phone: +31 35 689 1935
mailto:address@hidden

(Please set the line wrap parameter of your e-mail program to
a large value, like 200, in order to avoid that automatically
inserted new-line characters make included e-mails unreadable).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]