Crash Bug under Linux (while shutting down)

Want to discuss changes to the UOX3 source code? Got a code-snippet you'd like to post? Anything related to coding/programming goes here!
Post Reply
GhostTyper
UOX3 Neophyte
Posts: 26
Joined: Sun Sep 18, 2005 2:00 pm
Has thanked: 0
Been thanked: 0
Contact:

Crash Bug under Linux (while shutting down)

Post by GhostTyper »

I fixed a bug that SIGSEGVed if uox3 couldn't load the muls.

Cause: Trying to join a non-existing thread.
Fix: check for pthread_t != 0.

This could be a bug in the pthread library (docs say it should return with an error).

In uox3.cpp:
pthread_t cons = 0, netw = 0;

...

change:
pthread_join(cons, NULL);

to:
if (cons != 0) {
pthread_join(cons, NULL);
}
and the same for netw.
Post Reply