Bug report #1081

Old .qgs project causes GUI mess

Added by Mateusz Loskot - over 16 years ago. Updated about 15 years ago.

Status:Closed
Priority:Low
Assignee:Tom Elwertowski
Category:Project Loading/Saving
Affected QGIS version: Regression?:No
Operating System:OS X Easy fix?:No
Pull Request or Patch supplied: Resolution:wontfix
Crashes QGIS or corrupts data: Copied to github as #:11141

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).
2. 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.
3. I clicked OK on the message box and GUI got completely messed (3.png)
4. I resized the messed main Window to present the destruction better (4.png)

old_postgis_project.qgs - 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. (24.1 KB) Mateusz Loskot -, 2008-05-10 04:33 AM

1.png - Step 1: launched QGIS (208 KB) Mateusz Loskot -, 2008-05-10 04:34 AM

2.png - Step 2: File -> Open Project -> old_postgis_project.qgs loaded (220 KB) Mateusz Loskot -, 2008-05-10 04:34 AM

3.png - Step 3: clicked OK on the message box and GUI got completely messed (190 KB) Mateusz Loskot -, 2008-05-10 04:35 AM

4.png - Step 4: resized the messed main Window to present the destruction better (213 KB) Mateusz Loskot -, 2008-05-10 04:35 AM

History

#1 Updated by Tim Sutton about 16 years ago

Tom could you look at this?

Thanks

Tim

#2 Updated by Tom Elwertowski about 16 years ago

  • Resolution set to wontfix
  • Status changed from Open to Closed

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.'

#3 Updated by Mateusz Loskot - about 16 years ago

Tom,

Thanks for the explanation. I agree with your decision.

#4 Updated by Anonymous about 15 years ago

Milestone Version 1.0.0 deleted

Also available in: Atom PDF