<div dir="ltr">Hi List<br><br>The problem in the end was that I hit the 2Gig virtual memory address space for a 32bit application. The application was build with debug libraries of Qt and QGis, when fully loaded, the virtual memory was on 1.8Gig, and when using the application, some of the GIS layers came on when zooming in, it just crashed in the tiff layer. A weeks earlier, i saw that some of the layers when zooming in just did not load, and that jobs was just removed from the joblist when rendering. Jobs was removed due to the fact that a QImage could not be allocated, for the layer, thus removed from the joblist.  <div>It was very misleading because according to the task manager, there was still loads of memory for the task to create these QImages.</div><div><span style="line-height:1.5;font-size:13.1999998092651px"><br></span></div><div><span style="line-height:1.5;font-size:13.1999998092651px">The solution for this was to make the application </span>LARGEADDRESSAWARE , to do this I have to build the application with the <i>-Wl,--large-address-aware</i> linker option. (this is for MinGW, dont know what you have to use for MSVC builds) </div><div>I also have to run <span style="font-size:13.1999998092651px;line-height:19.7999992370605px">"bcdedit /set IncreaseUserVA 3072" (without the quotes) in a cmd prompt with administrator privileges, to get access to 3Gig of virtual address space for my process, and allows me to run the application in debug mode, without any crashes.  </span></div><div><br></div><div>Here is link to the memory limits of windows </div><div><div><a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx">https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx</a> </div></div><div><br></div><div>When building  my application and libraries and QGis with release versions of the libraries, it performs well and there is no crashes. </div><div>The virtual memory for the process then comes in at 700 - 800mb </div><div><br></div><div>Regards</div><div>Theuns Heydenrych</div><div><br></div><br><div class="gmail_quote"><div dir="ltr">On Mon, 15 Jun 2015 at 19:12 Theuns Heydenrych <<a href="mailto:theunsheydenrych@gmail.com">theunsheydenrych@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">HI<div>I have written a Qt application using the QGis libraries.</div><div>I have setup a QGis project in Qgis(downloaded version 2.6) itself, and loads the project from my application. <br><div>In the project is a tiff raster image of 1.2Gig that have external pyramids created with QGis.</div><div><br></div><div>While using the QGis project in my application by zooming in and out, I get the following error in the qgsrasterblock code. Its keep scrolling the following.</div><div><i>src\core\raster\qgsrasterblock.cpp: 381: (setColor) index  out of range</i>  <br></div></div><div><br></div><div>I have captured the output from where it starts with the error and pasted it on pastebin. <a href="http://pastebin.com/MUBd1Uq2" target="_blank">http://pastebin.com/MUBd1Uq2</a></div><div><br></div><div>What I have noticed is that on line no.8 the "item" is twice the size of the "img" is the correct, could this happen? </div><div><i>8: "src\gui\qgsmapcanvasmap.cpp: 52: (paint) map paint DIFFERENT: sIZE: img 1553,972  item 3106,1944"</i><br></div><div><i><br></i></div><div>After this on line no.47 the paint device returned no engine error.</div><div><i>47: "QPainter::begin: Paint device returned engine == 0, type: 3"</i></div><div><br></div><div>A bit further on, on line no.66 the "img" is 0,0 in width and height, and the "item" is the correct size (<i>1553,972</i>)</div><div><i>66: "src\gui\qgsmapcanvasmap.cpp: 52: (paint) map paint DIFFERENT: sIZE: img 0,0  item 1553,972"</i><br></div><div><i><br></i></div><div>After that on line no.122 it start to get index out of bounds errors, and the looks like the application is hanging. </div><div><i>122: src\core\raster\qgsrasterblock.cpp: 381: (setColor) index 0 out of range<br></i></div><div><br></div><div>Has anyone seen behaviour like this, so that I can have and idea where to look?</div><div><br></div><div>Thank  you, in advance.</div></div><div dir="ltr"><div>Theuns Heydenrych<br></div><div><br></div><div><i><br></i></div><div><br></div><div><br></div><div><br></div><div><br></div></div></blockquote></div></div>