- void CWorldServer::ServerLoop( )
- {
- fd_set fds;
- int activity;
- maxfd = 0;
- sockaddr_in ClientInfo;
- SOCKET NewSocket;
- timeval timeout;
- maxfd = sock;
- OnServerStep();
- do
- {
- if (!Ping( ))
- isActive = false;
- timeout.tv_sec = 0;
- timeout.tv_usec = 1000;
- NewSocket = INVALID_SOCKET;
- FD_ZERO( &fds );
- pthread_mutex_lock( &PlayerMutex );
- if(!Config.usethreads)
- FillFDS( &fds );
- FD_SET( sock, &fds );
- activity = select( maxfd+1, &fds, NULL, NULL, &timeout );
- if ( activity == 0 )
- {
- FD_SET( sckISCII, &fds );
- activity = select( maxfd+1, &fds, NULL, NULL, &timeout );
- if ( activity == 0 )
- {
- pthread_mutex_unlock( &PlayerMutex );
- #ifdef _WIN32
- Sleep(1);
- #else
- usleep(1);
- #endif
- continue;
- }
- if ( activity < 0 && errno != EINTR )
- {
- #ifdef _WIN32
- Log( MSG_ERROR, "Select command failed. Error #%i", WSAGetLastError() );
- #else
- Log( MSG_ERROR, "Select command failed. Error #%i", errno );
- #endif
- isActive = false;
- }
It crashes within 10 seconds after entering the world. Before it crashes, I can walk, talk to the fairy NPC, and even kill jellies. In the distance, I can see text bubbles saying:
The gang of hooligans hav
recently been increasing in
That's exactly how the bubbles look. ("hav" is not a typo I made) They reappear and disappear around the screen, and in random spots. (The arrow of the txt bubble points at the ground... and there's nothing there. It looks as if the ground is talking. )
Here's the debugger output
Program received signal SIGABRT, Aborted.
In select$DARWIN_EXTSN () ()
Callstack:
#0 0x924966f2 select$DARWIN_EXTSN() (??:??)
#1 0x1de1 CWorldServer::ServerLoop(this=0x700000) (World Server/worldserver.cpp:328)
#2 0xfd4c CServerSocket::StartServer(this=0x700000) (Common/SocketServer.cpp:186)
#3 0x479cd main(argc=1, argv=0xbffffa50) (World Server/main.cpp:71)
If I leave the Rose window open after the server crashes, the bubbles multiply in number. The screen is literally filled with a bunch of text bubbles.
(Note I'm using v131)