Bug report #20790
QGIS crashes computer due to lack of memory
|Affected QGIS version:||3.5(master)||Regression?:||No|
|Operating System:||Easy fix?:||No|
|Pull Request or Patch supplied:||No||Resolution:|
|Crashes QGIS or corrupts data:||Yes||Copied to github as #:||28610|
Whilst browsing a local file folder which contains a number of sub-folders and zip files using the Browser widget, QGIS does not open the folder but displays a blue moving circle.
Using Microsoft Resource Monitor, QGIS was observed to start to consume all memory resources. If QGIS Desktop is not exited, this will result in a fatal crash of the computer (blue screen), due to the lack of memory.
The error is repeatable for this particular folder. There is no problem viewing the folder with Microsoft File Explorer.
However, other folders can be browsed normally.
#5 Updated by Harry Clarke over 2 years ago
Routines within QGIS should check that there is memory available before trying to use it, which would prevent a hard crash of the computer.
The rationale for the pre-emptive scanning of ZIP files needs to be reviewed, and the default. In the folder that caused the problem there were several very large zip files. Maybe some checks on size of ZIP file, and time to open (e.g. 5 seconds) should be constrained in basic mode - i.e. give up scanning if too large or takes too long to open.