After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 120079 - Repeated running deletes configuration
Repeated running deletes configuration
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
pre-0.14.1 betas
Other Linux
: Normal critical
: 0.14.1
Assigned To: Charles Kerr
Pan QA Team
Depends on:
Blocks:
 
 
Reported: 2003-08-17 18:12 UTC by bloch
Modified: 2006-06-18 05:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Config.xml after this bug has taken effect. (1.19 KB, text/plain)
2003-08-17 18:13 UTC, bloch
Details

Description bloch 2003-08-17 18:12:15 UTC
After creating a new installation with 0.14.0.95, I subscribed to a number
of newsgroups from a particular server.

Upon closing and re-opening Pan, no server is listed in the Server menu and
there are no groups or headers in the main window.

All the files are in the relevant subdirectory of .pan, but config.xml
seems to have been overwritten with all the server and subscription
information removed.  This has happened to the backup copy of config.xml too.
Comment 1 bloch 2003-08-17 18:13:21 UTC
Created attachment 19293 [details]
Config.xml after this bug has taken effect.
Comment 2 Charles Kerr 2003-08-17 19:22:23 UTC
Brad sims reports a similar experience:

http://mail.gnu.org/archive/html/pan-users/2003-08/msg00142.html
Comment 3 Charles Kerr 2003-08-18 16:52:23 UTC
Adam: I know you're expecting me to say this but ... I can't reproduce
the bug. :)

It looks like, if we get to serverlist_save() with an empty list of
servers, then Pan will leave us with a config file that looks like
yours.  However, I don't know how we can get to serverlist_save()
without any servers.

Can you give me step-by-step instructions on how to reproduce this?
Here's what I tried:

(1) moved ~/.pan to ~/.pan.bak to get a clear ~/.pan directory
(2) started up 0.14.0.95
(3) entered in my information, including a server
(4) got a list of groups from the server
(5) exited pan
(6) looked at ~/.pan/config.xml, it looked okay & had server info
(7) restarted pan, it had the server info too
Comment 4 bloch 2003-08-18 23:01:50 UTC
Charles:  just as predictably, I can't reproduce it now either, in
spite of my best efforts.
Comment 5 Charles Kerr 2003-08-19 15:48:25 UTC
Adam: :)
Comment 6 Charles Kerr 2003-08-19 15:50:49 UTC
http://mail.gnu.org/archive/html/pan-users/2003-08/msg00214.html

From:        Brad Sims
Subject:     [Pan-users] corrupted config.xml in 0.95
Date:        Mon, 18 Aug 2003 18:29:55 -0500
User-agent:  KMail/1.5.3

I just had it do it again. Here is the contents of the config.xml
I was just reading a newsgroup, closed it without marking all
read, and  reopened pan. I did know that it had done somthing
wrong when I opened pan and had to redo my header pane layout.

Status log shows nothing useful.

http://mail.gnu.org/archive/html/pan-users/2003-08/txt00000.txt
Comment 7 Charles Kerr 2003-08-19 23:17:18 UTC
Aha, I think I've sussed it out.  I'll test more on this tonight.
Comment 8 Charles Kerr 2003-08-20 13:15:31 UTC
Working with the theory that serverlist_save() is the culprit.  If
/Pan/Servers/Names is corrupt -- such as if it has two commas right
next to each other, so there's a zero-length Server naem -- then the
call to pan_config_clean_section (/Pan/Servername) will really be
pan_config_clean_section (/Pan/), which wipes the entire config.

This is the only call to pan_config_clean_section() in Pan, so I'm
reasonably sure that this is the problem.

The quick-and-dirty fix is to check for zero-length strings here, but
I'm interested in first finding out how /Pan/Servers/Names is
corrupted.  If a zero-length server name exists for server2, then
serverlist_save() will write the config string as (server1,,server3).
 But how can we get a zero-length server name?  None of the bug
reports has indicated that they were doing anything unusual with the
servers.

Comment 9 Charles Kerr 2003-08-20 14:58:40 UTC
Adam: what version of Pan did you upgrade from?
Comment 10 bloch 2003-08-20 15:03:09 UTC
It was 0.14.0 originally, I think, though that may have been a
downgrade from one of the more recent betas in an attempt to fix the
corrupted binary problem.
Comment 11 Charles Kerr 2003-08-20 18:43:27 UTC
Looks like, if the name passed in was empty, server_fetch() could
return a Server pointer to a live object with no name.

I still haven't been able to reproduce this, or figure out how to
trigger it, but I'm going to check in the fix anyway to get 0.14.0.96
wrapped up.

I've confirmed that the checkin will filter noname servers out of
munged /Pan/Servers/Names entries.
http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan/base&command=DIFF_FRAMESET&file=serverlist.c&rev1=1.31&rev2=1.32&root=/cvs/gnome