Bug report #6691

Heatmap has memory leak

Added by Aren Cambre about 10 years ago. Updated over 9 years ago.

Category:C++ Plugins
Affected QGIS version:1.8.0 Regression?:No
Operating System:Windows 7 x64 Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:Yes Copied to github as #:15858


I have been running a heatmap for 12 hours now on a layer with just over 700,000 points. Except for specifying input layer and output, I accepted defaults when I kicked it off.

qgis.exe's memory usage gradually rose throughout the running of this heat map, starting at around 150MB and gradually ballooning to almost 1.7 GB, which is dangerously close to the Windows 2 GB 32-bit process limit.

The gradual increase in memory usage was a lot faster at start. Now (12 hours later) it may increase by 1K every few minutes.

I am guessing there is a memory leak because running a GRASS v.kernel heatmap on the same dataset never consumes more than 200MB of RAM.

Also, not sure if this matters, but my output TIFF file is currently 933 KB and hasn't been touched since 1 hour after I kicked off this job. If that's not expected behavior, that suggests that something has gone over the cliff on processing and is taking too long to continue progress.

Currently, the heatmap feature is hammering one of my cores (this really needs multithread!).

Associated revisions

Revision b567a6d6
Added by Nyall Dawson over 9 years ago

Refactor to avoid creating multiple QgsDistanceArea objects and recalculation of static or unused variables. Results in massive speed increase and fixes #6756, #6691 and #6692.

Revision 9a81fa76
Added by Nathan Woodrow over 9 years ago

Merge pull request #461 from nyalldawson/heatmap_fixes

Massive speedup to heatmap plugin (fix #6756, fix #6691 and fix #6692)


#1 Updated by Aren Cambre about 10 years ago

qgis finally conked out and crashed at about 12.5 hours.

#2 Updated by Aren Cambre about 10 years ago

  • Crashes QGIS or corrupts data changed from No to Yes

#3 Updated by Aren Cambre about 10 years ago

  • Category set to C++ Plugins

#4 Updated by Giovanni Manghi almost 10 years ago

  • Priority changed from Normal to High

#5 Updated by Nathan Woodrow over 9 years ago

  • Status changed from Open to Closed

Also available in: Atom PDF