Fix for "XMI load in git version fails"
On loading the file, after a few seconds Umbrello freezes the entire system and `top` indicates in excess of 19GB VIRT and several gigabytes RES - presumably swapping ensues. I was able to trace it to UMLDoc::loadFromXMI (umldoc.cpp:2478) emit sigWriteToStatusBar(i18n("Setting up the document...")); qApp->processEvents(); // give UI events a chance <--- line 2478 activateAllViews(); and apparently there are very many events queued. Some seconds later the freeze occurs. On one repetition I was able to press <Ctrl-C> in gdb just before the freeze, and that's where the bad `rect` parameter of UMLScene::drawBackground showed up: #4 0x000000000073ba06 in UMLScene::drawBackground (this=.., painter=.., rect=...) at /tools/umbrello/umbrello/umlscene.cpp:3760 (gdb) p rect $2 = (const QRectF &) @0x7fffffffa3d0: {xp = -4160651296.6437497, yp = -18968990857.816666, w = 4026436738.6874995, h = 33643115861.033333} Code change: umbrello/umlscene.cpp - Define static const qreal maxCanvasSize with value 100000.0 (subject to discussion - could be enlarged). - In function drawBackground reject the request if rect's x or y is outside the range -maxCanvasSize to maxCanvasSize, or if rect's width or height is less than 0 or greater than maxCanvasSize. CCBUG:449393