Bug report #9734

[Composer] drawing rectangle causes high CPU usage resulting in hang ups

Added by Evaldas Micius almost 9 years ago. Updated over 8 years ago.

Category:Map Composer/Printing
Affected QGIS version:2.2.0 Regression?:No
Operating System:Windows 7 32bit Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:18287


Adding rectangle or other shape (triangle, ellipse) causes constant high CPU usage (one core used 100%). High core usage causes save/open dialogs become unresponsive.
Possible source of bug might be related to Qt transparency parameters, because CPU usage drops to normal values as soon as object transparency is set to 100 (see screenshots).

Bug is also present in QGIS master, however it was not present in QGIS 2.0.

I'm running 2.2.0-2 QGIS on 32 bit version of Windows 7.
QGIS installed via OSGeo4W installer with no 3rd party plugins.

Capture.PNG (143 KB) Evaldas Micius, 2014-03-06 11:07 PM

Capture2.PNG (152 KB) Evaldas Micius, 2014-03-06 11:07 PM

Capture3.PNG (163 KB) Evaldas Micius, 2014-03-06 11:07 PM

Clipboard02.png (64 KB) Evaldas Micius, 2014-03-09 11:26 PM

log.txt Magnifier (3.3 KB) Evaldas Micius, 2014-03-09 11:26 PM

full_log.txt Magnifier (83 KB) Evaldas Micius, 2014-03-09 11:26 PM

Associated revisions

Revision 2b3108f9
Added by Nyall Dawson over 8 years ago

Fix high cpu usage with win32 builds when using shapes in composer (fix #9933, #9957, #9734)


#1 Updated by Nyall Dawson almost 9 years ago

I can't reproduce this. Is this on a blank project or do you only see it with a specific project?

Its possible the debug log may help - try downloading debugview from http://technet.microsoft.com/en-au/sysinternals/bb896647.aspx
Then run the current Dev version and start debugview (from memory you select something like enable global win32 from the menus to see qgis debug messages). Then reproduce this issue and see if anything is being printed to the log. If so, copy and paste it here for me.

#2 Updated by Evaldas Micius over 8 years ago

I'm getting the bug on a blank project.

Updated to most recent dev version - the bug remains :(

If I draw a rectangle or any other shape on composer space and try to open any save/open dialog, e.g. "load template", a window pops up, but widgets fail to draw (screenshot attached). After a while widgets get drawn, however if I browse to some directory, file listings refresh only if I move the window. I guess it's related to high CPU usage, since with an empty composer canvas everything works fine.

The interesting part is that everything is OK while I draw the rectangle. I can mess around while in rubberband mode. but as soon as I release mouse - CPU usage hits the ceiling. If I delete the object, everything goes to normal.

Debug log doesn't seem to give any information. Attached it anyway (the part where the bug is and full log from application start).

#3 Updated by Evaldas Micius over 8 years ago

One more interesting detail - CPU drops to normal if I change blending mode of the rectangle to any other value besides "Normal". Resetting blending mode to normal causes the bug to reappear.

[Edit] Buggy behaviour disappears if I zoom to any empty region of the canvas where the rectangle is not visible.

#4 Updated by Nyall Dawson over 8 years ago

Can you please test again with the current 2.3 dev version? There's been a small change which may have fixed this issue.

#5 Updated by Nyall Dawson over 8 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF