Bot is running for hours, and then it stops with an error

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Message
Author
flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Bot is running for hours, and then it stops with an error

#1 Post by flameboy » Sun Mar 14, 2010 2:06 pm

Subject says it all, and I don't know if it matters, but I have 2 ROM windows.
This has happened a few times, so it must be a special case, but not too special :)

Here is the log:

Code: Select all

Sun Mar 14 16:58:53 2010 : Language: english
Sun Mar 14 16:58:58 2010 : Using static char address 0x985C3C, player address 0x1F745F00
Sun Mar 14 16:58:59 2010 : QUICK_TURN = false
Sun Mar 14 16:58:59 2010 : Keyboard settings are from bindings.txt:
Sun Mar 14 16:58:59 2010 : MAGE_ELEMENTAL_CATALYST       9
Sun Mar 14 16:58:59 2010 : TARGET                        Tab
Sun Mar 14 16:58:59 2010 : MAGE_ENERGY_SUPPLY            2
Sun Mar 14 16:58:59 2010 : ROTATE_RIGHT                  E
Sun Mar 14 16:58:59 2010 : MAGE_FLAME                    4
Sun Mar 14 16:58:59 2010 : MACRO                         0
Sun Mar 14 16:58:59 2010 : MAGE_MAGIC_TARGET             6
Sun Mar 14 16:58:59 2010 : MOVE_FORWARD                  W
Sun Mar 14 16:58:59 2010 : MOVE_BACKWARD                 S
Sun Mar 14 16:58:59 2010 : ROTATE_LEFT                   Q
Sun Mar 14 16:58:59 2010 : STRAFF_RIGHT                  D
Sun Mar 14 16:58:59 2010 : DRUID_RECOVER                 1
Sun Mar 14 16:58:59 2010 : STRAFF_LEFT                   A
Sun Mar 14 16:58:59 2010 : MAGE_ENERGY_WELL              3
Sun Mar 14 16:58:59 2010 : TARGET_FRIEND                 Z
Sun Mar 14 16:58:59 2010 : MAGE_PERCEPTION               5
Sun Mar 14 16:58:59 2010 : JUMP                          Space
Sun Mar 14 16:58:59 2010 : ATTACK                        7
In main thread:
stack traceback:
	D:/micromacro/scripts/rom/functions.lua:58: in function 'debugAssert'
	D:/micromacro/scripts/rom/classes/pawn.lua:168: in function 'update'
	D:/micromacro/scripts/rom/classes/player.lua:765: in function 'fight'
	scripts\rom/bot.lua:513: in function 'foo'
	D:\micromacro\lib\lib.lua:510: in function <D:\micromacro\lib\lib.lua:508>

----------TRACEBACK END----------

Sun Mar 14 19:30:16 2010 : D:/micromacro/scripts/rom/classes/pawn.lua:168: Error in memory reading
Sun Mar 14 19:30:16 2010 : Execution error: Runtime error
(You can see from the time, that it had been running fine for 2.5 hours)

User avatar
Administrator
Site Admin
Posts: 5330
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bot is running for hours, and then it stops with an erro

#2 Post by Administrator » Sun Mar 14, 2010 2:19 pm

In classes/pawn.lua, line 168, you'll see this:

Code: Select all

tmp = debugAssert(memoryReadString(proc, namePtr));
Directly above that line, add this:

Code: Select all

printf("Id: %d, type: %d, Name: %s, Address: 0x%X\n", tonumber(self.Id or 0), tonumber(self.Type or 0), tostring(self.Name or "<UNKNOWN>"), self.Address);
What does it print out?

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#3 Post by flameboy » Sun Mar 14, 2010 3:10 pm

I started it now, and it is spamming the BOT window like crazy. (debugging is set to true, I didn't switch it back the last time I had a problem)
Should I wait until it stops with an error, and then copy the content of the log again?

User avatar
Administrator
Site Admin
Posts: 5330
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bot is running for hours, and then it stops with an erro

#4 Post by Administrator » Sun Mar 14, 2010 3:17 pm

Wait till it errors out, then copy the message from the console window. That line of code won't add it to the log.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#5 Post by flameboy » Mon Mar 15, 2010 2:19 am

xxx would be my char's name masked out.

Code: Select all

Id: 1002, type: 1, Name: xxx, Address: 0x1DE27300
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 1002, type: 1, Name: xxx, Address: 0x1DE27300
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 1002, type: 1, Name: xxx, Address: 0x1DE27300
Id: 100367, type: 2, Name: <UNKNOWN>, Address: 0x9CCD700
Id: 1065203561, type: 1040560188, Name: <UNKNOWN>, Address: 0x9CCD700
D:/micromacro/scripts/rom/classes/pawn.lua:169: Error in memory reading
And here is another:

Code: Select all

Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 1002, type: 1, Name: xxx, Address: 0x1DE27300
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 1002, type: 1, Name: xxx, Address: 0x1DE27300
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 100365, type: 2, Name: <UNKNOWN>, Address: 0x1EC95F00
Id: 1002, type: 1, Name: xxx, Address: 0x1DE27300
Id: 1064768976, type: 1048909566, Name: <UNKNOWN>, Address: 0x1EC95F00
D:/micromacro/scripts/rom/classes/pawn.lua:169: Error in memory reading
I have added 2 of mage/druid elites in the skills database, but I don't think that could cause the problem. Well at least I hope so. This is a relatively new char, and the problem might be related to it, or the class combo.
I am now running a bot with my older char, to check whether it also has the problem.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#6 Post by flameboy » Mon Mar 15, 2010 4:22 am

It happened with my other character too. (mob's name is masked out)

Code: Select all

Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Id: 1000, type: 1, Name: xxx, Address: 0x3F369B00
Resting finished after 4 seconds.
Id: 1064962936, type: 1045037156, Name: mobname, Address: 0x3F36D200
D:/micromacro/scripts/rom/classes/pawn.lua:169: Error in memory reading

User avatar
Administrator
Site Admin
Posts: 5330
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bot is running for hours, and then it stops with an erro

#7 Post by Administrator » Mon Mar 15, 2010 6:55 am

Can you tell what it has targeted when you get this error?

Can you also try changing the debug information like so:

Code: Select all

logMessage(sprintf("Id: %d, type: %d, Name: %s, Address: 0xX%, namePtr: 0x%X\n", tonumber(self.Id or 0), tonumber(self.Type or 0), tostring(self.Name or "[UNKNOWN]"), self.Address, namePtr));
This will dump it to your log.txt making it easier to copy. It also includes the namePtr this time.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#8 Post by flameboy » Mon Mar 15, 2010 7:09 am

Does this code go to the same place in classes/pawn.lua?
Instead of

Code: Select all

printf("Id: %d, type: %d, Name: %s, Address: 0x%X\n", tonumber(self.Id or 0), tonumber(self.Type or 0), tostring(self.Name or "<UNKNOWN>"), self.Address);
?

Servers are currently down for patching, but I will try and see what's targeted when they are up.
UPDATE: When the bot stopped, I switched to the game window, and saw, that a dead mob was targeted (but it had already disappeared)

User avatar
Administrator
Site Admin
Posts: 5330
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bot is running for hours, and then it stops with an erro

#9 Post by Administrator » Mon Mar 15, 2010 9:40 am

Yes, replace the code I gave you earlier.

It's normal for a dead enemy to still be shown as being targeted at the top of your screen. It has actually already been cleared. Can you tell me what the monster's name is and where to find it? I really need a lot more information to even begin to debug the issue. If you don't want to provide any of that sort of information publicly, PM it to me.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#10 Post by flameboy » Mon Mar 15, 2010 10:20 am

PM sent with the details.

Something is wrong with the code, because it says:

Code: Select all

Resumed.
OPENING LOCAL SKILLS DB!
Attempt to read playerAddress
D:/micromacro/scripts/rom/classes/pawn.lua:168: invalid option '%,' to 'format'
(since I inserted the new code you wrote)

User avatar
Administrator
Site Admin
Posts: 5330
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bot is running for hours, and then it stops with an erro

#11 Post by Administrator » Mon Mar 15, 2010 10:48 am

Woops, change the "Address: 0xX%". The % should be between the 'x' and 'X'.

Try disabling all addons and see if that helps at all.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#12 Post by flameboy » Mon Mar 15, 2010 1:56 pm

Yup, it must be one of the addons, because now without them it seems to be fine.
I'll try to find out which one it is.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#13 Post by flameboy » Tue Mar 16, 2010 4:58 am

I was wrong, it happens without any addon.
And it might be a performance related issue, because it seems to end up in error, when my computer gets more loading.
I send you the details from the log.txt in PM.

User avatar
Administrator
Site Admin
Posts: 5330
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bot is running for hours, and then it stops with an erro

#14 Post by Administrator » Tue Mar 16, 2010 8:07 am

What do you mean "gets more loading"? Do you mean it happens when you enter a loading screen?

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#15 Post by flameboy » Tue Mar 16, 2010 8:14 am

No, I mean when I start copying stuff in the background, or start an application. Basically do stuff outside the game and the bot (in windows) that stalls the game (and/or the bot) a little.

User avatar
Administrator
Site Admin
Posts: 5330
Joined: Sat Jan 05, 2008 4:21 pm

Re: Bot is running for hours, and then it stops with an erro

#16 Post by Administrator » Tue Mar 16, 2010 8:24 am

Ok, yeah, that could do it. And unfortunately it's a difficult thing to detect and prevent. I'll see what I can come up with, though.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#17 Post by flameboy » Tue Mar 16, 2010 8:37 am

Yeah... I am now trying to copy and archive stuff, and even though the game window is not responding, the problem doesn't occur.
I guess it needs a specific state for the problem to occur.

What I can say for sure:
- It is not specific to level, or place (or mob)
- It is not addon related.
- It is not character or class related

What I suspect, but I am not sure about:
- when there is a lag, it seems more likely to occur
- it seems to occur more, when I am running more bots

Although it just happened right now with only one window, and without experiencing a lag of any kind.

One other thing:
I have windows 7 64 bit.

flameboy
Posts: 22
Joined: Mon Jan 04, 2010 1:05 pm

Re: Bot is running for hours, and then it stops with an erro

#18 Post by flameboy » Wed Mar 17, 2010 5:22 am

Today when I switched to the game window (it was minimized), it was somewhat slow, and needed like 1-2 seconds to load it.
Meanwhile the bot wrote the following:

Code: Select all

Item:update(): empty or wrong bagid return, we don't update slot 44 name
Item:update(): empty or wrong bagid return, we don't update slot 45 name
Item:update(): empty or wrong bagid return, we don't update slot 46 name
It started from the first empty backpack slot (Backpack used 43/60). And it stopped when the game window was fully loaded. I think this is also a similar problem, only the bot doesn't stop because of this.
Also I noticed it running in circles sometimes. Instead of just going forward, it was also turning, and that resulted in running in circles. Then it started the unsticking process. But this is also happening only sometimes.

newbie2009
Posts: 12
Joined: Sun Jan 10, 2010 8:53 am

Re: Bot is running for hours, and then it stops with an erro

#19 Post by newbie2009 » Thu Mar 18, 2010 12:19 am

flameboy wrote:Today when I switched to the game window (it was minimized), it was somewhat slow, and needed like 1-2 seconds to load it.
Meanwhile the bot wrote the following:

Code: Select all

Item:update(): empty or wrong bagid return, we don't update slot 44 name
Item:update(): empty or wrong bagid return, we don't update slot 45 name
Item:update(): empty or wrong bagid return, we don't update slot 46 name
It started from the first empty backpack slot (Backpack used 43/60). And it stopped when the game window was fully loaded. I think this is also a similar problem, only the bot doesn't stop because of this.
Also I noticed it running in circles sometimes. Instead of just going forward, it was also turning, and that resulted in running in circles. Then it started the unsticking process. But this is also happening only sometimes.

yes, iam have same problem with flameboy, same error as quote. bot give that error after run more than 1 hours, and lots of unsticking, even the char not stuck at all. my high lv char in this couple days not dare use it at all, always die in area where there is no chance can't die, cause ald bot in that area almost 1 month and nvr die even once. but after the problem.... always die. btw after unsticking the bot logout the char and the rom client even not respond when i try to enter world again kind like hang, must restart pc to play the rom

PS : i will try to install win 7 x64bit in couple days when have time, work with rom and micromacro ??? <-- try to reinstall windows and rom, see if problem fixed or not

unicron
Posts: 38
Joined: Fri Mar 05, 2010 3:29 pm

Re: Bot is running for hours, and then it stops with an erro

#20 Post by unicron » Thu Mar 18, 2010 2:09 pm

I'm on win7 64bit and i've had it running for 8-10 hours at a time for a couple weeks now. I usually have 2-6 clients open on an i7 920 /w 6 gigs of ram. Rom will hardboot my system though if it hogs past the 6 gigs if I maximize / minimize one of the windows. Doesn't seem to be rombot related though.

Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 0 guests