cancel
Showing results for 
Search instead for 
Did you mean: 

Out of Memory Exception while taking screenshots even after using garbage collection

Anonymous
Not applicable
Hello, Issue: I am getting Out of Memory Exception while taking screenshots and saving it into collection. The error occurs after taking more than 75 screenshots as the memory is getting occupied upto 1.2 GB for Blue Prism application. I have to take more than 300 screenshots while scrolling down the page and save it into collection and paste it to excel afterwards. Solutions Tried: I have tried putting Garbage Collection in loop while the BOT is taking screenshots,but it is not helpful. I have tried restarting the Blueprism application and it works for sometime and then gives the same exception again. Any Solutions\Recommendations will be appreciated.
2 REPLIES 2

John__Carter
Staff
Staff
Create a more efficient design that doesn't try to hold 300 images (encoded as XML) at the same time. No PC/application has infinite capacity and you have to think how work within the limitations. I'd recommend either updating the Excel file after every screenshot so that there is only 1 image in play at any one time or, saving the images as temp files and then loading them into Excel one at a time at the end.

Anonymous
Not applicable
Thank you John! Will try it.