Opened 4 years ago

Closed 3 years ago

#2667 closed defect (invalid)

r.mapcalculator in a loop generates C++ runtime error

Reported by: lobelius Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Raster Version: 6.4.3
Keywords: QGIS python console Cc:
CPU: x86-64 Platform: MSWindows 8

Description

Hello. I'm employing r.mapcalculator in a QGIS console loop as per the following line. The script works just fine. However, from time to time, subprocess sh.exe raises a Windows C++ Runtime popup error R6016, which stops the loop as long as user doesn't click the ok button (attached an example taken from internet). The loop itself just freezes up, but doesn't terminate.

import processing

for i in range (0,1000): processing.runalg('grass:r.mapcalculator',img1,img2,None,None,None,None,'A*B','-180,180,-90,90',0.25,imgout)

Any clues?

Attachments (1)

runtime error.JPG (24.2 KB) - added by lobelius 4 years ago.
runtime error

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by lobelius

Attachment: runtime error.JPG added

runtime error

comment:1 Changed 4 years ago by martinl

Milestone: 6.4.6

comment:2 Changed 3 years ago by marisn

Resolution: invalid
Status: newclosed

This is not a GRASS GIS bug but a QGIS one. There is a limit of 60 threads/processes that can use MSVCRT and this loop most likely hits limit before unloading happens. Upgrading MSVCRT or fixing QGIS code are the only two options.

More in KB 126709: https://support.microsoft.com/en-us/help/126709/prb-error-on-win32s-r6016---not-enough-space-for-thread-data

Note: See TracTickets for help on using tickets.