Bug 319542 - marble.knsregistry grows exponentially when it contains invalid XML characters
Summary: marble.knsregistry grows exponentially when it contains invalid XML characters
Status: RESOLVED FIXED
Alias: None
Product: marble
Classification: Applications
Component: general (show other bugs)
Version: 1.5 (KDE 4.10)
Platform: Other Linux
: NOR normal
Target Milestone: 1.6 (KDE 4.11)
Assignee: Dennis Nienhüser
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-08 20:13 UTC by Bernhard Beschow
Modified: 2013-06-01 15:57 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 1.6.0 / KDE 4.11.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernhard Beschow 2013-05-08 20:13:07 UTC
Our GHNS file for map themes is not well-formed. This seems to confuse KDE's GHNS dialog.

Reproducible: Always

Steps to Reproduce:
1. Install "Historical Map 1744" via GHNS dialog
2. Open and close the GHNS dialog several times
Actual Results:  
Watch the summary field of the "Historical Map 1744" theme grow exponentially with each opening of the dialog due to messed up encoding.

Expected Results:  
The encoding shouldn't be messed up and the file size should stay the same.

Note that the GHNS dialog always shows a "good" summary field, regardless of the content of the registry file.
Comment 1 Dennis Nienhüser 2013-05-10 15:41:22 UTC
I can reproduce that knewstuff3 from kdelibs writes broken registry files. Our provider files seem properly UTF-8 encoded to me. Xmllint is happy as well. Therefore I'd rather blame knewstuff3.

The reason that the summary field is displayed correctly should be that it displays the downloaded information only, not the information from the registry.

The patch in https://git.reviewboard.kde.org/r/110226/ writes correctly encoded registry files even if opening a broken one (if it is able to download the information from the remote provider file). It does only update them on changes though (installing, removing or upgrading some theme). We could change that to always write a new registry file after closing the dialog. Another approach to fix broken registry files would be to make the rewrite part of the migration, but that would mean that the file is only fixed if a) we have Internet access when it is called and b) we wait for the download to finish.
Comment 2 Dennis Nienhüser 2013-05-11 16:33:19 UTC
Git commit f6b0d7df0d3324376205b4238bf54c137d53d013 by Dennis Nienhüser.
Committed on 11/05/2013 at 15:01.
Pushed by nienhueser into branch 'master'.

Strip summary and author tags with excessive size.

M  +34   -2    src/marble_part.cpp
M  +1    -0    src/marble_part.h

http://commits.kde.org/marble/f6b0d7df0d3324376205b4238bf54c137d53d013
Comment 3 Dennis Nienhüser 2013-05-11 16:33:20 UTC
Git commit 2aa7a45e004a22287422b188655282fdd1e8b163 by Dennis Nienhüser.
Committed on 11/05/2013 at 15:04.
Pushed by nienhueser into branch 'master'.

Restrict maximum size of shown text.

M  +8    -5    src/lib/MapThemeDownloadDialog.cpp

http://commits.kde.org/marble/2aa7a45e004a22287422b188655282fdd1e8b163
Comment 4 Dennis Nienhüser 2013-06-01 15:57:58 UTC
Should be fixed in master.