SA-MP Forums Archive
[Plugin] CrashDetect - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Plugin Development (https://sampforum.blast.hk/forumdisplay.php?fid=18)
+--- Thread: [Plugin] CrashDetect (/showthread.php?tid=262796)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Re: crashdetect plugin v4.6 - Kar - 23.06.2012

v4.8 is released and v4.9 is soon on it's way btw.


Respuesta: crashdetect plugin v4.6 - !R1Ch@rD! - 30.06.2012

Good Bro


Re: crashdetect plugin v4.6 - [HLF]Southclaw - 25.08.2012

It seems posting here might be pointless but I will anyway...

I get a crash detect error every few seconds pointing to the return line of this function:

pawn Code:
stock HighestOnlineAdmin()
{
    new id;

    foreach(new i : Player)
        if(pAdmin(i)>pAdmin(id)) id=i;

    return id; // Right here
}
The error on the console is:

Code:
[debug] Run time error 6: "Invalid instruction"
[debug]  Unknown opcode 0x7800 at address 0xFFFFFFFF
[debug] AMX backtrace:
[debug] #0 ffffffff in ?? () at K:\Games\Projects\SA-MP Server\gamemodes\sffa.pwn:4026
Nothing seems wrong with that line, I'm trying to use this to detect a crashing problem I've been having recently but it's hard to spot a different error when this is popping onto my console every few seconds.


Re: crashdetect plugin v4.6 - Lorenc_ - 25.08.2012

Quote:
Originally Posted by [HLF]Southclaw
View Post
It seems posting here might be pointless but I will anyway...

I get a crash detect error every few seconds pointing to the return line of this function:

pawn Code:
stock HighestOnlineAdmin()
{
    new id;

    foreach(new i : Player)
        if(pAdmin(i)>pAdmin(id)) id=i;

    return id; // Right here
}
The error on the console is:

Code:
[debug] Run time error 6: "Invalid instruction"
[debug]  Unknown opcode 0x7800 at address 0xFFFFFFFF
[debug] AMX backtrace:
[debug] #0 ffffffff in ?? () at K:\Games\Projects\SA-MP Server\gamemodes\sffa.pwn:4026
Nothing seems wrong with that line, I'm trying to use this to detect a crashing problem I've been having recently but it's hard to spot a different error when this is popping onto my console every few seconds.
Try giving 'id' a startup value: new id = -1;

Not really sure either.


Re: crashdetect plugin v4.6 - [HLF]Southclaw - 25.08.2012

I've removed that function, it seems to just gravitate to the last function called in the last used function.

I had some stocks after that function that weren't used so it ignored them and went to the last line in the last used function.

Now it's complaining about a SendClientMessage line on a vehicle spawn function...


Re: crashdetect plugin v4.6 - Westingham - 25.08.2012

Quote:
Originally Posted by Westingham
View Post
No matter what I do or try, I cannot get this plugin to load.

Running Windows Server 2008 R2 Web Server Edition, 64-b // 6.1.7601 Service Pack 1 Build 7601

I have tried compiling with "-d3 -r" in pawn.cfg in the pawno folder, I have tried putting msvcr100d.dll in the same folder as samp-server.exe, I have installed the VC++ 2008 redistributable.

Every single time I start the server, I get:



Can anybody suggest something new to try?
Quote:
Originally Posted by nutzkung69
View Post
Loading plugin: crashdetect
Failed.

Windows Server 2008 R2 64Bit

pls help me
I solved my issue by installing one of these: http://www.google.com/search?q=micro...edistributable. I'd recommend starting with the 2010 x64 version, both, the regular and SP1, and see if that works. If not, try 2008. If that still doesn't work, try installing the x86 versions.


Re: crashdetect plugin v4.6 - TomTroX - 29.08.2012

Code:
[02:53:32] [debug] Server crashed while executing GPP.amx
[02:53:32] [debug] AMX backtrace:
[02:53:32] [debug] #0  0000002a in Float:operator-(Float:) (Float:oper=0.00000) at C:\Documents and Settings\Tomek\Pulpit\Tomek\Pawno\include\float.inc:109
[02:53:32] [debug] #1  0000002a in Float:operator-(Float:) (Float:oper=0.00000, ... <5247 variable arguments>) at C:\Documents and Settings\Tomek\Pulpit\Tomek\Pawno\include\float.inc:109
[02:53:32] [debug] Native backtrace:
[02:53:32] [debug] #0  b75515f9 in crashdetect::PrintNativeBacktrace () from plugins/crashdetect.so
[02:53:32] [debug] #1  b7553c7c in crashdetect::Crash () from plugins/crashdetect.so
[02:53:32] [debug] #2  b7559123 in ?? () from plugins/crashdetect.so
[02:53:32] [debug] #3  ffffe400 in ?? ()
[02:53:32] [debug] #4  b7554022 in crashdetect::HandleAmxExec () from plugins/crashdetect.so
[02:53:32] [debug] #5  b7557d1b in ?? () from plugins/crashdetect.so
[02:53:32] [debug] #6  b73128f5 in ProcessTick () from plugins/mysql.so
[02:53:32] [debug] #7  080cff82 in ?? () from ./samp03svr
[02:53:32] [debug] #8  080ad6bc in ?? () from ./samp03svr
[02:53:32] [debug] #9  080a8fb3 in ?? () from ./samp03svr
[02:53:32] [debug] #10 b757cca6 in __libc_start_main () from /lib/i686/cmov/libc.so.6
[02:53:32] [debug] #11 0804b491 in ?? () from ./samp03svr
I don't know where the problem..

plugins crashdetect.so mysql.so sscanf.so streamer.so Whirlpool.so


Re: crashdetect plugin v4.6 - Emmet_ - 08.09.2012

@Wolfmaster: You've declared a variable that you've never used and other things. Here, I've fixed the code a bit:

pawn Code:
dcmd_tazer(playerid, params[])
{
    new Float:X, Float:Y, Float:Z, player1;
    if(sscanf(params,"u", player1)) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] USAGE: /tazer [id]");
    if(player1 == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player is offline!");
    if(IsCuffed[player1] == 1) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player already shocked!");
    if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != SWAT)
    {
        SendClientMessage(playerid,COLOR_RED,"You are not a Police Unit!");
        return 1;
    }
    GetPlayerPos(player1, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z))
    {
        TogglePlayerControllable(player1, false);
        IsTazed[player1] = 1;
        GameTextForPlayer(player1, "~r~ Shocked!", 4000, 4);
        SetTimerEx("tazertimer", 7000, false, "u", player1);
        SendClientMessage(playerid, 0xFF0000AA, "{00FF00}[SUCCESSFUL SHOCKED!]");
        SendClientMessage(player1, 0xFF0000AA, "{FF0000}You have shocked by a Police Unit!");
    }
    return 1;
}



Re: crashdetect plugin v4.6 - Wolfmaster - 09.09.2012

Quote:
Originally Posted by Emmet_
View Post
@Wolfmaster: You've declared a variable that you've never used and other things. Here, I've fixed the code a bit:

pawn Code:
dcmd_tazer(playerid, params[])
{
    new Float:X, Float:Y, Float:Z, player1;
    if(sscanf(params,"u", player1)) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] USAGE: /tazer [id]");
    if(player1 == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player is offline!");
    if(IsCuffed[player1] == 1) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player already shocked!");
    if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != SWAT)
    {
        SendClientMessage(playerid,COLOR_RED,"You are not a Police Unit!");
        return 1;
    }
    GetPlayerPos(player1, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z))
    {
        TogglePlayerControllable(player1, false);
        IsTazed[player1] = 1;
        GameTextForPlayer(player1, "~r~ Shocked!", 4000, 4);
        SetTimerEx("tazertimer", 7000, false, "u", player1);
        SendClientMessage(playerid, 0xFF0000AA, "{00FF00}[SUCCESSFUL SHOCKED!]");
        SendClientMessage(player1, 0xFF0000AA, "{FF0000}You have shocked by a Police Unit!");
    }
    return 1;
}
Thank you Emmet_ !


Re: crashdetect plugin v4.6 - Wolfmaster - 09.09.2012

Oh, no. I have 3 more bugs.. (included the tazer command. :S)

----------------------------

The first bug:

Code:
[debug] Run time error 5: "Invalid memory access"
[debug] AMX backtrace:

[debug] #0 0001964c in public OnPlayerCommandText (playerid=9, cmdtext[]=@0x000a2850 "") at D:\Program Files (x86)\Rockstar Games\server1\filterscripts\ladmin4v2.pwn:2275


Line 2275 on ladmin4v2:


dcmd(register, 8, cmdtext); (Under the OnPlayerCommandText)

The register command:

Code:
dcmd_register(playerid,params[])
{
if (PlayerInfo[playerid][LoggedIn] == 1) return SendClientMessage(playerid,red,"ACCOUNT: You are already logged in!");
if (strlen(params) < 4 || strlen(params) > 20) return SendClientMessage(playerid,red,"ACCOUNT: The password lenght is incorrect!");
if(!strlen(params)) return SendClientMessage(playerid, red, "ACCOUNT: USAGE: /register password");
if (udb_Create(PlayerName2(playerid),params))
{
new Rfile[256],name[MAX_PLAYER_NAME], Rtmp3[100];
GetPlayerName(playerid,name,sizeof(name)); format(Rfile,sizeof(Rfile),"/ladmin/users/%s.sav",udb_encode(name));
dini_Set(Rfile,"password",params);
GetPlayerIp(playerid,Rtmp3,100);
dini_Set(Rfile,"ip",Rtmp3);
dUserSetINT(PlayerName2(playerid)).("registered",1);
new strdate[20], year,month,day;
getdate(year, month, day);
format(strdate, sizeof(strdate), "%d/%d/%d",year,month,day);
dini_Set(Rfile,"RegisteredDate",strdate);
dUserSetINT(PlayerName2(playerid)).("loggedin",1);
dUserSetINT(PlayerName2(playerid)).("banned",0);
dUserSetINT(PlayerName2(playerid)).("level",0);
dUserSetINT(PlayerName2(playerid)).("LastOn",0);
dUserSetINT(PlayerName2(playerid)).("money",0);
dUserSetINT(PlayerName2(playerid)).("kills",0);
dUserSetINT(PlayerName2(playerid)).("deaths",0);
dUserSetINT(PlayerName2(playerid)).("hours",0);
dUserSetINT(PlayerName2(playerid)).("minutes",0);
dUserSetINT(PlayerName2(playerid)).("seconds",0);
dUserSetINT(PlayerName2(playerid)).("score",0);
PlayerInfo[playerid][LoggedIn] = 1;
PlayerInfo[playerid][Registered] = 1;
SendClientMessage(playerid, green, "ACCOUNT: Successful registration!");
PlayerPlaySound(playerid,1057,0.0,0.0,0.0);
}
return 1;
}

----------------------------

The second bug:

[debug] Run time error 5: "Invalid memory access"
[debug] AMX backtrace:

[debug] #0 00009f34 in public OnPlayerCommandText (playerid=9, cmdtext[]=@0x000226f0 "") at D:\Program Files (x86)\Rockstar Games\server1\filterscripts\FS.pwn:242

Line 242 on FS.pwn:

dcmd(contract,8,cmdtext);


The command:

Code:
dcmd_contract(playerid,params[])
{
new tmp[128],tmp2[256],idx,val;
new id = strval(params);
tmp=strtok(params,idx);
tmp2=strtok(params,idx);
id=strval(tmp);
val=strval(tmp2);
if(!strlen(tmp) || !strlen(tmp2) || !IsNumeric(tmp) || !IsNumeric(tmp2)) {
return SendClientMessage(playerid,COLOR_YELLOW,"USAGE: /contract [id] [/contract price = more than 1000$]");
}
else if(!IsPlayerConnected(id)) {
return SendClientMessage(playerid,COLOR_RED,"Incorrect ID!");
}
else if(val>GetPlayerMoney(playerid) || val<1000){
return SendClientMessage(playerid,COLOR_RED,"You don't have 1000$! (the minimum price!)");
}
else if(playerid==id) {
return SendClientMessage(playerid,COLOR_RED,"Try it an other ID! (It's you!)");
}
else if(verdij[id]==1) {
return SendClientMessage(playerid,COLOR_RED,"You have already called the hitman!");
}
else {
new String[255], pName[MAX_PLAYER_NAME], kName[MAX_PLAYER_NAME];
bMoney[id]=val;
verdij[id]=1;
GetPlayerName(playerid,kName,sizeof(kName));
GetPlayerName(id,pName,sizeof(pName));
format(String,sizeof(String),"[CONTRACT]: %s called a hitman. Target person: %s [Price: $ %d]",kName,pName,val);
SendClientMessageToAll(COLOR_YELLOW,String);
GivePlayerMoney(playerid,-val);
}
return 1;
}


----------------------------

And the third problem still the tazer command.


The error code:

Code:
[debug] Run time error 5: "Invalid memory access"

[debug] AMX backtrace:

[debug] #0 00032b40 in public OnPlayerCommandText (playerid=9, cmdtext[]=@0x001664b0 "") at D:\Program Files (x86)\Rockstar Games\server1\gamemodes\Gamemode.pwn:5008

The command:


Code:
dcmd_tazer(playerid, params[])
{
    new Float:X, Float:Y, Float:Z, player1;
    if(sscanf(params,"u", player1)) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] USAGE: /tazer [id]");
    if(player1 == INVALID_PLAYER_ID) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player is offline!");
    if(IsCuffed[player1] == 1) return SendClientMessage(playerid, 0xFF0000AA, "[ERROR] This player already shocked!");
    if(gTeam[playerid] != TEAM_COP && gTeam[playerid] != SWAT)
    {
        SendClientMessage(playerid,COLOR_RED,"You are not a Police Unit!");
        return 1;
    }
    GetPlayerPos(player1, X, Y, Z);
    if(IsPlayerInRangeOfPoint(playerid, 20.0, X, Y, Z))
    {
        TogglePlayerControllable(player1, false);
        IsTazed[player1] = 1;
        GameTextForPlayer(player1, "~r~ Shocked!", 4000, 4);
        SetTimerEx("tazertimer", 7000, false, "u", player1);
        SendClientMessage(playerid, 0xFF0000AA, "{00FF00}[SUCCESSFUL SHOCKED!]");
        SendClientMessage(player1, 0xFF0000AA, "{FF0000}You have shocked by a Police Unit!");
    }
    return 1;
}
----------------------------

Somebody and ideas?


Re: crashdetect plugin v4.6 - Fernado - 13.09.2012

I'm using linux, when my server crash where the details will show?


Re: crashdetect plugin v4.6 - Ironboy - 20.09.2012

Quote:
Originally Posted by Fernado
View Post
I'm using linux, when my server crash where the details will show?
The crash reason will show on the server logs.


Re: crashdetect plugin - ViruZz - 11.12.2012

Quote:
Originally Posted by SPAWN_METAL
Посмотреть сообщение
for me not pawno\settings.ini
Код:
[General]
FileAssoc=1
[Display]
WindowMax=1
WindowX=459
WindowY=251
WindowW=985
WindowH=519
Splitter=233
Font_Name=Courier New
Font_Size=10
ShowFuncList=1
[RunOpts]
CopyDir=\
ExeFile=pawncc.exe
Params=-r -d3
This made me laugh


Re: crashdetect plugin v4.10 - KyPaITaTKa - 24.04.2013

Hm, i always hadn't any problems with your plugins, but last 2 updates can't be loaded on my computer. It's saying in console, that some .dll file with strange name is missing. But with 4.10.1 all is OK. What does it mean?


Re: crashdetect plugin v4.10 - Slice - 24.04.2013

Quote:
Originally Posted by KyPaITaTKa
View Post
Hm, i always hadn't any problems with your plugins, but last 2 updates can't be loaded on my computer. It's saying in console, that some .dll file with strange name is missing. But with 4.10.1 all is OK. What does it mean?
What dll file?


Re: crashdetect plugin v4.10 - KyPaITaTKa - 24.04.2013

Computer can't run a programm because file MSVCP110.dll is missing. Try to reinstall the programm.

p.s. I do my best in translating.. :3


Re: crashdetect plugin v4.10 - Slice - 24.04.2013

Install this: http://www.microsoft.com/en-us/downl....aspx?id=30679


Re: crashdetect plugin v4.10 - xeeZ - 26.04.2013

crashdetect 4.11 is released!

Changes since 4.10.2: For those who downloaded 4.10.3 (which is now removed from downloads), the new version fixes the bug that caused runtime errors to be completely ignored after first successful return from any function.


Re: crashdetect plugin v4.10 - Y_Less - 26.04.2013

That's a very nice update! Well done.


Re: crashdetect plugin v4.10 - michaelcosyns - 26.04.2013

I hope it works because this is an awesome plugin