GNOME Bugzilla – Bug 120079
Repeated running deletes configuration
Last modified: 2006-06-18 05:05:11 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.
Created attachment 19293 [details] Config.xml after this bug has taken effect.
Brad sims reports a similar experience: http://mail.gnu.org/archive/html/pan-users/2003-08/msg00142.html
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
Charles: just as predictably, I can't reproduce it now either, in spite of my best efforts.
Adam: :)
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
Aha, I think I've sussed it out. I'll test more on this tonight.
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.
Adam: what version of Pan did you upgrade from?
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.
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