Page 4 of 5

Re: Stuck on loading items tables

Posted: Tue Dec 21, 2010 9:26 pm
by Sumdumguy
after running the update, the bot goes past the 67%, but autosell does not work. Tomorrow I will try to debug and see what is happening (or not happening)

Re: Stuck on loading items tables

Posted: Tue Dec 21, 2010 10:14 pm
by jduartedj
Os so after eliminating EVERY variable This is what i came up with:

your bot is getting stuck at this:

Code: Select all

memoryReadInt(proc, 0x127F2D0 + (72))
Why? I honestly don't know but maybe Admin, rock5 or someone can elucidate on this.

What is address 0x127F2D0 or what does it point to?
In my case the expression above returns: 0x12694C0, what is the meaning of this address? is it the same for everyone?
Could the people experiencing the stuck problem test this:

Code: Select all

printf("THIS IS THE VALUE:\t"..memoryReadInt(proc, 0x127F2D0 + (72)).."\n");
?

and see if they return the same value (should be 19305664 or in hex 0x12694C0).
I can't reproduce the problem so I can't be much help testing, but I will continue to provide ideas and attack angles as far as i'm permited to try and solve this!

Re: Stuck on loading items tables

Posted: Tue Dec 21, 2010 11:53 pm
by rock5
I was just discussing with Administrator that there might be a problem with the 'tablesBase' address. I was double checking it by following VoidMains instructions but couldn't find the value with the 540 and 78 offset (that's the last step). It's possible the offsets have changed. Although it's a bit of a mystery why it works on some systems.

Actually if I remember correctly there was a similar issue when VoidMain initially released the memory table functions. Something about it only working on certain systems with certain configurations. Something similar might be happening here.

I think we need to wait for VoidMain to solve this and maybe release updated instructions with possibly new offsets.

Re: Stuck on loading items tables

Posted: Wed Dec 22, 2010 12:41 am
by jduartedj
I guess those offsets have something to do with My earlier posts since in that series of posts I use that address. and therefore what I assumed correct was actually wrong?
probably the pointer's address is read correctly not meaning the address that was read is correct.
Here's a thought try using the correct address from someone who's got a good configuration and searching for it in a computer that is stuck! see if there is any difference in the pointed address.

Also I just remembered that my previous assumptions weren't fool proof at all because even it the stuck occurs at 67% it doesn't mean it must be in the step regarding 67% (i=18)!!! It could be somewhere before the graphical next step is show like the line regarding "tablesbase".

Re: Stuck on loading items tables

Posted: Thu Dec 23, 2010 9:33 am
by knuffel
Hi everyone!

Had/Have the same problems -> on Windows 7/64 bit stucks nearly everytime.
Because someone mentioned it could be because of lack of permission i just tried starting ROM with administrator rights. This works for me. Everytime :)
At least it is a workaround over the hollydays ;D

Just try to rightclick rom and say Start as Administrator.

So to say thanks to get the idea I quickly registered :)

Maybe this solution works for you too.

hth,
knuffel

Re: Stuck on loading items tables

Posted: Thu Dec 23, 2010 12:01 pm
by gerrison
For me running as administrator doesnt work - that was the first option i tried.
As jduartedj already mentioned it still gets stuck in the memorytable.lua at:

Code: Select all

i = 18
Name = "QuestNPCObjectDB"
I separated the lines with increasing numbers as printf output
It goes into the 18th loop which is QuestNPCObjectDB and stops at

Code: Select all

local _table = CTDef(dataPointer);

Re: Stuck on loading items tables

Posted: Thu Dec 23, 2010 12:22 pm
by gerrison
CTDef calls CTDef:Update() which loops endless.
Activating the debugging capabilities shows the loop in the attached screenshot.

Re: Stuck on loading items tables

Posted: Fri Dec 24, 2010 12:14 am
by Administrator
Thanks for all the debugging information. It truly is helpful. Tomorrow (Dec. 24th) is the first day I actually have off, so I might actually get a chance to tackle this problem.

Re: Stuck on loading items tables

Posted: Fri Dec 24, 2010 1:10 am
by rock5
Administrator wrote:Thanks for all the debugging information. It truly is helpful. Tomorrow (Dec. 24th) is the first day I actually have off, so I might actually get a chance to tackle this problem.
I hope so because I have no idea. I have the problem so if you need me to test anything, just send it my way.

Re: Stuck on loading items tables

Posted: Fri Dec 24, 2010 1:28 am
by Administrator
Line 91 of classes/memorytable.lua, you'll see this:

Code: Select all

				if ( currId == nil or currId == 0 or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then
Change those 3s to, say, 20. Does that fix it?

Re: Stuck on loading items tables

Posted: Fri Dec 24, 2010 7:40 am
by ratzuk
Change line to read

Code: Select all

if ( currId == nil or currId == 0 or ( ( currId > ( lastId + 20 ) ) or ( currId < ( lastId - 20 ) ) ) ) then
made no difference - still stuck at 67%

The removed the secon part of the expression complelely and tried

Code: Select all

if ( currId == nil or currId == 0 ) then

This seem to work for me at least

Re: Stuck on loading items tables

Posted: Fri Dec 24, 2010 8:36 am
by gerrison
It doesn't work for me because it loops endless with a single currid: 113177
currid before was: 111130

Adding
if ( currId == nil or currId == 0 or currId == currId or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then
brings up an "attempt to compare number with nil" error on the line

Code: Select all

if ( self.StartId > 800000 ) then -- Special case for one table that starts 32 bytes before...
I added the following for the attached screenshot:

Code: Select all

function CTDef:Update()
	self.StartId = memoryReadInt(proc, self.Address + addresses.idOffset );
		if ( self.StartId == nil ) then
		cprintf( cli.yellow, "\nself.StartId: NIL :(\n" );
		cprintf( cli.yellow, "proc: %s\n", proc );
		cprintf( cli.yellow, "self.Address: %s\n", self.Address );
		cprintf( cli.yellow, "addresses.idOffset: %s\n", addresses.idOffset );
	end;
	if ( self.StartId > 800000 ) then -- Special case for one table that starts 32 bytes before...
Sorry, i have no idea of coding but i hope it helps anyways ;)

Re: Stuck on loading items tables

Posted: Fri Dec 24, 2010 2:29 pm
by ezgitaran
Some more feedback;
> Today 2 of my clients (characters) managed to load itemstables into cache, without any modification on revision 549. Then, they never stuck at 67% because there's a stored cache
> My third client, stuck at 67% like before, tried few times loading itemstables with no luck and restarted client. Magically it loaded itemstables after that...

Btw, r550 is available for testing :P

Re: Stuck on loading items tables

Posted: Fri Dec 24, 2010 7:10 pm
by rock5
I tried this at line 87,

Code: Select all

print("lastItemDir",lastItemDir)
			currItemDir = GetNextTableAddress( lastItemDir );
print("currItemDir",currItemDir)
It spat out output like this when it got stuck,

Code: Select all

lastItemDir     266338304
currItemDir     266338336
lastItemDir     266338304
currItemDir     266338336
lastItemDir     266338304
currItemDir     266338336
lastItemDir     266338304
currItemDir     266338336
That looks wrong as, before it gets stuck, the differences between the 2 values are usually much much larger.

Re: Stuck on loading items tables

Posted: Sat Dec 25, 2010 1:16 am
by Administrator
Lets try this...
Line 87 of memorytable.lua, see this:

Code: Select all

			currItemDir = GetNextTableAddress( lastItemDir );

			if ( currItemDir ~= nil ) then
				currId = memoryReadInt(proc, currItemDir + addresses.idOffset ); -- 12 bytes offset object id
				if ( currId == nil or currId == 0 or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then
					-- no more ids for current table
					break;
				else
					self.EndId = currId;
					lastStartId = currId;
					lastStartDir = currItemDir;
				end;
			else
Change to:

Code: Select all

			local dupecheck = currItemDir;
			currItemDir = GetNextTableAddress( lastItemDir );

			if ( currItemDir ~= nil ) then
				if( currItemDir == dupecheck ) then
					-- Skip it.
					printf("[DEBUG] Skip dupe\n");
					self.EndId = currId;
					lastStartId = currId;
					lastStartDir = currItemDir;
				else
					currId = memoryReadInt(proc, currItemDir + addresses.idOffset ); -- 12 bytes offset object id
					if ( currId == nil or currId == 0 or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then
						-- no more ids for current table
						break;
					else
						self.EndId = currId;
						lastStartId = currId;
						lastStartDir = currItemDir;
					end;
				end
			else
What happens?

Re: Stuck on loading items tables

Posted: Sat Dec 25, 2010 7:55 am
by rock5
Doesn't work. Still behaves the same. Tried printing currItemDir before and after that line 87 and it show that they are not the same.

Code: Select all

preItemDir      266338272
postItemDir     266338336
preItemDir      266338272
postItemDir     266338336
preItemDir      266338272
postItemDir     266338336
So comparing them to see if they are duplicate wont work. It sort of looks like it takes a step forward then 1 back, a step forward then 1 back.

Re: Stuck on loading items tables

Posted: Sat Dec 25, 2010 1:51 pm
by Administrator
I get the feeling that the problem is that it's not properly detecting the end (or rather start, since it goes backwards) of that table there, and that occasionally, the memory just beyond the start is a duplicate of the first item. Because it neither wants to advance to the next item nor break from the loop, it continues until the memory randomly gets changed (from any number of processes) to something that would cause it to break.

Lets try this. Change this line:

Code: Select all

if ( currId == nil or currId == 0 or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then
To:

Code: Select all

if ( currId == nil or currId == 0 or currId == lastId or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then

Re: Stuck on loading items tables

Posted: Sat Dec 25, 2010 4:06 pm
by gerrison
stuck :cry:
posting output one line before:
currid: 113177
lastid: 113176
currid: 113177
lastid: 113176
currid: 113177
lastid: 113176
endless

Re: Stuck on loading items tables

Posted: Sat Dec 25, 2010 4:36 pm
by Administrator
Ok then...Lets try this.

Code: Select all

		dupeIdCheck = currId;
		currId = memoryReadInt(proc, currItemDir + addresses.idOffset ); -- 12 bytes offset id object

		if ( currId == nil or currId == 0 or dupeIdCheck == currId or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then

Re: Stuck on loading items tables

Posted: Sat Dec 25, 2010 5:19 pm
by gerrison
Are we still talking bout Line 90?

Code: Select all

if ( currItemDir ~= nil ) then
	dupeIdCheck = currId;
            currId = memoryReadInt(proc, currItemDir + addresses.idOffset ); -- 12 bytes offset object id
			if ( currId == nil or currId == 0 or dupeIdCheck == currId or ( ( currId > ( lastId + 3 ) ) or ( currId < ( lastId - 3 ) ) ) ) then
still loops and dupeIdCheck is nil at this point