Brutal 164 Posted January 22, 2015 Report Share Posted January 22, 2015 I started getting a lot of browser crashes on a program I'm working on and of course went to doing a search to find a fix. I found a lot of people report the issue and a few attempted workarounds. Here was my work around that did the trick (based on several other workarounds I found here). *Note- This was not for a multi-threaded app but I assume the process would still work. 1- Right inside your main loop, put in the "close page" command. 2- Right under that, put in a "in new browser" command. 3- Inside the "in new browser" command, put in everything else that is in your loop. 4- Clarification.... To be sure you have this right.... Double-click the "in new browser" command to collapse it. - If there is anything in that loop under the "in new browser" command... drag it into the command. 5- There really is no #5... You're done. Now with each loop it will first close the browser and then open a new browser. This causes the memory to be flushed in from the previous browser. The main reason for browser crash (if you look in your computer task manager) is because it is using too much memory. This process continually resets the memory so that crash never occurs.I have provided an image to show how simple the setup is. ... My image has some other stuff in there because it's an actual working program and not just an example. 2 Quote Link to post Share on other sites
arunner26 51 Posted January 22, 2015 Report Share Posted January 22, 2015 Software,Thanks for the information. It is appreciated. Quote Link to post Share on other sites
UBotDev 276 Posted January 22, 2015 Report Share Posted January 22, 2015 So you think the problem is with executing "close page" inside "in new browser" (like it gets executed too many times)? I'm asking because in your code "close page" actually gets only executed inside the main browser, so it should only impact that one (not the new ones). Quote Link to post Share on other sites
zenos 13 Posted January 22, 2015 Report Share Posted January 22, 2015 Thank you, You can also use a plugin that clear the memory every 30 mn or hour. I also had a problem with the UI html panel that was making grow up one browser.exe, I use a plugin that can refresh the ui Html panel and now I can make run my bots 24/7 And I agree with UbotDev, how close the main browser can impact and clear the memory of the new browser ? Quote Link to post Share on other sites
Kreatus (Ubot Ninja) 422 Posted January 22, 2015 Report Share Posted January 22, 2015 I think the one that's doing the job on your code is the "set useragent" code.It's resetting the browser every time you have that before the navigate command. Quote Link to post Share on other sites
zenos 13 Posted January 22, 2015 Report Share Posted January 22, 2015 I think the one that's doing the job on your code is the "set useragent" code.It's resetting the browser every time you have that before the navigate command. +1 Quote Link to post Share on other sites
solstudioim 4 Posted April 28, 2015 Report Share Posted April 28, 2015 Thank you, You can also use a plugin that clear the memory every 30 mn or hour. I also had a problem with the UI html panel that was making grow up one browser.exe, I use a plugin that can refresh the ui Html panel and now I can make run my bots 24/7 And I agree with UbotDev, how close the main browser can impact and clear the memory of the new browser ? What kind of plugin is that? Quote Link to post Share on other sites
solstudioim 4 Posted April 28, 2015 Report Share Posted April 28, 2015 I think the one that's doing the job on your code is the "set useragent" code.It's resetting the browser every time you have that before the navigate command. I feel like trying randoming few user agents everytime the bot hit a loop cycle. Thank! Quote Link to post Share on other sites
solstudioim 4 Posted April 28, 2015 Report Share Posted April 28, 2015 I feel like trying randoming few user agents everytime the bot hit a loop cycle. Thank!I edited my script and it seems working that way, with using random changing the user agent Quote Link to post Share on other sites
the_way 52 Posted July 21, 2015 Report Share Posted July 21, 2015 Nice one software, i have been switching useragent, and no problems on my home pc, but as soon as i uploaded it to the VPS, problems. Just going to put this fix in just now, Quote Link to post Share on other sites
the_way 52 Posted July 21, 2015 Report Share Posted July 21, 2015 dang, it didn't work for me, i'm just going to try using a thread with the shell command "taskkill /f /im WerFault.exe" see if i can get that working * Ok, i ran the code explained here and this works perfect for me. Closes that damn window every 10 seconds. You don't even see the code running, all you see is the flash of that browser crash window disappearing every so often. I just stuck that in as a shell command in a thread and looped every 10 seconds. Kaboom. Sorted 1 Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.