Jump to content
UBot Underground

[FREE PLUGIN] Threads Counter - UBot v4 Threading Fixed


Recommended Posts

nah man, i was getting it by only using yours as well. then i tested with both. 

Well...in the code you posted above you used "Threads Safe Container", which is not part of my plugin, but part of another which caused the same errors to pop up when I tested it.

Link to post
Share on other sites
  • Replies 160
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

As you may be aware threading in UBot v4 is not safe and may not work as expect under certain conditions, which would result in threads slowly dying out, so at the end, you only get left with 1 active

Awesome plugin UBotDev

You are not using the plugin from the title, instead you are using the plugin that Blumi 40 keeps posting here (Blumi40, can you please open another thread for that plugin instead of discussing it her

yeah that post was more to show HIM that thread safe container isnt really working 100%. 

 

But when i tested with just YOURS and no thread safe containers, i got the local tmp error when using in new browser and 100/250 threads. if im not using in new browser then it works beautifully. 

Link to post
Share on other sites

yeah that post was more to show HIM that thread safe container isnt really working 100%. 

 

But when i tested with just YOURS and no thread safe containers, i got the local tmp error when using in new browser and 100/250 threads. if im not using in new browser then it works beautifully. 

Can you then post the code that you used with my plugin? I'm trying to reproduce that here but I can't.

Link to post
Share on other sites

Can you then post the code that you used with my plugin? I'm trying to reproduce that here but I can't.

its the exact same code just remove the thread safe container from the increment. anyways ive added a longer delay and now not getting that tmp error and thread count is all dandy :) 

Link to post
Share on other sites

its the exact same code just remove the thread safe container from the increment. anyways ive added a longer delay and now not getting that tmp error and thread count is all dandy :)

Well just use the example code and don't add/change anything...it's working just OK here...on 250 threads, 10000 counts.

 

Why don't you contact me so we can solve this? I sent you a PM.

 

Also, please send me the exact code you used so I can try to reproduce the problem here.

Link to post
Share on other sites

hahah dont get me wrong, it works great for me :) and im very happy and grateful!

 

but without a small delay of even .1 seconds i was getting that tmp error. Now that i have the .1 delay it works great :) so thank you

The problem is that you shouldn't get those errors...even without delay.

 

EDIT: I was thinking about the problem you have and it might be that UBot native "thread" command is throwing up those errors. I guess this happens because disks are too slow to write all the files in a short time, so Ubot fails to write a file and errors out when it can't find it later. I have a SSD, so maybe that's why it's working for me and not for you. However, (as you mentioned) I think we should use a small delay so that UBot is able to write to disk.

 

EDIT2: The error started popping up as soon as I added "in new browser" command, so I think the browser is writing to disk and causing errors.

Link to post
Share on other sites

Looking good UbotDev!

 

 

I am only puzzled on how i can keep the list positions apart...

 

Lets say i want to scan a url for something and it exists on the site, then it should delete the url from a list position.

 

But how can i keep the list positions all apart when running 50 threads?

Link to post
Share on other sites

Looking good UbotDev!

 

 

I am only puzzled on how i can keep the list positions apart...

 

Lets say i want to scan a url for something and it exists on the site, then it should delete the url from a list position.

 

But how can i keep the list positions all apart when running 50 threads?

I think the safest way is to handle that in the main/UI thread; when worker thread finishes you should send back some information  - if it should delete URL or now.

Link to post
Share on other sites

Hi UbotDev,

 

 

Thanks for the reply man, appreciated.

 

Yeah that would be the best way indeed, think ill start from scratch with this script as a base and then control the stuff with locals and see what it will do.

 

 

K, back to work ;)

Link to post
Share on other sites

hi UbotDev

 

i try your plugin using the code you provided on the First Post but after i got the "All threads were closed" message the bot is not stopping.

 

Yes all threads are closed but it just the bot is not stopping. I have to add "Stop Script" node after the "All threads were closed" node in order for the bot to stoped

 

Here is the video : http://screencast.com/t/qpyELjRD5m

 

Is this just me or is that the way the plugin works?

 

Thanks

Link to post
Share on other sites

hi UbotDev

 

i try your plugin using the code you provided on the First Post but after i got the "All threads were closed" message the bot is not stopping.

 

Yes all threads are closed but it just the bot is not stopping. I have to add "Stop Script" node after the "All threads were closed" node in order for the bot to stopped

 

Here is the video : http://screencast.com/t/qpyELjRD5m

 

Is this just me or is that the way the plugin works?

 

Thanks

Damn...I didn't notice that happening because I had stop command at the end of my testing code (and some other code bellow).

 

I was able to reproduce that: it worked the first time, and failed the second: http://screencast.com/t/oLo0G4Nu

 

However, that's really strange....it looks like that threads are not actually closed, although we reached "decrement" function inside thread. That makes me think that for some reason UBot doesn't close the threads once the end of thread container is reached. :/ That's why I don't think the problem is in plugin but rather with UBot, because plugin only provides counting of threads, which actually works.

 

As a workaround I think you are safe by adding stop command at the end of the script, since all threads should already be done by then (I don't think your thread code is actually executed at that time).

 

I'm investigating this issue now and will get back with answers later.

  • Like 1
Link to post
Share on other sites

ubotdev the problem happens when you run threads fast in large numbers or write to variables fast not just with your plugin but under many scenarios.

I only see popups if I add "in new browser" container, else I'm not able to reproduce.

Link to post
Share on other sites

Damn...I didn't notice that happening because I had stop command at the end of my testing code (and some other code bellow).

 

I was able to reproduce that: it worked the first time, and failed the second: http://screencast.com/t/oLo0G4Nu

 

However, that's really strange....it looks like that threads are not actually closed, although we reached "decrement" function inside thread. That makes me think that for some reason UBot doesn't close the threads once the end of thread container is reached. :/ That's why I don't think the problem is in plugin but rather with UBot, because plugin only provides counting of threads, which actually works.

 

As a workaround I think you are safe by adding stop command at the end of the script, since all threads should already be done by then (I don't think your thread code is actually executed at that time).

 

I'm investigating this issue now and will get back with answers later.

 

 

 

Waiting for the answer :-)

Link to post
Share on other sites

Waiting for the answer :-)

I was testing the code and I think the problem is related to UBot v4 not closing threads for some reason. I think so because I was able to run the same script in UBot v5 which seems to stop when we reach the end of code (even after multiple runs): http://screencast.com/t/q1PHaunHwc5B

 

FYI, threading without plugin in UBot v5 still suffers from the same problems.

 

I've contacted support to ask them to explain why threads don't close in v4 (although I'm not sure if they still support v4) and I also mentioned threading bug in UBot v5 (in case they want me to report a bug if they haven't started working on that already).

Link to post
Share on other sites

I was testing the code and I think the problem is related to UBot v4 not closing threads for some reason. I think so because I was able to run the same script in UBot v5 which seems to stop when we reach the end of code (even after multiple runs): http://screencast.com/t/q1PHaunHwc5B

 

FYI, threading without plugin in UBot v5 still suffers from the same problems.

 

I've contacted support to ask them to explain why threads don't close in v4 (although I'm not sure if they still support v4) and I also mentioned threading bug in UBot v5 (in case they want me to report a bug if they haven't started working on that already).

 

So it became new problem then. The thread counter fixed but thread is not closed. How to close it?

Link to post
Share on other sites

So it became new problem then. The thread counter fixed but thread is not closed. How to close it?

As I mentioned above stop at the end of the script should work as workaround (maybe I should bold that as well).

  • Like 1
Link to post
Share on other sites

Hi Ubotdev,

 

 

Thanks for checking things out, really appreciated!

I'm not sure I'll get any answers from support, since they are even denying that threading bug even exists.

 

I'll try one more time to get answers, but I don't have time to argue with them.

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...