Jump to content
UBot Underground

Check For New Tweet Every Few Seconds? Help


Recommended Posts

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 

 

 

 

Link to post
Share on other sites

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.

  • Like 1
Link to post
Share on other sites

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)
}
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...