Character stays logged in (POL 97 RC2 & RC3, WinXP)

Report core bugs regarding the Ultima Online Emulator Core release (version 097). You can attach your Core Dump. One bug per post.
Locked
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Character stays logged in (POL 97 RC2 & RC3, WinXP)

Post by ncrsn »

Problem: after logging out with client, character stays online. Console prints Disconnecting client 0x080a57d8(ncrsn/ncrsn), but logoff scripts do not activate. Character is still listed in EnumerateOnlineCharacters function. Also mobile.connected property is 1.

What has been done: I have triplechecked logoff and logofftest scripts, added prints to see if those are run (not!). I wrote a script that activates on logon, which printed "character.name is online" as long as .connected was true. After 30 minutes of logoff text still keeps printing. Various clients, accounts and characters are used. Config files are set to same as on the Real Shard (mine is just for developing), where I and others -AFAIK- have no issue of this kind. I even created realms again, just to be sure. And now I'm running out of ideas. Probably this is just a small option somewhere, because other servers with the same POL, scripts and settings have no problem at all.

I tried both POL 97 RC2 and RC3, no difference. I assume this started when moving from 96 to 97, but, because of the great difference in scripts, I cannot move back to 96 to test that out.

If I ever manage to fix another computer I have, I'll try this on it. (Edit: tried using exactly the same set on another XP machine, no use).

Have anyone ran onto same problem, and if, how did you get it fixed? Ideas?
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Never heard of this one before!

I'd be looking in the logofftest.src file. It's function is to return a value in seconds before the core logoff process starts. Maybe it's just looping or returning a huge number or a non integer.

Try putting in a print statement to show the value it is returning. At least you wil see it's setting an integer value.
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

Code: Select all

// scripts/misc/logofftest.src

program logofftest( who )

    print("Logofftest");
    
    return 0;

endprogram
I tested with above logofftest. Recompiled script and restarted POL. Logged in and out. "Logofftest" never shows up on the console.

Also tried setting option LogLevel 20 in pol.cfg. No new information is printed.
Xenawar
New User
Posts: 13
Joined: Thu May 03, 2007 2:23 pm

Post by Xenawar »

Are any of your other 'standard' scripts in /scripts/misc being run? Try putting debug messages in the logon.src there, as well as chrdeath, death; Also, is your script compiled? For the right version of POL? Perhaps you have a different POL core version than is on the production shard? Maybe check out your pol.cfg; something seems to be preventing your logofftest.ecl from running, and perhaps it's also preventing other similar scripts to triggering?
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

My logon.src is following:

Code: Select all

program logon( who )

    Start_Script("misc/connected", who);

    [...]

endprogram
And connected.src:

Code: Select all

program connected( who )

    while (who.connected)
        print("Online: " + who.name);
        sleep(30);
    endwhile

endprogram
"Online: ncrsn" shows up on console even when there's no client connected to server. So, yeah, logon script activates like it should. So does chrdeath and death. But, you made a valid point, reconnect is never activated either. Didn't notice this myself before. Surely it's because of character never dropping out from server.

Scripts are compiled and POL (and ecompile and modules) are from 97-2007-04-15 RC3 zip.

I toggled some options in pol.cfg, again. No difference. I cannot see a thing in there that should make the trick, so I was just trying my luck. Anyhow, thank you both.
User avatar
OldnGrey
POL Expert
Posts: 657
Joined: Sat Feb 04, 2006 6:26 pm

Post by OldnGrey »

Incidently, I seem to recall that character.connected has some problems. The distro uses character.ip as it seems to be more dependable.
User avatar
Austin
Former Developer
Posts: 621
Joined: Wed Jan 25, 2006 2:30 am

Post by Austin »

OldnGrey wrote:Incidently, I seem to recall that character.connected has some problems. The distro uses character.ip as it seems to be more dependable.
mobile.connected is 'true' when the character is logged in and active.
On logout, mobile.connected is set to 'false' and logofftest runs. When the number of seconds logofftest returned have passed, then mobile.ip becomes blank.
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

Post by ncrsn »

OldnGrey wrote:Incidently, I seem to recall that character.connected has some problems. The distro uses character.ip as it seems to be more dependable.
Even if it does, error remains. As it is not just the print, but the whole unable to logout -mystery.
Austin wrote:On logout, mobile.connected is set to 'false' and logofftest runs.
Any ideas why this would not happen?
VeNdOr
Apprentice Poster
Posts: 52
Joined: Tue Feb 07, 2006 10:36 am

Post by VeNdOr »

Austin wrote:
OldnGrey wrote:Incidently, I seem to recall that character.connected has some problems. The distro uses character.ip as it seems to be more dependable.
mobile.connected is 'true' when the character is logged in and active.
On logout, mobile.connected is set to 'false' and logofftest runs. When the number of seconds logofftest returned have passed, then mobile.ip becomes blank.
some times connected is true but ip is blank (the character is no more connected).
MuadDib
Former Developer
Posts: 1091
Joined: Sun Feb 12, 2006 9:50 pm

Post by MuadDib »

Appears this is happening when clients do not acknowledge with a logout packet, or otherwise "disconnect without notice", and core does a cleanup of disconnected clients.

The key to this was the "Disconnecting client " blah blah. That's only used in one function, which is this cleanup function, so it narrows down the search for what I am looking for.

Will have to see what we can do here.
Locked