Pawn.lua Error - Please help

Runes of Magic/Radiant Arcana (http://www.runesofmagic.com)
Post Reply
Message
Author
iggypop
Posts: 2
Joined: Tue Jan 18, 2011 9:59 am

Pawn.lua Error - Please help

#1 Post by iggypop » Wed Jan 19, 2011 7:36 am

Hello, I have the following Problem (When my character are go in or out Instances):

Rombot crashes with this Error: C:/micromacro/scripts/rom/classes/pawn.lua:279: Error reading memory in CPawn:update()

Revision is r560

Is there anybody who can help me?


log:

stack traceback:
C:/micromacro/scripts/rom/classes/pawn.lua:279: in function 'update'
C:/micromacro/scripts/rom/classes/player.lua:2277: in function 'update'
C:/micromacro/scripts/rom/classes/player.lua:1783: in function 'moveTo'
scripts\rom\bot.lua:648: in function 'foo'
C:\micromacro\lib\lib.lua:538: in function <C:\micromacro\lib\lib.lua:536>

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

Wed Jan 19 13:33:55 2011 : C:/micromacro/scripts/rom/classes/pawn.lua:279: Error reading memory in CPawn:update()
Wed Jan 19 13:33:55 2011 : Execution error: Runtime error

-----------

JackBlonder
Posts: 99
Joined: Sat Dec 18, 2010 6:55 am

Re: Pawn.lua Error - Please help

#2 Post by JackBlonder » Wed Jan 19, 2011 9:14 am

Try to add

Code: Select all

waitForLoadingScreen(); 
where you leave the instance

iggypop
Posts: 2
Joined: Tue Jan 18, 2011 9:59 am

Re: Pawn.lua Error - Please help

#3 Post by iggypop » Wed Jan 19, 2011 11:55 am

I have already tried this. it works for some time and then same Error :(

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

Re: Pawn.lua Error - Please help

#4 Post by Administrator » Wed Jan 19, 2011 5:49 pm

Well, at least you read the forum topic and totally followed the rules.

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Pawn.lua Error - Please help

#5 Post by rock5 » Thu Jan 20, 2011 1:34 am

iggypop wrote:it works for some time and then same Error :(
This is the expected behavior. If you have a wp file that goes in and out of instances, it will eventually crash as the game client doesn't manage memory too well.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: Pawn.lua Error - Please help

#6 Post by Giram » Thu Jan 20, 2011 2:09 am

Would it be possible to logout or teleport if we get this error?

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Pawn.lua Error - Please help

#7 Post by rock5 » Thu Jan 20, 2011 2:34 am

Giram wrote:Would it be possible to logout or teleport if we get this error?
Sorry I thought you said the game crashed.

So the game doesn't crash? It's really hard to pinpoint the cause of these errors. I think it usually has something to do with a strain on memory, like running too many clients at once or using other memory intensive programs while rombot is running. I can't be sure though.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Pawn.lua Error - Please help

#8 Post by lisa » Thu Jan 20, 2011 2:40 am

I have exact same error after resurection, CPawn:update()
I'm thinking the last SVN update has issues, I noticed the micromacro.exe and micromacro.cpb weren't in the SVN at all. I posted it on the micromacro forum support.
Not sure if any other files were missing.
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: Pawn.lua Error - Please help

#9 Post by Giram » Thu Jan 20, 2011 2:52 am

I was trying to set

Code: Select all

player:logout("true");

to pawn.lua...

Code: Select all

	if( self.Alive == nil or self.HP == nil or self.MaxHP == nil or self.MP == nil or self.MaxMP == nil or
		self.MP2 == nil or self.MaxMP2 == nil or self.Name == nil or
		self.Level == nil or self.Level2 == nil or self.TargetPtr == nil or
		self.X == nil or self.Y == nil or self.Z == nil or self.Attackable == nil ) then

		error("Error reading memory in CPawn:update()");
		player:logout("true");
	end
...but it didn't work. So it's not possible to do this if we get memory reading error? That could be wrong place also but i don't know where in code bot stops if we get error.

I did waypoint that involves running in instance and i got that Error reading memory in CPawn:update() very randomly and i think i should do something else. Yesterday it crashed twice in hour but run well this night and at morning it was running and few mins later it was stopped and died.

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

Re: Pawn.lua Error - Please help

#10 Post by Administrator » Thu Jan 20, 2011 2:58 am

...but it didn't work.
Well, the error function is being called before the player:logout function in your code. error() stops execution, therefore, the call to player:logout() was never reached. That, and I'm not sure why you have true in quotes. You probably don't want to pass a string.

User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: Pawn.lua Error - Please help

#11 Post by Giram » Thu Jan 20, 2011 3:15 am

I thought that was just error message. I placed logout above it and removed "" from logout. Going to test it now to see how its working.

User avatar
Giram
Posts: 191
Joined: Thu Aug 26, 2010 3:34 pm
Location: Finland

Re: Pawn.lua Error - Please help

#12 Post by Giram » Fri Jan 21, 2011 2:10 am

Finally got that pawn.lua error.

I added logout when it finds nil value and bot would stop working. So when it happened it logged out and i didn't die and that was what i hoped for. There was also post where some added checks for nil values and i have those added also. Dunno if it helps but haven't got many errors and was suprised that didn't get any errors yesterday with pawn.lua. I add this file if someone wants to try it. Modified from line 262 to 297.

Only thing what this didn't do was post that pawn error. There should be print before logout or something.

Code: Select all

error("Error reading memory in CPawn:update()");
Edit: If setting LOGOUT_SHUTDOWN is true then it will shutdown your pc i think. If its false then it should just go to character select screen.

Code: Select all

<option name="LOGOUT_SHUTDOWN"		value="true" />
Attachments
pawn.lua
(14.4 KiB) Downloaded 201 times

User avatar
jduartedj
Posts: 599
Joined: Sat Dec 19, 2009 12:18 am
Location: Lisbon
Contact:

Re: Pawn.lua Error - Please help

#13 Post by jduartedj » Fri Jan 21, 2011 7:05 am

Actually I've encountered a CPawn error afew times in middle of botting with no apparent reason!
Thanks for reading! :D

Some of you might find this useful: RoM-bot Wiki
User Functions Repository (and other useful files): Addon Repo
Latest SVN updates: SVN updates

del3e7
Posts: 6
Joined: Wed Feb 02, 2011 8:01 pm

Re: Pawn.lua Error - Please help

#14 Post by del3e7 » Tue Feb 08, 2011 6:00 pm

jduartedj wrote:Actually I've encountered a CPawn error afew times in middle of botting with no apparent reason!

I have this same problem, I just get a CPawn error in the middle of botting with no reason, and I don't know how to pursue fixing it. Anyone have any ideas what might cause this?

666morpheus
Posts: 5
Joined: Fri Feb 04, 2011 12:05 pm

Re: Pawn.lua Error - Please help

#15 Post by 666morpheus » Sun Mar 13, 2011 8:08 pm

del3e7 wrote:
jduartedj wrote:Actually I've encountered a CPawn error afew times in middle of botting with no apparent reason!

I have this same problem, I just get a CPawn error in the middle of botting with no reason, and I don't know how to pursue fixing it. Anyone have any ideas what might cause this?
Same here - rom/classes/pawn.lua:333: Error reading memory in CPawn:update()

User avatar
lisa
Posts: 8332
Joined: Tue Nov 09, 2010 11:46 pm
Location: Australia

Re: Pawn.lua Error - Please help

#16 Post by lisa » Mon Mar 14, 2011 7:39 am

I might have stumbled across what is happening by chance.

I had bot running and clicked on ground (which drops target) and got cpawn error instantly. I'm guessing it tried to update the target and there wasn't a target and so got the error.
So I am thinking with the new edit box thing and using escape, if it does escape when there is no boxes up then it will drop target and cause the error. Does this sound like what might be happening?
Remember no matter you do in life to always have a little fun while you are at it ;)

wiki here http://www.solarstrike.net/wiki/index.php?title=Manual

User avatar
rock5
Posts: 12173
Joined: Tue Jan 05, 2010 3:30 am
Location: Australia

Re: Pawn.lua Error - Please help

#17 Post by rock5 » Mon Mar 14, 2011 10:11 am

lisa wrote:I might have stumbled across what is happening by chance.

I had bot running and clicked on ground (which drops target) and got cpawn error instantly. I'm guessing it tried to update the target and there wasn't a target and so got the error.
So I am thinking with the new edit box thing and using escape, if it does escape when there is no boxes up then it will drop target and cause the error. Does this sound like what might be happening?
Actually, it's easy to test. I just removed the edit box changes and clicked the ground while the bot was running and still got the error.

By the way, there is a possible fix being explored at this post
www.solarstrike.net/phpBB3/viewtopic.php?p=19274#p19274
It needs more testing so if you are having this error, try it out. Just replace pawn.lua.
  • Please consider making a small donation to me to support my continued contributions to the bot and this forum. Thank you. Donate
  • I check all posts before reading PMs. So if you want a fast reply, don't PM me but post a topic instead. PM me for private or personal topics only.
  • How to: copy and paste in micromacro
    ________________________
    Quote:
    • “They say hard work never hurt anybody, but I figure, why take the chance.”
          • Ronald Reagan

666morpheus
Posts: 5
Joined: Fri Feb 04, 2011 12:05 pm

Re: Pawn.lua Error - Please help

#18 Post by 666morpheus » Mon Mar 14, 2011 10:25 am

rock5 wrote:
lisa wrote:I might have stumbled across what is happening by chance.

I had bot running and clicked on ground (which drops target) and got cpawn error instantly. I'm guessing it tried to update the target and there wasn't a target and so got the error.
So I am thinking with the new edit box thing and using escape, if it does escape when there is no boxes up then it will drop target and cause the error. Does this sound like what might be happening?
Actually, it's easy to test. I just removed the edit box changes and clicked the ground while the bot was running and still got the error.

By the way, there is a possible fix being explored at this post
http://www.solarstrike.net/phpBB3/viewt ... 274#p19274
It needs more testing so if you are having this error, try it out. Just replace pawn.lua.
works so far, no errors anymore. Thanks a lot!

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 40 guests