[QGIS-Developer] Qgis keeps crashing

Mark Johnson mj10777 at googlemail.com
Fri May 5 23:14:05 PDT 2017


>
> When I am using the georeferencer plug in, the software is crashing and
> the "the application stopped unexpectedly" message appears. Does anyone
> knows why?


Here it would be important to learn, when using the georeferencer, what the
working conditions are:

How many gcp-points are being used when such crashes occur.
Does the application become 'sluggish' when moving the gcp-points around.
When using the right-mouse click on the GCP-Table, does it take a long time
for the Menu to show?

In the past I have noticed that when the amount of gcp point are > 300-400
such symptoms started - becoming unusable at around 1000.

Internally there are 3 collections of the gcp-points (QgsGCPList)
1) to check later for any changes that need to be saved to the points file
2) in the main georeferencer
3) the QgsGCPListWidget which filled the GCP-Table and rendered the points
in the georeferencer and qgis canvas

For each major change (point position, adding or removal) these lists were
being completely replaced, thus forcing the rebuilding of the GCP-Table and
the rendered points in both canvasess, which was a major cause of the
application becoming 'sluggish' and sometimes caused the application to
crash when the gcp-points where > 800.

To make matters worse, this action was also taking place during the initial
reading of the '.points' file, so that when the next point was being added,
the previous points were being deleted and then rebuilt with the next point.
With a project that contained > 1000 points the loading took over 20
minutes to load.

This problem was corrected around September 2016, so that now the GCP-Table
in the QgsGCPListWidget is only build after all the points have been read.

This did not resolve the problem that after major changes the list is still
being rebuild, instead of updating, adding or removing when needed.
Also that (it seems) that gcp-points in the georeferencer and qgis canvas
are being rendered that are outside of the visible area.

So if the georeferencer is the cause of such crashes, this I think would be
the area to look for.

---
The 'Proposal 7 QGIS Enhancment Georeferencer' of the 2017 QGIS Grant
Proposals, I believe resolves this issue.

The *.points' file has been replaced with a spatialite Database, so that
the rendering is done through a QgsVectorLayer.

The QgsGCPListWidget deals with the administration for the GCP-Table,
updating, adding or removed without replacing the whole QgsGCPList.
Also the needed MeanError calculations are being only done when needed.

With this solution, the 'sluggish' symptoms starts around 1100 points and
the occasional crashes (where the machine was very busy) no longer occur.

Mark
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20170506/e0ece55a/attachment.html>


More information about the QGIS-Developer mailing list