Bug report #20790

QGIS crashes computer due to lack of memory

Added by Harry Clarke over 1 year ago. Updated over 1 year ago.

Status:Open
Priority:Normal
Assignee:-
Category:Browser
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

Description

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.

History

#1 Updated by Alessandro Pasotti over 1 year ago

  • Status changed from Open to Feedback

Can you please try with Settings -> Options -> Data Source -> Scan for contents in compressed files ... -> Set it to "NO"

Does this help?

#2 Updated by Harry Clarke over 1 year ago

Change Scan for contents in compressed files from "basic" to "no", and that solved the problem. QGIS was able to display the contents of the folder.

#3 Updated by Alessandro Pasotti over 1 year ago

I'm not really sure about what to do here: perhaps something smart that checks for free memory and/or times out?

#4 Updated by Alessandro Pasotti over 1 year ago

  • Affected QGIS version changed from 3.4.2 to 3.5(master)
  • Operating System deleted (Windows 8.1)
  • Priority changed from High to Normal

Lowering priority because there is a workaround.

#5 Updated by Harry Clarke over 1 year 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.

#6 Updated by Alessandro Pasotti over 1 year ago

I agree with the path forward, but this is unfortunately not trivial, let's see if it can be done during the next bugfixing round.

#7 Updated by Giovanni Manghi over 1 year ago

  • Status changed from Feedback to Open

Also available in: Atom PDF