daverawcus 6 Posted January 3, 2020 Report Share Posted January 3, 2020 Hi guys I have a bot i made that was scraping for a new tweet every few seconds 3-4 on a loop I have tried http get and regex the tweet id out and check as well as scraping with exbrowser both works great in a loop when compiled on its own, when added to a define which is triggered on loop it crashes after 40 mins the memory is stable and not moving up i get this error Faulting module path: C:\Windows\Microsoft.NET\Framework\v4.0.30319\clr.dll i have updated all the .net still crashes Can anyone recommend away to check for a new tweet every few seconds and run it continuously with out ubot crashing The rest of the bot works great apart from this which in hindsight i should have test for longer before steaming ahead with the rest Quote Link to post Share on other sites
Code Docta (Nick C.) 638 Posted January 4, 2020 Report Share Posted January 4, 2020 Can you tell us, are you scraping by keyword/# tag? or what? Quote Link to post Share on other sites
SourceUltra 10 Posted January 5, 2020 Report Share Posted January 5, 2020 clr.dll is garbage collection, which is a module of .NET that manages memory. Ubot is .NET software, so it utilizes the garbage collection feature https://docs.microsoft.com/en-us/dotnet/standard/garbage-collection/. I think I remember learning in Nick's ubot course that .NET software can only use 2gb of ram, so it is limited in the memory it can use. If garbage collection is failing to meet the needs of your bot then you may need to break up your definitions into smaller ones, reduce the size of your lists if you are creating lists, or clear variables/lists/data more frequently in your bot so they don't reach astronomical sizes. 1 Quote Link to post Share on other sites
HelloInsomnia 1103 Posted January 8, 2020 Report Share Posted January 8, 2020 Depending on how you coded it there is a possibility you are creating a stack overflow exception. Hard to say obviously without seeing but maybe this will give you some insight. It is a recursive function that eventually (in this case quite quickly) will cause Ubot to crash and everything will appear normal at first: ui stat monitor("Num:",#num) set(#num,0,"Global") StackOverflow(#num) define StackOverflow(#_num) { set(#_num,$add(#_num,1),"Local") set(#num,#_num,"Global") StackOverflow(#_num) } 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.