Opened 9 years ago

Closed 7 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


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 9 years ago.
runtime error

Download all attachments as: .zip

Change History (3)

by lobelius, 9 years ago

Attachment: runtime error.JPG added

runtime error

comment:1 by martinl, 9 years ago

Milestone: 6.4.6

comment:2 by marisn, 7 years ago

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:

Note: See TracTickets for help on using tickets.