Bug report #17940

Project file blows up with Metadata

Added by Tim Sutton over 6 years ago. Updated over 6 years ago.

Affected QGIS version:master Regression?:Yes
Operating System:MacOS (probably all) Easy fix?:No
Pull Request or Patch supplied:No Resolution:fixed/implemented
Crashes QGIS or corrupts data:Yes Copied to github as #:25836


My favourite project has been gradualy getting slower and slower to open and use. I opened the project today in VIM and see that it has thousands of repeated address blocks in the metadata:


My project file now has grown to 3.9 GB:

-rwxr-xr-x@ 1 timlinux  staff   3.9G Jan 23 10:52 Swellendam-QGIS3.qgs

Associated revisions

Revision 36bf093b
Added by Nyall Dawson over 6 years ago

Fix metadata address element doubles with each project write

elementsByTagName can be dangerous, because it returns children
recursively. In this case the contact "address" element contained
a child element for the street address, also named "address".

So when restoring a project with contact addresses in the metadata,
each address was created twice...

Fixes #17940


#1 Updated by Tim Sutton over 6 years ago

Here is the preceding snippet:

            <proj4>+proj=longlat +datum=WGS84 +no_defs</proj4>
            <description>WGS 84</description>
          <spatial dimensions="2" maxz="0" minx="440611.25531954586040229" minz="0" maxx="454667.28530003415653482" maxy="6244256.02663078531622887" crs="EPSG:32734" miny="6237711.73648276180028915”/>

#2 Updated by Nyall Dawson over 6 years ago

  • Regression? changed from No to Yes
  • Crashes QGIS or corrupts data changed from No to Yes

#3 Updated by Nyall Dawson over 6 years ago

  • % Done changed from 0 to 100
  • Status changed from Open to Closed

#4 Updated by Giovanni Manghi over 6 years ago

  • Resolution set to fixed/implemented

Also available in: Atom PDF