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 121017 - config.xml gets resetted
config.xml gets resetted
Status: RESOLVED FIXED
Product: Pan
Classification: Other
Component: general
0.14.1
Other Linux
: High critical
: 0.14.2
Assigned To: Charles Kerr
Pan QA Team
: 121093 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2003-08-29 16:20 UTC by janvanbesien
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
invalid config.xml (7.78 KB, text/plain)
2003-08-29 19:36 UTC, Christophe Lambin
Details

Description janvanbesien 2003-08-29 16:20:35 UTC
I had version 0.14.0 installed with a proper configuration. My config.xml 
looked like this (i have placed *** on private data):

<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE config SYSTEM "config.dtd">
<config>
	<section key="Pan">
		<section key="Servers">
			<value key="Names" type="s">Eclipse Corner,telenet,
telenet-newsbin,Ugent</value>
		</section>
		<section key="State">
			<value key="Server" type="s">telenet</value>
			<value key="viewmode" type="n">1</value>
			<value key="Headers" type="n">323</value>
		</section>
		<section key="Mail">
			<value key="smtp_port" type="s">25</value>
			<value key="smtp_address" type="s">smtp.telenet.be</value>
		</section>
		<section key="Placement">
			<value key="Dock" type="s">Menubar\\0,0,0,0</value>
		</section>
		<section key="Paths">
			<value key="download_dir" 
type="s">/home/jan/download/usenet</value>
			<value key="data_dir" type="s">/home/jan/.pan/data/</value>
		</section>
		<section key="Cache">
			<value key="MaxMegs" type="s">10</value>
			<value key="FlushOnExit" type="s">false</value>
		</section>
		<section key="History: Prefs">
			<value key="0" type="s">/home/jan/download</value>
		</section>
		<section key="Display">
			<value key="show_group_pane" type="b">true</value>
			<value key="header_pane_is_threaded" type="b">true</value>
			<value key="show_header_pane" type="b">true</value>
			<value key="show_article_pane" type="s">true</value>
			<value key="navigate_cached_only" type="s">false</value>
			<value key="navigate_read_on_select" type="s">true</value>
			<value key="collapse_group_names" type="b">false</value>
			<value key="do_wrap" type="b">false</value>
			<value key="Show_All_Headers_In_Body" type="b">false</value>
			<value key="Mute_Quoted_text" type="b">false</value>
			<value key="color_subject_column" type="b">true</value>
			<value key="text_quote_chars" type="s">:&gt;|}</value>
			<value key="column_order" type="s">1|2|4|3|5|6|7</value>
			<value key="pane_layout" type="s">1gta</value>
			<value key="body_pane_custom_font" type="s">Courier 14</value>
			<value key="body_pane_monospace_font" type="s">Courier 
14</value>
			<value key="body_pane_custom_font_enabled" type="b">true</value>
			<value key="score_color_watched_background" 
type="s">#ffffffffffff</value>
			<value key="group_pane_enabled" type="b">true</value>
			<value key="header_plane_threading_enabled" 
type="b">true</value>
			<value key="header_pane_enabled" type="b">true</value>
			<value key="body_pane_enabled" type="b">true</value>
			<value key="group_pane_collapse_group_names" 
type="b">false</value>
			<value key="body_pane_wrap_enabled" type="b">false</value>
			<value key="body_pane_monospace_font_enabled" 
type="b">true</value>
			<value key="body_pane_show_all_headers" type="b">false</value>
			<value key="body_pane_mute_quoted_text" type="b">false</value>
			<value key="pane_mode" type="n">1</value>
			<value key="show_body_pane" type="b">true</value>
			<value key="use_fixed_font" type="b">false</value>
		</section>
		<section key="General">
			<value key="download_bodies_too" type="s">false</value>
		</section>
		<section key="Geometry">
			<value key="vpaned" type="n">362</value>
			<value key="hpaned" type="n">301</value>
			<value key="group_column_0" type="n">20</value>
			<value key="group_column_1" type="n">170</value>
			<value key="group_column_2" type="n">36</value>
			<value key="group_column_3" type="n">33</value>
			<value key="group_column_4" type="n">350</value>
			<value key="thread_pane_column_0" type="n">16</value>
			<value key="thread_pane_column_1" type="n">16</value>
			<value key="thread_pane_column_2" type="n">525</value>
			<value key="thread_pane_column_3" type="n">30</value>
			<value key="thread_pane_column_4" type="n">120</value>
			<value key="thread_pane_column_5" type="n">40</value>
			<value key="main_window_x" type="n">46</value>
			<value key="main_window_y" type="n">0</value>
			<value key="main_window_width" type="n">1227</value>
			<value key="main_window_height" type="n">906</value>
			<value key="compose_x" type="n">46</value>
			<value key="compose_y" type="n">0</value>
			<value key="compose_width" type="n">1151</value>
			<value key="compose_height" type="n">820</value>
			<value key="header_pane_column_0" type="n">16</value>
			<value key="header_pane_column_1" type="n">16</value>
			<value key="header_pane_column_2" type="n">502</value>
			<value key="header_pane_column_3" type="n">40</value>
			<value key="header_pane_column_4" type="n">40</value>
			<value key="header_pane_column_5" type="n">120</value>
			<value key="header_pane_column_6" type="n">50</value>
			<value key="main_window_max" type="b">true</value>
			<value key="task_manager_2_x" type="n">46</value>
			<value key="task_manager_2_y" type="n">0</value>
			<value key="task_manager_2_width" type="n">600</value>
			<value key="task_manager_2_height" type="n">400</value>
			<value key="task_manager_2_column_0" type="n">200</value>
			<value key="task_manager_2_column_1" type="n">50</value>
			<value key="task_manager_2_column_2" type="n">50</value>
			<value key="task_manager_2_column_3" type="n">100</value>
			<value key="task_manager_2_column_4" type="n">1500</value>
			<value key="log_dialog_3_x" type="n">46</value>
			<value key="log_dialog_3_y" type="n">0</value>
			<value key="log_dialog_3_width" type="n">1227</value>
			<value key="log_dialog_3_height" type="n">906</value>
			<value key="log_dialog_3_column_0" type="n">20</value>
			<value key="log_dialog_3_column_1" type="n">198</value>
			<value key="log_dialog_3_column_2" type="n">1500</value>
		</section>
		<section key="History: Grouplist Toolbar Filter">
			<value key="0" type="s">***</value>
		</section>
		<section key="scoring">
			<value key="scorefile" type="s">/home/jan/News/Score</value>
		</section>
		<section key="behavior">
			<value key="flush_cache_on_exit" type="b">false</value>
		</section>
		<value key="appsweb_browser" type="s">opera %s</value>
		<section key="Eclipse Corner">
			<value key="Last_Grouplist_Update" type="s">1061659001</value>
			<value key="Address" type="s">news.eclipse.org</value>
			<value key="Port" type="n">119</value>
			<value key="Use_Newsrc" type="b">false</value>
			<value key="Newsrc_Filename" type="s"></value>
			<value key="Auth_Required" type="n">1</value>
			<value key="Username" type="s">***</value>
			<value key="Password" type="s">***</value>
			<value key="Max_Connections" type="n">2</value>
			<value key="Idle_Timeout_Secs" type="n">180</value>
		</section>
		<section key="telenet">
			<value key="Last_Grouplist_Update" type="s">1061759344</value>
			<value key="Address" type="s">news.telenet.be</value>
			<value key="Port" type="n">119</value>
			<value key="Use_Newsrc" type="b">false</value>
			<value key="Newsrc_Filename" type="s"></value>
			<value key="Auth_Required" type="n">1</value>
			<value key="Username" type="s">***</value>
			<value key="Password" type="s">***</value>
			<value key="Max_Connections" type="n">4</value>
			<value key="Idle_Timeout_Secs" type="n">180</value>
		</section>
		<section key="telenet-newsbin">
			<value key="Last_Grouplist_Update" type="s">1057916426</value>
			<value key="Address" type="s">newsbin.telenet.be</value>
			<value key="Port" type="n">119</value>
			<value key="Use_Newsrc" type="b">false</value>
			<value key="Newsrc_Filename" type="s"></value>
			<value key="Auth_Required" type="n">1</value>
			<value key="Username" type="s">***</value>
			<value key="Password" type="s">***</value>
			<value key="Max_Connections" type="n">2</value>
			<value key="Idle_Timeout_Secs" type="n">180</value>
		</section>
		<section key="Ugent">
			<value key="Last_Grouplist_Update" type="s">1057926595</value>
			<value key="Address" type="s">localhost</value>
			<value key="Port" type="n">1500</value>
			<value key="Use_Newsrc" type="b">false</value>
			<value key="Newsrc_Filename" type="s"></value>
			<value key="Auth_Required" type="n">0</value>
			<value key="Username" type="s"></value>
			<value key="Password" type="s"></value>
			<value key="Max_Connections" type="n">2</value>
			<value key="Idle_Timeout_Secs" type="n">180</value>
		</section>
	</section>
</config>

There's nothing wrong with that, notice that i have opera as browser (not 
the default mozilla).

After installing 0.14.1 (from rpm) everything worked perfect, except that 
clicking urls in messages did nothing. I looked in the preference dialog 
box, en saw that it said mozilla, while there was still opera in de config.
xml. After changing that (and restarting pan), i lost al my configuration 
settings, and the config.xml was overwritten with the default.

summary:

-install pan 0.14.0
-configure it (do not use mozilla as browser)
-install pan 0.14.1
-change the browser settings
Comment 1 Charles Kerr 2003-08-29 16:57:10 UTC
You've got a key of "appsweb_browser" rather than <apps><web_browser>,
which was a bug before 0.14.1... so that explains why the browser
isn't showing through.

However, are you also saying that the entire config file is being
overwritten, or just the browser line?  If the entire config file is
being overwritten, I'd be _very_ interested in getting a step-by-step
recipe of how to reproduce that.  IMO that would be important enough
to put out an emergency 0.14.2 release.
Comment 2 Christophe Lambin 2003-08-29 19:36:36 UTC
Created attachment 19607 [details]
invalid config.xml
Comment 3 Christophe Lambin 2003-08-29 19:40:33 UTC
I managed to reproduce this problem as follows:

1. start with an empty .pan directory
2. run pan, go through new user dialog
3. stop pan
4. copy jan's config.xml to .pan
5. start pan, change browser settinf
6. stop pan
7. start pan

When Pan then starts, it dumps the following to the console:
/home/clambin/.pan/config.xml:171: error: Opening and ending tag
mismatch: section and config
</config>
         ^
/home/clambin/.pan/config.xml:171: error: Premature end of data in tag
config
</config>
         ^
(Null) - file pan-config.c: line 559 (pan_config_load): assertion
`doc!=NULL' failed

So, the config.xml is invalid. Looking at what it looked like after
step 7, we see:

    </section>
    <section key="behavior">
    <value key="appsweb_browser" type="s">opera %s</value>
    <section key="apps">

So, the wrong 'appsweb_browser' is now written as an incomplete
section (missing /section tag).  So, when Pan starts in step 7, it is
unable to read config.xml and loses all settings.

Comment 4 Charles Kerr 2003-08-29 22:40:02 UTC
Looks like pan-config had a long-standing bug that would fail to write
a "</section>" piece if the section had no child nodes.

Fixed in CVS:

http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan/base&command=DIFF_FRAMESET&file=pan-config.c&rev1=1.36&rev2=1.37&root=/cvs/gnome

Chris: could you review this over the weekend?  If you agree that it
looks OK then I'll roll 0.14.2 with this being the only change made
between 0.14.1 and 0.14.2.
Comment 5 Christophe Lambin 2003-08-30 00:06:08 UTC
One small change:

http://cvs.gnome.org/bonsai/cvsview2.cgi?
diff_mode=context&whitespace_mode=show&subdir=pan/pan/base&command=DI
FF_FRAMESET&file=pan-config.c&rev1=1.37&rev2=1.38&root=/cvs/gnome

This ensures config.xml is written in UTF-8. Otherwise, 8bit 
characters are written as '&#XX;', which parse_and_load_file() 
doesn't convert.

Otherwise, it looks fine to me.
Comment 6 Christophe Lambin 2003-08-30 08:13:28 UTC
Ugh. Internet Explorer's not very good at entering long lines of text.
Here's the patch again:

http://cvs.gnome.org/bonsai/cvsview2.cgi?diff_mode=context&whitespace_mode=show&subdir=pan/pan/base&command=DIFF_FRAMESET&file=pan-config.c&rev1=1.37&rev2=1.38&root=/cvs/gnome
Comment 7 Charles Kerr 2003-08-31 17:07:15 UTC
*** Bug 121093 has been marked as a duplicate of this bug. ***