Bug report #3369

Annotations disappear

Added by pope965176 - about 13 years ago. Updated over 8 years ago.

Status:Closed
Priority:Low
Assignee:Marco Hugentobler
Category:Project Loading/Saving
Affected QGIS version:master Regression?:No
Operating System:Windows Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:13429

Description

I created text annotations in a QGIS project and the following problems have been noted:

1. Following the initial creation of the annotations, I saved the project. Several days later, in the same project I panned from one feature to another and noticed the annotations, all of them, had disappeared. I zoomed to extents they were gone. I restarted and they did not come back.

2. I started redoing the annotations. I saved the project. 5 minutes later QGIS crashed when I reopened the project the annotations were gone again.

3. When the "zoom last" tool used the annotations do not follow the zoom, that is to say they do not stay fixed to their x y coordinate. This can be remedied using the pan tool. If one pans the map, the annotations snap back to the appropriate position.

patch_for_3369_part_3.txt Magnifier (1.25 KB) JD -, 2010-12-30 04:04 PM

sampleData.qgs - Sample data which had attributes that subsequemtly disappeared. (73.7 KB) pope965176 -, 2011-01-20 01:32 PM

History

#1 Updated by JD - about 13 years ago

Doesn't crash for me with QGIS r14982M on Kubuntu 10.04, Qt 4.6.2

#2 Updated by Marco Hugentobler about 13 years ago

I can reproduce 3. (zoom last tool).

The project loading / saving seems to work for me so far. Could you attach a project file where the save/load problem occurs?

Thanks,
Marco

#3 Updated by Marco Hugentobler about 13 years ago

Zoom previous / zoom next is fixed in a630e4a8 (SVN r14988)

#4 Updated by pope965176 - about 13 years ago

  • incorrectly typed. The project file that was just uploaded has ANNOTATIONS which disappeared not ATTRIBUTES. The attributes are all still there.

#5 Updated by Marco Hugentobler about 13 years ago

The attached project file indeed does not contain any annotation item. Normally, there should be elements <TextAnnotationItem> or <FormAnnotationItem> in the project file, like below. Are you sure the annotation items have been there (also in the project file) at the beginning? And could you describe under what circumstances they appeared (e.g. the steps you did in between)?

sample item xml:

<TextAnnotationItem document="<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;&#xa;&lt;html>&lt;head>&lt;meta name="qrichtext" content="1" /><style type="text/css"> p, li { white-space: pre-wrap; } </style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;"> <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Sample text</p></body></html>">
<AnnotationItem frameHeight="100" canvasPosX="404.9999999999723" mapPosX="701434.1818181816" canvasPosY="358.0000000000069" mapPositionFixed="1" mapPosY="228699.2272727273" frameBackgroundColorAlpha="255" frameBorderWidth="1" visible="1" offsetX="50" offsetY="-50" frameWidth="200" frameBackgroundColor="#ffffff" frameColor="#000000">
<symbol outputUnit="MM" alpha="1" type="marker" name="marker symbol">
<layer pass="0" class="SimpleMarker" locked="0">
<prop k="angle" v="0"/>
<prop k="color" v="255,0,0,255"/>
<prop k="color_border" v="0,0,0,255"/>
<prop k="name" v="circle"/>
<prop k="offset" v="0,0"/>
<prop k="size" v="2"/>
</layer>
</symbol>
</AnnotationItem>
</TextAnnotationItem>

#6 Updated by pope965176 - about 13 years ago

Exactly, the attached file doesn't contain annotations. AS I said in the initial bug reporting: 1. Created the annotations pertinent to the features where labeling was problematic for a field map. 2. I saved the project. 3. QGIS crashed and gave me the "QGIS has encountered and error and must close..." AFTER I had saved the project. 4. When next I opened the project, the annotations were gone. This has happened twice.

#7 Updated by pope965176 - about 13 years ago

Replying to [comment:6 pope965176]:

Exactly, the attached file doesn't contain annotations. AS I said in the initial bug reporting: 1. Created the annotations pertinent to the features where labeling was problematic for a field map. 2. I saved the project. 3. QGIS crashed and gave me the "QGIS has encountered and error and must close..." AFTER I had saved the project. 4. When next I opened the project, the annotations were gone. This has happened twice.

NOTE: QGIS DID NOT crash as a result of the save. The crash was resulting from something else (I believe I foolishly tried to pan the map).

#8 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#9 Updated by Paolo Cavallini almost 12 years ago

  • Crashes QGIS or corrupts data set to No
  • Target version changed from Version 1.7.4 to Version 1.8.0
  • Affected QGIS version set to master

#10 Updated by Paolo Cavallini over 11 years ago

  • Target version changed from Version 1.8.0 to Version 2.0.0

#11 Updated by Jürgen Fischer over 9 years ago

  • Target version changed from Version 2.0.0 to Future Release - Lower Priority

#12 Updated by Nyall Dawson over 8 years ago

  • Pull Request or Patch supplied set to No
  • Status changed from Open to Closed

Closing due to age of bug. If it's still an issue with the current release, please re-open.

Also available in: Atom PDF