Opened 13 years ago

Last modified 13 years ago

#3369 new bug

Annotations disappear

Reported by: pope965176 Owned by: mhugent
Priority: major: does not work as expected Milestone: Version 1.7.0
Component: Project Loading / Saving Version: 1.6.0
Keywords: annotation Cc:
Must Fix for Release: No Platform: Windows
Platform Version: Awaiting user input: yes

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.
  1. I started redoing the annotations. I saved the project. 5 minutes later QGIS crashed when I reopened the project the annotations were gone again.
  1. 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.

Attachments (2)

patch_for_3369_part_3.txt (1.3 KB ) - added by JD 13 years ago.
sampleData.qgs (73.7 KB ) - added by pope965176 13 years ago.
Sample data which had attributes that subsequemtly disappeared.

Download all attachments as: .zip

Change History (10)

comment:1 by JD, 13 years ago

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

by JD, 13 years ago

Attachment: patch_for_3369_part_3.txt added

comment:2 by mhugent, 13 years ago

Owner: changed from nobody to mhugent

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

comment:3 by mhugent, 13 years ago

Zoom previous / zoom next is fixed in r14987

by pope965176, 13 years ago

Attachment: sampleData.qgs added

Sample data which had attributes that subsequemtly disappeared.

comment:4 by pope965176, 13 years ago

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

comment:5 by mhugent, 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="&lt;!DOCTYPE HTML PUBLIC &quot;-W3CDTD HTML 4.0EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;>&#xa;&lt;html>&lt;head>&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; />&lt;style type=&quot;text/css&quot;>&#xa;p, li { white-space: pre-wrap; }&#xa;&lt;/style>&lt;/head>&lt;body style=&quot; font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;&quot;>&#xa;&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;>Sample text&lt;/p>&lt;/body>&lt;/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>

comment:6 by pope965176, 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.

in reply to:  6 comment:7 by pope965176, 13 years ago

Replying to 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).

comment:8 by pcav, 13 years ago

Priority: critical: causes crash or data corruptionmajor: does not work as expected
Note: See TracTickets for help on using tickets.