Abstract: Server crashes on logout due to two simultaneous logout events per player logout. This is could be a script error, could be a server error. That PO Main runs fine seems to indicate the former, but the logs I have taken a look at indicate the latter. I am running this off a fresh 2.5.0 install. The client works perfectly, so I doubt it's a faulty installation problem. This is what the server looks like: Code (text): Setting home dir to : "C:/Users/[snip]/Pokemon Online 2.5/./" ----------------------- New Server, starting logs ----------------------- Server is running in windowed mode "Connection to the database established!" "Starting loading pokemon database..." "Pokemon database loaded" Running sanity check for gen 0 Running sanity check for gen 1 Running sanity check for gen 2 Running sanity check for gen 3 Running sanity check for gen 4 Running sanity check for gen 5 "Members loaded" "Starting to listen to port 5080" "Channel The Restaurant was created" "Running Daily Run for tier All" "0 alts removed from the ladder." "0 secs" " " Set daily run days to 182 Processing daily run for members with limit "2014-05-06T17:11:45" Daily run for members finished "Script Check: OK" "Channel Auth Cave was created" "Channel Watch was created" "Channel Party Time! was created" "Channel Elsewhere was created" "Channel League was created" "Channel The Mosh Pit was created" "Channel Role Playing was created" "Channel Goldenrod City was created" loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread loading member in memory not with a thread "Announcement changed." "<font color=blue><timestamp/></font><b><i><font size=4><font color=blue>Script Update:</font> Pizza Delivery for I C Weiner!</font></i></b>" Warning: QObject::connect: No such slot ScriptEngine::battleConnectionLost() "The server is now public." "Connecting to registry..." "Connected to registry! Sending server info..." "Connecting to battle server on port 5096..." "Connected to battle server!" "Received pending connection on slot 1 from 127.0.0.1" "Player 1 set name to pan" "pan joined channel The Restaurant." "[#Watch] <font style='color:#06AA50'><timestamp/>-><b><i>WelcomeBot:</i></b> #1: pan (127.0.0.1) logged in.</font>" "[#The Restaurant] <font style='color:#06AA50'><timestamp/>-><b><i>WelcomeBot:</i></b> <font color=black><b>A wild <font color=#005500>pan</font> appeared!</b></font></font>" "[#Watch] <font style='color:#006888'><timestamp/>-><b><i>CommandBot:</i></b> [<b><font color=orange>#The Restaurant</font></b>] -- </font><font color=#005500><b>pan</b></font> (100 pp) -- <b><font color=black>/idle</font></b> off</font>" "Received logout from pan (1)" "[#Watch] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> #1: pan (127.0.0.1) logged out.</font>" "[#The Restaurant] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> <font color=black><b><font color=black>The wild <font color=#005500>pan</font> used Teleport!</b></font></font>" "pan left channel The Restaurant." "Received logout from pan (1)" "[#Watch] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> #1: pan (127.0.0.1) logged out.</font>" "[#The Restaurant] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> <font color=black><b><font color=black>The wild <font color=#005500>pan</font> used Teleport!</b></font></font>" "Removed player pan (1)" Fatal: Fatal! player called for non existing ID 1 Warning: QWaitCondition: Destroyed while threads are still waiting The relevant section in the script: Code (text): beforeLogOut : function (source) { sys.writeToFile("somestuff.txt", "before 1"); if (players[source] == undefined) { newPlayer(source); } if (players[source].showgoodbye) { WelcomeBot.afterLogOut(source); } players[source].online = false; sys.writeToFile("somestuff.txt", "before 2"); }, afterLogOut : function (source) { sys.writeToFile("somestuff.txt", "after"); }, Contents of "somestuff.txt": Code (text): after Allow me to break it down for readability. loading member in memory not with a thread Bunches of these- but are they important? Warning: QObject::connect: No such slot ScriptEngine::battleConnectionLost() I don't know what this means... but it's probably not the problem. Here's a big reason why I doubt it's just a server thing "Received logout from pan (1)" "[#Watch] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> #1: pan (127.0.0.1) logged out.</font>" "[#The Restaurant] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> <font color=black><b><font color=black>The wild <font color=#005500>pan</font> used Teleport!</b></font></font>" "pan left channel The Restaurant." "Received logout from pan (1)" "[#Watch] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> #1: pan (127.0.0.1) logged out.</font>" "[#The Restaurant] <font style='color:orange'><timestamp/>-><b><i>GoodByeBot:</i></b> <font color=black><b><font color=black>The wild <font color=#005500>pan</font> used Teleport!</b></font></font>" "Removed player pan (1)" Fatal: Fatal! player called for non existing ID 1 This was not a copy-paste error! Two logOut events were fired. If I was to make a guess, I'd say this part: Fatal: Fatal! player called for non existing ID 1 was actually trying to run whatever would normally fire this: "Removed player pan (1)" The second logOut event triggered for the same player's logout. Here's a screenshot. See that window? Clicking OK or X causes the server to crash and then post this into the log: Warning: QWaitCondition: Destroyed while threads are still waiting Of course, if I don't close this window, the server continues to "work" and the alert messages pile up. Ignoring this causes several problems: First, it still attempts to log a player out twice per logout (which we can live with except that the windows pile up pretty fast). Second, it makes it impossible to configure the server settings. If the answer to this thread is "Install from source" or "Use an older version of Qt", then I request either fixing the Windowed server releases or not bothering to include the server in the client releases. This was the answer in 2.4.1/2.4.2. I understand that PO Main's server may run in a different environment and from a possibly different build, but if PO Main's script has some workaround for this then I would gladly accept advice on this. I have looked at the PO-Server-Goodies on GitHub, finding nothing that addresses this issue.
Did you use the same scripts with 2.4.2? If you did, it should be a script error, right? The Id could be missing because the players disconnected. Maybe to fix this you might want to add something so the it remembers the Id until it has do all the events (Not sure about this, just an idea).
Main server runs on qt 4.8. There is an alternative download for PO which is qt5.0.2 which should fix the problem. Finding the issue isn't as easy as just "fixing it"
Kasa- The ID is obviously missing because the logoff event is fired twice. Moogle- I'll look into the alternative download this time. On 2.4.2, I tried the download links I could find as well as compiling from source (using qt5.0.2), but the only answer I got working was to guess-and-check which files from 2.4.2 I could sneak in without the 2.4.1 server freaking out. I don't want to have to compile from source, because while I can do that on my computer, I'm not the main host.