V7. App freeze Issue with uoai.clients[].player.name

The latest version of the UOAI library and all directly related information can be found in this forum.

V7. App freeze Issue with uoai.clients[].player.name

Postby Endless Night on Fri Sep 25, 2009 3:56 am

V7 - Using ComObject Language: Delphi

I'm loving your component the move i use it

You implemented 2 ways to get the player name.
Original name. UOAI.Clients[].playername
CurrentNAme UOAI.Clients[].Player.name (Nice if incognitoed /disguse kit can get currentname)

Retriveing the Original name works fine and is instantanous. Reading the value of the current name is so slow it freezes my app for a period of time.

Note: reading other "player" properties is instantanous eg UOAI.Clients[].Player.x
Endless Night
n00b
 
Posts: 7
Joined: Sat May 02, 2009 3:53 am

Re: V7. App freeze Issue with uoai.clients[].player.name

Postby Artaxerxes on Fri Sep 25, 2009 5:13 am

Endless Night wrote:You implemented 2 ways to get the player name.
Original name. UOAI.Clients[].playername
CurrentNAme UOAI.Clients[].Player.name (Nice if incognitoed /disguse kit can get currentname)


3 ways actually: client.PlayerName reads the name stored at login; Player.Name reads it from a statusinfo packet; and Player.Item.Name reads the AOS Name (name displayed in the item-properties gump introduced with AOS). Maybe use the last one for now.
Statusinfo reading is bugged currently (so not just Mobile.Name, also all other statusinfo); it should read correctly but when used often it can slow down your client. This problem was reported before, I just didn't get to fixing it at that time; stopped working on UOAI for some time; and now that I got back to UOAI i have been focusing on the next .NET library. I'll see if i can provide a quick fix today or this weekend however.
The problem comes from the fact that i misunderstood the protocol part for statusinfo reading: i am sending a packet to request statusinfo; then wait for the response and read that... but actually the packet i send actually requests the server to 'start sending' status updates; and i never tell it to stop; so when sent too often this becomes problematic. It was Megamandos who figured out how i'm supposed to fix this, so credits go to him. The fix is however a little tricky internally, which is why it wasn't implemented yet.

Greetz,
Artaxerxes
Artaxerxes
Site Admin
 
Posts: 530
Joined: Tue Nov 18, 2008 9:51 pm

Re: V7. App freeze Issue with uoai.clients[].player.name

Postby Artaxerxes on Fri Sep 25, 2009 7:25 am

Should be fixed now!

Download and re-install the COM library, and all statusinfo access (including player.Name) should now work correctly I think.

Greetz,
Artaxerxes
Artaxerxes
Site Admin
 
Posts: 530
Joined: Tue Nov 18, 2008 9:51 pm

Re: V7. App freeze Issue with uoai.clients[].player.name

Postby Endless Night on Fri Sep 25, 2009 1:00 pm

Wow nice fixed while i was sleeping. I'll download it and give it a go shortly.

Thank you.
EN.

Downloaded and tested. Working perfect. And i really like the fact that the status bar does not need to be opened to recieve that information, thats something that always anoyed me on EUO.
Endless Night
n00b
 
Posts: 7
Joined: Sat May 02, 2009 3:53 am

Re: V7. App freeze Issue with uoai.clients[].player.name

Postby Artaxerxes on Fri Sep 25, 2009 2:03 pm

This was actually a fix i should have implemented months ago after megamandos explained me how to do this. :)
Some other fixes are still quite essential:
  • fixing the enumerators: foreach(UOItem curitem in Player.Backpack) {curitem.Drag...} would fail with the current version cause the contents of the backpack is not allowed to change while enumerating it... so you need to dump the contents into a list or array and then enumerate that array. This is not really a bug, try enumerating some datastructures in .NET and removing the item you currently got from the enumerator; several of the datastructures will throw an exception. The only solution for this is the trick of dumping everything into a second list and enumerating from there; so the only fix i can provide is to do this in the background and transparantly return an enumerator for that list instead of one for the original datastructure.
  • Finditem calls are relatively slow, cause they perform linear searches. This basically requires rebuilding the event system and allowing for synchronized packet handling. Most changes are located in the injected UOClientDll.dll and were already done while working on the next .NET library; so it makes sense to rewrite the COM library to start using this new version of the injected dll.
  • By switching to this new UOClientDll.dll i would also be able to join the >=v7.0.0.0 and <v7.0.0.0 version. (it would work for now, but still the callibration part requires some major updates)
  • Since i'm switching to another dll, i might also look at switching to another dll-injection method, which will be required to compile a 64bit version of the COM library; probably i'll switch from windows hooks to the code-injection/setThreadContext method, unless someone knows a better method? (thing that annoys me with code-injection is that i have to allocate a whole memory-page on the client, of which i will only use a few bytes to perform the loadlibrary call and restore the original EIP)
  • Self-Registration functionality should finally be implemented correctly, to allow for easier distribution.

That are actually all essential changes i can think of right now... anything else i can think of right now are all new features, so less essential; but if anyone thinks something should be added... you should tell me now!
The major part of those chagnes would be rewriting UOClientDll.dll, which was already done as part of the next .NET library, so i think i can fix all of this quiet fast now; makes sense to do this first before continuing on the .NET library.
Artaxerxes
Site Admin
 
Posts: 530
Joined: Tue Nov 18, 2008 9:51 pm

Re: V7. App freeze Issue with uoai.clients[].player.name

Postby Endless Night on Fri Sep 25, 2009 4:46 pm

WEll on further testing although faster than it was. Reading any of the Statusbar values causes a slow down. Trying to read them all repeatedly causes a serious slow down.

If i track uoai.clients[x].player.x / y / z via a timer i can get every change instantly .. if i add in the player.name it starts to skip location x/y/z changes when running.. the more StatusBar Variables i track the worse the slow down gets to the point where im only registering every 20tiles in movement or app feeze.
Endless Night
n00b
 
Posts: 7
Joined: Sat May 02, 2009 3:53 am

Re: V7. App freeze Issue with uoai.clients[].player.name

Postby Artaxerxes on Fri Sep 25, 2009 4:50 pm

Hmm... not sure how that happens.... i'll make sure this is fixed before the end of this weekend.

edit : Ok, figured this out; am working on fixing this...
Artaxerxes
Site Admin
 
Posts: 530
Joined: Tue Nov 18, 2008 9:51 pm


Return to UOAI Developers Forum

Who is online

Users browsing this forum: No registered users and 1 guest

cron