Page 1 of 1

Crash Bug under Linux (while shutting down)

Posted: Sun Apr 23, 2006 6:13 pm
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.