I'm trying to make a SM extension using the IClient interface, but for some reason srcds crashes whenever I call one of IClient's member functions. Core dumps are giving no helpful backtrace at all. I've been testing on Linux, haven't tried windows yet.
This is the backtrace I get from both Debug build and Release build.
Code:
(gdb) bt
#0 0xffffffff in ?? ()
#1 0xb7721069 in __lll_lock_wait () from /lib/libpthread.so.0
#2 0xb771c41b in _L_lock_517 () from /lib/libpthread.so.0
#3 0xb771c241 in pthread_mutex_lock () from /lib/libpthread.so.0
#4 0xb02ecac3 in google_breakpad::ExceptionHandler::SignalHandler(int, siginfo*, void*) () from ./bin/steamclient.so
#5 <signal handler called>
#6 0xb77245e7 in __pthread_mutex_cond_lock_adjust () from /lib/libpthread.so.0
#7 0xb771e884 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib/libpthread.so.0
#8 0xafe451a1 in ?? ()
Backtrace stopped: previous frame inner to this frame (corrupt stack?)
I'm using IClient *IServer::GetClient(int index) to get the IClient iface, and it's not returning NULL, so it should be returning the client iface, right? I'm unsure why this is crashing srcds. Any ideas?