Bug #1106

Wait command makes the bot stuck

Added by Kristofer B. almost 4 years ago. Updated over 3 years ago.

Status:CompletedStart date:09/13/2016
Priority:HighDue date:
Assignee:Dalton Cabrera% Done:

100%

Category:-
Target version:5.9.43
UBot Version:5.9.36 Browser:Chrome 49
UBot Studio Edition:5.9.36

Description

The following code make ubot stuck

ui button("stop") {
set(#run,$false,"Global")
}
set(#run,$true,"Global")
thread {
wait(60)
}
loop while(#run) {
wait("{$rand(0,3)}.{$rand(1,9)}")
}

History

#1 Updated by Kristofer B. almost 4 years ago

Is not only wait command. Big bots stuck at random time.
define test1 {
thread {
wait(600)
}
}
define test2 {
thread {
wait(600)
}
}
define test3 {
thread {
wait(600)
}
}
define test4 {
thread {
wait(600)
}
}
define test5 {
thread {
wait(600)
}
}
define test6 {
thread {
wait(600)
}
}
define test7 {
test1()
test2()
test3()
test4()
test5()
test6()
wait(600)
}
test7()

#2 Updated by Kristofer B. almost 4 years ago

To replicate use the following code. Open ubot click code view and run the script. Minimize ubot and leave it run for some time. It will crash. Try to do it 3-5 times.

http://prntscr.com/ci28gj

define test1 {
thread {
loop(600) {
set(#test1,"ok","Global")
wait(1)
}
}
}
define test2 {
thread {
loop(600) {
set(#test2,$randomThing(),"Global")
wait(1)
}
}
}
define test3 {
thread {
loop(600) {
set(#test3,$randomThing(),"Global")
wait(1)
}
}
}
define test4 {
thread {
loop(600) {
set(#test4,$randomThing(),"Global")
wait(1)
}
}
}
define test5 {
thread {
loop(600) {
set(#test5,$randomThing(),"Global")
wait(1)
}
}
}
define test6 {
thread {
loop(600) {
set(#test6,$randomThing(),"Global")
wait(1)
}
}
}
define test7 {
test1()
test2()
test3()
test4()
test5()
test6()
loop(600) {
set(#test7,$randomThing(),"Global")
wait(1)
}
}
test7()
define $randomThing {
return("ok")
}

#5 Updated by Jason Kelley almost 4 years ago

The following code causes a browser crash in CEF in Chrome 49,

thread {
loop(2400) {
set(#test,$test(),"Global")
wait(0.25)
}
}
wait(605)
define $test {
return("ok")
}

#6 Updated by Miriam MB almost 4 years ago

  • Status changed from Pending to New

#7 Updated by Jason Kelley almost 4 years ago

  • Browser changed from Chrome 21 to Chrome 49

#9 Updated by Kristofer B. almost 4 years ago

I have run my tests using Chrome 21 not 49. Chrome 49 create the same problems.
I revert back to v33 and everything works fine.

#11 Updated by Dalton Cabrera almost 4 years ago

  • Status changed from New to In Progress
  • Assignee set to Dalton Cabrera

#12 Updated by Dalton Cabrera almost 4 years ago

  • Status changed from In Progress to Resolved

#13 Updated by Miriam MB almost 4 years ago

  • Target version set to 5.9.37

#14 Updated by Miriam MB almost 4 years ago

  • % Done changed from 0 to 100

#15 Updated by Miriam MB almost 4 years ago

  • Status changed from Resolved to Completed

#16 Updated by Miriam MB over 3 years ago

  • Target version changed from 5.9.37 to 5.9.43

#17 Updated by Kristofer B. over 3 years ago

{PLEASE USE THE SEPARATE TICKET CREATED FOR YOUR ADDITIONAL ISSUE FOR UPDATES OR COMMENTS ON THE ISSUE: http://tracker.ubotstudio.com/issues/1153}

Also available in: Atom PDF