Raised This Month: $51 Target: $400
 12% 

IClient help


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Afronanny
Veteran Member
Join Date: Aug 2009
Old 07-24-2010 , 00:29   IClient help
Reply With Quote #1

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?

Last edited by Afronanny; 07-24-2010 at 10:20.
Afronanny is offline
DS
SourceMod Developer
Join Date: Sep 2004
Location: WI, USA
Old 07-24-2010 , 13:43   Re: IClient help
Reply With Quote #2

If I'm not mistaken, the index that should be passed to GetClient is actually the client entity index - 1.
DS is offline
Afronanny
Veteran Member
Join Date: Aug 2009
Old 07-24-2010 , 14:54   Re: IClient help
Reply With Quote #3

Well that changes things. Thanks for that info, DS. It fixed my problem.
Afronanny is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 08:13.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode