Page 1 of 1

Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sat Aug 06, 2011 11:06 am
by pumbatoo
Hi there, can't start the bot since ROM patch 4.0.1 on 26th last month.

While starting the bot.lua the starting progress will be aborted by the message

Code: Select all

C./micromacro/scripts/rom/classes/memorytable.lua:77: attempt to perform arithmetic on local 'tmpID' (a nil value)
I added the values of the variables _address, lastId and tmpID to the output and made a screenshot (see below).
Tried with the latest svn revision 637 and with revision 628 - revert done.

By the way, is there any way to check if the cursor position in the console is at column/x-axis 0 - so I could add \n to the output if it's not at the beginning of the line, to avoid that my output is in same line like the progress bar?

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sat Aug 06, 2011 9:18 pm
by rock5
Hm... "Revision Unknown". I'd say try doing an svn update.

Afterwards, right click the "rom" folder and select "TortoiseSVN/Revert".

If you don't have TortoiseSVN installed, follow the TortoiseSVN instructions here.
http://www.solarstrike.net/phpBB3/viewt ... structions

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 4:07 am
by pumbatoo
Revision is Unknown because I'm using git instead of svn for managing the repository (there are many advantages for me from using git).
But it should not be the problem here. As I sad, my repo is up to date at revision 637 && reverted.

Edit:
I tried now with a new svn checkout - same exception...

Edit 2:
ROM is running in a VM (VMware). At the host I can run the bot without problems.
Host: Windows 7 x64
Guest: Windows XP x86 with 1536 MB memory and two cores

Hmm... could it depend on the memory? 1536MB <= 1'610'612'736 Bytes; the bot throws the exception at address 1'634'494'044

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 4:31 am
by rock5
I was going to suggest increasing the virtual memory. Either that or it's a problem with the way the vm handles memory.

Maybe someone with more experience running it under vm, could comment.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 5:00 am
by pumbatoo
The memory size seems to be not the problem.
I turned off the swap file and increased the size of my virtual memory to 2520 MB - enough for the address 1'634'494'044.
Still the same problem. Until ROM path 4.0.1 all were going fine :cry:

Any ideas how the tmpID could be nil?

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 7:34 am
by pumbatoo
Don't know if it is helpfull: I just created some debug output and added a screen of it. l20 means line 20 at memorytable.lua
I have no experience with the memory management so I couldn't go any more in deph.

Hopefully there is a solution.

P.S: Is anybody still using ROM + bot inside a virtual machine (VMware) successfully.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 11:14 am
by pumbatoo
I've found a workaround by decreasing the variable threshold from 256 to 60 (all values less then 89 should work)
The value of threshold was increased at revision 619 from 10 to 256 - don't know the reason. I hope rock5 can explain.

Hint: The progress ended with the notice that the item address for id 503827 could not be found. The notice occured only once when I started the bot first time.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 11:44 am
by rock5
The threshhold was increased so that it finds all the ranges and you don't get "table range not found errors".

We are toying around with a completely different method for getting item addresses and ids in this thread thanks to SpiralV.
http://www.solarstrike.net/phpBB3/viewt ... 037#p25037
Try the replacement memorytables.lua file. Maybe it will solve your problem.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 12:18 pm
by pumbatoo
I have still seen the post from SpiralV and tried out his memorytable.lua but my micromacro window crashed when using it.
I had run bot.lua and entered DEL/INS (?) when it was expected, after it normaly the progress bar will be displayed. With the new file, there will be nothing displayed a few seconds (about 5-10 secs), then I think I have seen some lines were outputted but could not read anything cause the window were closed immediately afterwards.

Tried by manually run bot.lua in the mm window and by using the startbot.bat
How can I see if there were some output at the end of its runtime?

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 12:25 pm
by rock5
I haven't heard of mm just closing so don't know what could cause it but you could probably have a look at "log.txt" in the mm folder.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Sun Aug 07, 2011 6:17 pm
by pumbatoo
Tried again without success. My log.txt says nothing:

Code: Select all

Mon Aug 08 01:13:20 2011 : Processor Type: 2X 586 @2833MHz, OS: Windows XP Service Pack 3
Mon Aug 08 01:13:20 2011 : User privilege level: Administrator
Mon Aug 08 01:13:21 2011 : Lua glues exported.
Mon Aug 08 01:13:21 2011 : MicroMacro v1.01 beta 4
Mon Aug 08 01:13:21 2011 : LuaCoco is available.
Mon Aug 08 01:13:21 2011 : Keyboard layout: US English
Mon Aug 08 01:13:21 2011 : Executing script 'bot.lua'
-------------------------------------------------------------------------------


Mon Aug 08 01:13:21 2011 : Loading of audio file 'C:/micromacro/scripts/rom/userfunctions/alarm.wav' has failed
Mon Aug 08 01:13:21 2011 : [WARN]: ...scripts/rom/userfunctions/userfunction_gmmonitor.lua:16
Failed to load sound file 'alarm.wav'
Mon Aug 08 01:13:21 2011 : Bot addon 'gmmonitor' successfully loaded.
Mon Aug 08 01:13:21 2011 : Bot addon 'QuestByName' successfully loaded.
Mon Aug 08 01:13:21 2011 : Language: english
Mon Aug 08 01:13:30 2011 : Using static char address 0x9C77FC, player address 0x39568C00

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Mon Aug 08, 2011 4:36 am
by pumbatoo
Edit:
After cleaning up unversioned files (i.e. files in cache folder) from my repository first I thought it's going right now.
At the moment it looks like it was not depended on the cleanup of the cache folder. It seems to be depended on the location of my character?

I recently created a new rom character. When I run the new character and start the bot, the mm window is closing a few seconds after pressing the start key DEL. I wrote before about that problem.

With the workaround explaind below I can still run the bot.

After walking a bit in the world and killing some creeps I was able to start the bot with the new memorytable.
Next I will try to stay lvl 1 and just walk a bit to isolate if it's either a location problem or more a problem with the characters level or something else.

My flow:
1. created a new mage human
2. enter the world with the new char
3. revert and cleanup repo
4. insert new memorytable
5. try to start the bot (mm window just closing after a few seconds)
6. revert and cleanup repo (old memorytable will be restored)
7. set variable threshold in memorytable to 89
8. start the bot successfully
9. let the bot do some work

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Mon Aug 08, 2011 8:56 am
by rock5
Which file did you use? Mine or SpiralVs? Mine has some performance issues so you should try SpiralVs. Also it looks like he has updated it so try the new version.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Tue Aug 09, 2011 12:52 pm
by pumbatoo
It's working now for me. Even with a new created char.
I'm using your recently uploaded memorytable.lua. Well done, thanks a lot.

Edit: Can u delete this thread? Think it's obsolete now.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Thu Aug 11, 2011 8:33 am
by rock5
I've committed the new memorytable.lua file. Please update and don't forget to do an svn revert.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Fri Aug 19, 2011 9:18 am
by Tamyra
Okay I tabled the elfdaily bot for a while until I got a new computer in hopes my problems were a RAM/Processor resource issue and I've put all the files in the correct locations, names etc... but I'm still getting this error, so I'm hoping there's a quick fix or someone can point me in the right direction in case something has been changed since ch4.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Fri Aug 19, 2011 12:40 pm
by rock5
Tamyra wrote:I've put all the files in the correct locations
I don't think so. The error says the file isn't there, so I'd say you didn't put them in the right location. The "bot.lua" file should be in the "micromacro\scripts\rom\" folder. Along with all the other files and folders of course.

Re: Exception at memorytable.lua:77 since Patch 4.0.1

Posted: Fri Aug 19, 2011 1:58 pm
by Tamyra
Yeah I just looked at the folder again, seems that was not the only file missing. Apparently when I copied via thumb drive from my old computer to my new, any file that was not recognized by the system was ignored and not copied. Now I'm going to double check each folder individually and make sure all the files are where they are supposed to be again, because for whatever reason SVN refuses to work on the new computer, only on the old one. >.>

EDIT: So I tried SVN directly on the thumb drive and that worked, then I tried running it from the thumb drive and I've never seen it run so smoothly before except for this: