Opened 16 years ago

Closed 16 years ago

Last modified 15 years ago

#1081 closed defect (wontfix)

Old .qgs project causes GUI mess

Reported by: mloskot Owned by: telwertowski
Priority: minor: annoyance Milestone:
Component: Project Loading / Saving Version: Trunk
Keywords: postgis qgs project Cc:
Must Fix for Release: No Platform: OS X
Platform Version: 10.5 (Leopard) Awaiting user input: no

Description

I've experienced strange behavior of latest QGIS 0.10.0 under Mac OS X 10.5. I have a .qgs project (old_postgis_project.qgs) composed with a few PostGIS layers. I created it using 0.9 version. I copied this project file to another computer without database used in the project definition and tried to open it with QGIS. Here are steps I took, with references to screenshots illustrating every stage.

  1. Launched QGIS (1.png).
  1. File -> Open Project -> old_postgis_project.qgs loaded. The screen 2.png shows error message I got after clicked Open button in file selection dialog.
  1. I clicked OK on the message box and GUI got completely messed (3.png)
  1. I resized the messed main Window to present the destruction better (4.png)

Attachments (5)

old_postgis_project.qgs (24.1 KB ) - added by mloskot 16 years ago.
Old project file with PostGIS layers. The ticket is about using the project on machine without PostgreSQL database neither PostGIS layers used in this project.
1.png (208.1 KB ) - added by mloskot 16 years ago.
Step 1: launched QGIS
2.png (220.0 KB ) - added by mloskot 16 years ago.
Step 2: File -> Open Project -> old_postgis_project.qgs loaded
3.png (189.6 KB ) - added by mloskot 16 years ago.
Step 3: clicked OK on the message box and GUI got completely messed
4.png (212.5 KB ) - added by mloskot 16 years ago.
Step 4: resized the messed main Window to present the destruction better

Download all attachments as: .zip

Change History (10)

by mloskot, 16 years ago

Attachment: old_postgis_project.qgs added

Old project file with PostGIS layers. The ticket is about using the project on machine without PostgreSQL database neither PostGIS layers used in this project.

by mloskot, 16 years ago

Attachment: 1.png added

Step 1: launched QGIS

by mloskot, 16 years ago

Attachment: 2.png added

Step 2: File -> Open Project -> old_postgis_project.qgs loaded

by mloskot, 16 years ago

Attachment: 3.png added

Step 3: clicked OK on the message box and GUI got completely messed

by mloskot, 16 years ago

Attachment: 4.png added

Step 4: resized the messed main Window to present the destruction better

comment:1 by mloskot, 16 years ago

Component: GUIProject Loading / Saving

comment:2 by timlinux, 16 years ago

Milestone: Version 1.0.0
Owner: changed from nobody to telwertowski

Tom could you look at this?

Thanks

Tim

comment:3 by telwertowski, 16 years ago

Priority: critical: causes crash or data corruptionminor: annoyance or enhancement
Resolution: wontfix
Status: newclosed

I consider the priority of this bug to be minor. Although it results in visual corruption, it does not cause a crash or corrupt data. Since the visual corruption is caused by attempting to open a project for which no layers are present, a workaround is to quit, restart and don't open the project again until the layers are available.

For qgis 1.0, I consider this bug 'wontfix.' The fix is to redesign the render code. This could be a task for the next major release (2.0) but not sooner.

This type of visual corruption occurs because Mac paint events are not interruptible. Interrupts are caused by calls to processEvents() inside paint events; removing them requires a redesign.

I suspect there are also Mac problems using a QGraphicsScene with an offscreen bitmap. Mac rendering has been unstable ever since QGraphicsScene came into use for map rendering. The conflict is that QGraphicsScene tries to do visual optimizations and qgis render code also tries to do visual optimizations. I recommend using either QGraphicsScene or an offscreen bitmap but not both. Mixing the two seems to confuse Qt/Mac.

One final comment. I encounter some sort of visual corruption almost every time I use qgis (on a Mac). Usually the window title, window controls and toolbar buttons get drawn inside the map canvas. Doing additional work redraws the items correctly. Doing yet more work causes more visual corruption again. The details of the corruption change with each Qt release but will continue until map rendering becomes Mac 'event safe.'

comment:4 by mloskot, 16 years ago

Tom,

Thanks for the explanation. I agree with your decision.

comment:5 by (none), 15 years ago

Milestone: Version 1.0.0

Milestone Version 1.0.0 deleted

Note: See TracTickets for help on using tickets.