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

server crash while HookUserMessage "SendAudio" message


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
grif_ssa
BANNED
Join Date: Apr 2008
Old 12-18-2009 , 20:56   server crash while HookUserMessage "SendAudio" message
Reply With Quote #1

starting from snapshot 1.3.0-hg2862.tar.gz
this code will crash the server:
Code:
#include <sourcemod>
#include <sdktools>

#pragma semicolon 1

new UserMsg:g_umSendAudio;

public OnPluginStart(){
        if((g_umSendAudio=GetUserMessageId("SendAudio")) != INVALID_MESSAGE_ID)
                HookUserMessage(g_umSendAudio, UserMsgSendAudio, true);
        else
                SetFailState("GetUserMessageId for SendAudio");
}

public Action:UserMsgSendAudio(UserMsg:msg_id, Handle:bf, const players[], playersNum, bool:reliable, bool:init){
        return Plugin_Continue;
}
sample attached with LogMessage
seems it goes infinite loop and then SEGMENTATION FAULT

if leave intercept=false or return Plugin_Handled - it will work

maybe there is some new usage of HookUserMessage ???

PS: works fine on 1.3.0-hg2841.tar.gz
Attached Files
File Type: sp Get Plugin or Get Source (silencenades.sp - 615 views - 601 Bytes)
grif_ssa is offline
Send a message via ICQ to grif_ssa
API
Veteran Member
Join Date: May 2006
Old 12-18-2009 , 22:11   Re: server crash while HookUserMessage "SendAudio" message
Reply With Quote #2

*sigh*
http://bugs.alliedmods.net
__________________
API is offline
Send a message via AIM to API
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 01:34.


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