SRL Archive - SRL Bugs

Magic Tab Hover AKA 'Saradomin Strike' Bug


YoHoJo

2011-11-29 20:51:39

No idea what triggers it, but confirmed that
http://villavu.com/forum/showthread.php?t=67731 triggers it as well as
http://villavu.com/forum/showthread.php?p=850480 as well as another script I haven't released yet.

My GUESS is that it's something to do with GameTab(tab_Magic) or GameTab(28) because that seems to be the only common thing between the three scripts, however I made a test script which essentially loops gametab(28) and moves mouse and it never moved oddly :/.

Anyways, what the bug is (normally occurs when in magic tab, but I think I've once seen it happen in inventory tab) the mouse just moves over and over in a general area (always the same area, often times where the Saradomin Strike Spell is located, giving the name Saradomin Strike Bug).

Here is a post with an image of the problem:
http://villavu.com/forum/showpost.php?p=850128&postcount=185
The pink circle on the bottom right of the screen is where the mouse goes to/moves around repetitively.

Pretty sure that
1) It's a bug in SRL because three scripts display the bug.
2) It's an ENDLESS LOOP which is kind of REALLY BAD to have in SRL.
I believe the Superheater even has a timer to try to catch/stop it, but since it's an endless loop within SRL that failsafe doesn't even work :/.

Feel free to DL and compare those two scripts, and if you wish to see my other script which displays it I can post/PM it to you.

Coh3n

2011-11-29 20:54:55

Debug it in SRL. It's most likely in a Cast function (or a function that every script uses). So just Writeln() a bunch of information and see what happens.

YoHoJo

2011-11-29 21:02:15

I also though it was cast but YUGAY doesn't use a cast function from SRL, it click bitmap of spell/uses uptext.

Will do. I'll just put like
Writeln('Line ## in ____.scar is crazy!');

Coh3n

2011-11-29 21:59:14

Yeah if you can narrow down the function that would be great.

Tickyy

2011-11-30 17:12:19

I always thought its the script, but i had nothing special like my own function or something, it was SRL only but still i've been experimenting and changing lots of things, hope this gets fixed asap.

YoHoJo

2011-11-30 17:14:11

Tickky, I think I moded all my scripts where I guessed the problem was and I'm no longer getting it. Can you please do what cohen said so we can pinpoint it better?

Just go to your SRL folder and in whichever procedure/function you think it's occurring add some writeln('this is like ### of script ____.simba')
that way we can find where the loop is is.

Tickyy

2011-11-30 17:58:34

From: YoHoJo
Tickky, I think I moded all my scripts where I guessed the problem was and I'm no longer getting it. Can you please do what cohen said so we can pinpoint it better?

Just go to your SRL folder and in whichever procedure/function you think it's occurring add some writeln('this is like ### of script ____.simba')
that way we can find where the loop is is.


No problem.

legoace

2011-12-06 10:06:46

I have this problem with my private superheater as well… I thought it was an issue between antiban changing tabs while superheating, where the interface would change tabs back immediately after the script did, causing something in antiban to fail. I never could prove it though.

I might look through the antiban routines to see if they have failsafes to get them out of infinite loops. If not, those should be added.

Coh3n

2011-12-13 01:57:29

There was an update made to magic.simba today. For you guys having this problem, add this to your script and let me know if it fixes it. If you don't use SRL's Cast() function, this won't make a difference.

srl_magic_CheckSpellsOnce := true;
E: Can someone please tell me if this still happens after doing the latter?

legoace

2011-12-26 11:56:13

This bug was gone for the longest time, but I updated SRL yesterday, and it reappeared. I am using the same script, a custom version of Ticky's heater, that I have not changed in weeks. Something in yesterday's update triggered this.

Tickyy

2011-12-26 12:44:44

From: legoace
This bug was gone for the longest time, but I updated SRL yesterday, and it reappeared. I am using the same script, a custom version of Ticky's heater, that I have not changed in weeks. Something in yesterday's update triggered this.


//offtopic
My script still is working? or did you change things from time to time?

legoace

2011-12-26 17:10:59

I basically removed your version checks and then changed some random stuff around.

OT: I have pinned it down to antiban procedures. I haven't caught it in the act but I believe the issue is in examining an item in the inventory and then the interface switches immediately to the magic tab. It's definitely in antiban though.

Tickyy

2011-12-26 20:01:23

From: legoace
I basically removed your version checks and then changed some random stuff around.

OT: I have pinned it down to antiban procedures. I haven't caught it in the act but I believe the issue is in examining an item in the inventory and then the interface switches immediately to the magic tab. It's definitely in antiban though.


well, then try to remove antiban, or just make the chance for antiban 9999999999999999999 :p.

legoace

2011-12-26 22:58:55

I did and that reduced the occurrences, but it just happened again and I was watching - during OpenBankNPC. I'm not sure which component of this is causing this… I don't think it's OpenBankNPC necessarily, it's probably some underlying SRL function or a bug in SIMBA.

Tickyy

2011-12-27 13:34:05

From: legoace
I did and that reduced the occurrences, but it just happened again and I was watching - during OpenBankNPC. I'm not sure which component of this is causing this… I don't think it's OpenBankNPC necessarily, it's probably some underlying SRL function or a bug in SIMBA.


Well, after coh3n updated gametab, it worked great, didn't use my superheater for a while, so i have no idea what is causing this…

Coh3n

2012-01-06 04:15:34

You can't call any procedures in antiban that call gameTab(TAB_INV). Also make sure you add this to the script.

E: Well this just happened to me while superheating Mith bars. SRL's cast function also didn't work for certain spell setups, so I'll look into that as well. Hopefully we can get this resolved soon. :)

E2: I've added some debugging to magic.simba, so if someone could try to recreate the problem, using the attached magic.simba that would be great. I'm leaving for a couple days and I would appreciate the help. :) I'm not sure if it's enough debugging or if it's even in the right place, but hopefully it'll help.

NCDS

2012-01-06 08:20:46

From: Coh3n

E: Well this just happened to me while superheating Mith bars. SRL's cast function also didn't work for certain spell setups, so I'll look into that as well. Hopefully we can get this resolved soon. :)

E2: I've added some debugging to magic.simba, so if someone could try to recreate the problem, using the attached magic.simba that would be great. I'm leaving for a couple days and I would appreciate the help. :) I'm not sure if it's enough debugging or if it's even in the right place, but hopefully it'll help.


The original equation (by N!ke) worked well until a new spell was added, which is not present in f2p. IIRC, that was the main issue as to why it didn't work properly on all sorts for all spells.

Coh3n

2012-01-09 04:26:55

I figured that's what that might be, but it still doesn't explain the Sara Strike hovering. I even debugged before EVERY mouse movement in magic.simba and watched when it happened, and nothing was being printed when the mouse was being moved, which leads me to believe it's not in magic.simba.

If that's the case I don't really know where to start.

E: I've fixed casting with different spell sorting (Storm of Armadyl spell was missing), so I'm hoping that will fix this issue. So far, it's working fine.

E2: Marking as resolved as this hasn't come up since the last update.

Tickyy

2012-01-14 17:50:27

Time to bump this, after i used my superheater… which i didn't use for a month or more.

Note: my superheater doesn't use magic.simba, i guess its gametab.

Tickyy

2012-01-15 09:06:26

Double post yeah :p, but i just wanted to say that i will try to record the account(soon) while till it happens…

maybe this will help further …

Edit: Superheated over 2k now… didn't happen yet… still recording…

Coh3n

2012-01-16 06:05:19

Do you call OpenBankGlass or OpenBankQuite (they're both called in OpenBank)? I also get this bug using my Superheater, and I haven't got it since I removed those function from OpenBank.

Tickyy

2012-01-17 16:48:24

From: Coh3n
Do you call OpenBankGlass or OpenBankQuite (they're both called in OpenBank)? I also get this bug using my Superheater, and I haven't got it since I removed those function from OpenBank.


Nope, i am using my personal TPA Soul wars chest banker, it doesn't have anything to do with banking.

I am sure this comes from gametab :(.

Coh3n

2012-01-17 16:55:24

From: Tickyy
Nope, i am using my personal TPA Soul wars chest banker, it doesn't have anything to do with banking.

I am sure this comes from gametab :(.
Hmm, well there goes my hopes. :( I commented out OpenBankGlass/Quiet in my Bank.simba and didn't get the bug again, so I thought for sure that was the problem.

Why do you think it comes from gametab?

Tickyy

2012-01-18 05:25:06

From: Coh3n
Hmm, well there goes my hopes. :( I commented out OpenBankGlass/Quiet in my Bank.simba and didn't get the bug again, so I thought for sure that was the problem.

Why do you think it comes from gametab?


Because Gametab and uptext is the only thing i use, i don't use color/dtms. Something like this: While(not(Gametab())) do wait… After wait it goes MMouse the selected slot and uses uptext, then clicks. i am sure that gametab is causing this, you can have my script if it helps somehow :).

Fatigue

2012-01-18 18:22:21

Currently, this bug keeps happening. I tried to comment out line 942 in text.simba, and the mouse just stays there. Uncommenting it causes this bug to occur.

I think it has something to do with this:

if Action <> Nothing then
begin
MMouse(Max(B.X1 - 50, 0), Max(B.Y1 - 50, 0), 40, B.Y2 - B.Y1);
Wait(200 + Random(100));
end;

Coh3n

2012-01-18 22:53:27

From: Fatigue
Currently, this bug keeps happening. I tried to comment out line 942 in text.simba, and the mouse just stays there. Uncommenting it causes this bug to occur.

I think it has something to do with this:

if Action <> Nothing then
begin
MMouse(Max(B.X1 - 50, 0), Max(B.Y1 - 50, 0), 40, B.Y2 - B.Y1);
Wait(200 + Random(100));
end;
YES! You're a genius! I know how to recreate it now, and I know what's causing it. It's the extra ChooseOptionMultiEx call in ChooseOptionMultiEx (causes a recurring call of ChooseOptionMultiEx; really stupid on my part). This only happens when the magic tab is open. As to why it moves around that point, but unsure yet, but this will definitely be fixed tonight.

E: FIXED!

Tickyy

2012-01-19 16:54:45

From: Coh3n
YES! You're a genius! I know how to recreate it now, and I know what's causing it. It's the extra ChooseOptionMultiEx call in ChooseOptionMultiEx (causes a recurring call of ChooseOptionMultiEx; really stupid on my part). This only happens when the magic tab is open. As to why it moves around that point, but unsure yet, but this will definitely be fixed tonight.

E: FIXED!


Gawwwwdddd damn, never would have thought of that… hopefully this fixes everything!

Rep+ for both, but big thanks to Fatigue.