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

pthread crash server


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
jimihendrix
Member
Join Date: May 2007
Old 08-14-2007 , 23:41   pthread crash server
Reply With Quote #1

i use some code from banlist plugin by devicenull
and when use pthreads like banlist server crash (linux/win)
(my banlist bin crash server too)
i use last metamod 1.42 sources and bin
pthreads 2.8
i think the problem its precompile param
or plugin bug..

the file http://www.aluminiosmediterraneo.com/eireneplugin.zip

thanks
jimihendrix is offline
BAILOPAN
Join Date: Jan 2004
Old 08-15-2007 , 10:18   Re: pthread crash server
Reply With Quote #2

Where does it crash?
__________________
egg
BAILOPAN is offline
jimihendrix
Member
Join Date: May 2007
Old 08-15-2007 , 11:22   Re: pthread crash server
Reply With Quote #3

(linux / win)
when put in metamod.ini for auto load server crash

if i put manual with "meta load addons/metamod/bin/eirene_mm"
not load
17:12:41 Failed to load plugin addons/metamod/bin/eirene_mm ().

sample failed (win) :
with only this lines plugin not load i put in plugin load function
(this in windows)
Code:
#ifdef WIN32
pthread_win32_process_attach_np();
pthread_win32_thread_attach_np();
#endif
//pre param in vs2005; WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_ DEPRECATE;PTW32_STATIC_LIB;PTW32_BUILD_INLINE D;THREADSAFE=1

plugin compile ok but when use pthread , not load or crash if i put in metamod.ini
i think the code its ok
jimihendrix is offline
BAILOPAN
Join Date: Jan 2004
Old 08-15-2007 , 12:22   Re: pthread crash server
Reply With Quote #4

Attach a debugger?
__________________
egg
BAILOPAN is offline
jimihendrix
Member
Join Date: May 2007
Old 08-15-2007 , 15:54   Re: pthread crash server
Reply With Quote #5

sorry but i dont know how debug :
17:12:41 Failed to load plugin addons/metamod/bin/plugin_mm ().

the problem (in win) is when i use
pthread_win32_process_attach_np();
pthread_win32_thread_attach_np();
jimihendrix is offline
BAILOPAN
Join Date: Jan 2004
Old 08-15-2007 , 16:20   Re: pthread crash server
Reply With Quote #6

Now is a good time to learn then because you can't get very far in C++ without knowing how to debug.

"Debug" -> "Attach to Process" in the IDE. When it crashes go to Debug -> Windows -> Call Stack.
__________________
egg
BAILOPAN is offline
jimihendrix
Member
Join Date: May 2007
Old 08-15-2007 , 16:48   Re: pthread crash server
Reply With Quote #7

i know use the debug in normal aplication but in a plugin i
never used it, right now windows server not crash when put
plugin in metaplugins.ini but "meta list"

20:55:54 -Id- Name Version Author Status
[01] - - - ERROR

metamod has log with errors?
or i can debug next line?
21:58:17 Failed to load plugin addons/metamod/bin/banlist_mm ().
jimihendrix is offline
BAILOPAN
Join Date: Jan 2004
Old 08-15-2007 , 21:23   Re: pthread crash server
Reply With Quote #8

srcds.exe isn't a normal application?
__________________
egg
BAILOPAN is offline
jimihendrix
Member
Join Date: May 2007
Old 08-15-2007 , 21:46   Re: pthread crash server
Reply With Quote #9

yes its normal application
well i put in link pthreadVC2.lib
and in load plugin


Code:
pthread_win32_process_attach_np();
pthread_win32_thread_attach_np();
and cant load plugin
last metamod has problems with pthreads?

with this lines or some code for pthread plugin not works
without works perfect

Last edited by jimihendrix; 08-15-2007 at 21:52.
jimihendrix is offline
BAILOPAN
Join Date: Jan 2004
Old 08-15-2007 , 22:20   Re: pthread crash server
Reply With Quote #10

If your plugin is totally failing to load (originally you said crashing), it probably means your plugin is missing something.

A constructor might be throwing an exception (if a constructor dies then LoadLibrary() will fail), or you may be missing a required import/dll. You may want to download depends and see what your .dll needs.

Make no mistake that there is no problem with Metamod ;) it calls LoadLibrary() and if that fails, it can't load your plugin.
__________________
egg
BAILOPAN 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 15:30.


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