Reading .dmp files?
Posted: Mon Mar 16, 2009 12:27 pm
Hey. I am having trouble with crashes. How can I get the information about what script is causing this from the .dmp file created?
CWO wrote:You can't. Only POL developers can read .dmp files. The POL.log file will list where it was and in what script when it crashed. If you have ecompile generate listings (it'll create a .lst file for every script you compile), open the .lst file in a text editor. POL.log lists the location in your script as "PC: ###". Look for the line beginning with that number and it'll show you the source code it was on.
The biggest thing to get your problem fixed is to go to the bug reports forum and make a post attaching the .dmp file.
Code: Select all
[03/16 21:21:48] Client#2022 (173.17.79.136): disconnected (account XXXX)
[03/16 21:22:00] Unhandled Exception! Writing Minidump file.CWO wrote:Does it say anything after the lines you posted? The lines just after that are usually when it posts the info. Crashes can be from faulty hardware but they can still be things within POL itself too. Make a post on the bug reports forum and attach the dmp file. The POL developers can then see it and try to find out what happened.
Code: Select all
[03/16 21:22:00] Unhandled Exception! Writing Minidump file.
This file should be given to the development team.
Saved dump file to 'POL095-2003-07-05-20090315213136-0.dmp'MuadDib wrote:over 512..... sounds like a bad memory stick in the pc. Might look at a new one from a old pc, or new from store, or from a flea market or some such (so as not to spend a lot on it)
Yeah, it is my online script. And with 110+ players online, every time anyone does .online it will go thru all online characters and get their location and such. Might be why ? Since people access that like all the time. Since I do not really have much more loops in there.CWO wrote:when a script runs away it gives the script name and the PC. Using the same procedure I described above with looking at the .lst file, you'll find where the script it. It will not cause a crash but it means a script is running a lot of instructions without a rest which can cause lag. Generally its caused by a loop that doesn't have a sleep in it. A general rule in scripting is to have a script that runs a lot of instructions sleep at regular rate unless its truly time critical. Inserting a few sleepms(10); in there or if its within a loop, just one within the loop will stop that.
Code: Select all
if( GetObjProperty( mobile, ''#TimerName'' ) > ReadGameClock() )
SendSysMessage( mobile, ''You must wait before using this command again.'' );
SendSysMessage( mobile, ''Cancelled.'' );
return 0;
else
SetObjProperty( mobile, ''#TimerName'', ReadGameClock() + 10 );
endifIf your scripts go runaway like this, it means something is wrong. If you have to perform very long loops, you should add some sleeps. Let me repeat, there is never a good reason to let scripts go runaway. Ever. And increasing the runaway treshold is just ignoring the problem, not fixing it![]()
Well, I kinda want it instant :p Will the server crash or become unstable due to this? :pCWO wrote:What I would do in that type of list is put in a SendSysMessage(who, "Creating list..."); as the first line to tell them that the command has worked (then they won't be tempted to do it again while waiting) then put sleepms(10); inside the foreach loop. With 110 players it will take about 1 second longer for it to load because of the sleeps. But its not a time critical script so it doesn't matter if it takes a little longer. The benefit is that your server will be able to load it much easier because you're controlling the pace.
The problem isn't people spamming the cmd, it's that the loop itself is running alot I guess.*Edwards wrote:Second option:
Add these lines at the beginning of your command
Code: Select all
if( GetObjProperty( mobile, ''#TimerName'' ) > ReadGameClock() ) SendSysMessage( mobile, ''You must wait before using this command again.'' ); SendSysMessage( mobile, ''Cancelled.'' ); return 0; else SetObjProperty( mobile, ''#TimerName'', ReadGameClock() + 10 ); endif
http://docs.polserver.com/pol098/guides ... criptguideIf your scripts go runaway like this, it means something is wrong. If you have to perform very long loops, you should add some sleeps. Let me repeat, there is never a good reason to let scripts go runaway. Ever. And increasing the runaway treshold is just ignoring the problem, not fixing it![]()
Okay, this is just a command to see who are online and whatnot. Since we just started many people use it, currently have 120-130 players online and I am barely using 15% of my computer reasources, also just recieved a more powerfull server so that should drop to like 5%.CWO wrote:Having no sleeps won't cause crashes but with 100+ people online, if you're running something that would be hard on your server like a monster bash or some other event with a lot of people and a lot of action and suddenly maybe a few decide to use the command for their own reasons, that can generate a noticeable lag spike.
Runaways are reported because there's no such thing as infinite computer resources. Efficiency and picking and choosing what should be done immediately and what can take a second more is essential to keeping script generated lag at a minimum. You can't have everything run and be done immediately. So you have to choose to slow some things down to make sure all scripts get their turn. Its especially dangerous if you keep a runaway script that can be used by players since its like inviting them to lag the server.
Code: Select all
program textcmd_online( who )
FillInArrays();
SendDialogGump( who, layout, data );
endprogram
function FillInArrays()
var city;
// Variables designed to Store The full array of players, the number of players, and the current player
local players := EnumerateOnlineCharacters();
local numplayer := len(players);
local player;
// Counter.
local i := 0, online := 0, locationscount := 5, rowcount :=80, pagecount :=2, playercount :=0;
layout.append("page 1");
// Cycle through all the players in the game and add them to the goto list.
for (i := 1; i <= numplayer; i := i + 1)
player := players[i];
If (player.cmdlevel==0)
online := online +1;
playercount := playercount +1;
if (playercount>13)
playercount :=1;
rowcount :=80;
// add forward button
layout.append("button 350 361 5540 5541 0 " + pagecount);
// add backward button
if (pagecount>2)
layout.append("button 260 361 5537 5538 0 " + (pagecount-2));
endif
layout.append("page " + pagecount);
pagecount := pagecount +1;
endif
layout.append("text 80 " + rowcount + " 0 " + locationscount);
fixname(player);
data.append(data[5]);
locationscount := locationscount + 1;
layout.append("text 360 " + rowcount + " 0 " + locationscount);
city := IsInACity(player);
if(!city OR city == "Blackthorn Castle")
city := "Zulu Territory";
elseif ( city == "British Castle")
city := "Britain";
endif
If( city == "Zulu Territory")
data.append(city);
else
data.append(city+" Territory");
endif
//data.append("Zulu Territory");
locationscount := locationscount + 1;
data.append(player.name);
locationscount := locationscount + 1;
rowcount := rowcount +20;
endif
endfor
data[1] := online + " players online";
if (pagecount>2)
layout.append("button 260 361 5537 5538 0 " + (pagecount-2));
endif
endfunctionCode: Select all
program textcmd_online( who )
SendSysMessage( who, "Creating list... It may take a moment" );
FillInArrays();
SendDialogGump( who, layout, data );
endprogram
function FillInArrays()
var city;
// Variables designed to Store The full array of players, the number of players, and the current player
local players := EnumerateOnlineCharacters();
local numplayer := len(players);
local player;
// Counter.
local i := 0, online := 0, locationscount := 5, rowcount :=80, pagecount :=2, playercount :=0;
layout.append("page 1");
// Cycle through all the players in the game and add them to the goto list.
for (i := 1; i <= numplayer; i := i + 1)
player := players[i];
If (player.cmdlevel==0)
online := online +1;
playercount := playercount +1;
if (playercount>13)
playercount :=1;
rowcount :=80;
// add forward button
layout.append("button 350 361 5540 5541 0 " + pagecount);
// add backward button
if (pagecount>2)
layout.append("button 260 361 5537 5538 0 " + (pagecount-2));
endif
layout.append("page " + pagecount);
pagecount := pagecount +1;
endif
layout.append("text 80 " + rowcount + " 0 " + locationscount);
fixname(player);
data.append(data[5]);
locationscount := locationscount + 1;
layout.append("text 360 " + rowcount + " 0 " + locationscount);
city := IsInACity(player);
if(!city OR city == "Blackthorn Castle")
city := "Zulu Territory";
elseif ( city == "British Castle")
city := "Britain";
endif
If( city == "Zulu Territory")
data.append(city);
else
data.append(city+" Territory");
endif
//data.append("Zulu Territory");
locationscount := locationscount + 1;
data.append(player.name);
locationscount := locationscount + 1;
rowcount := rowcount +20;
endif
SleepMS(10); //This is the most important and it will not affect a lot the timedelay before it opens. Test it and gives us a feedback.
endfor
data[1] := online + " players online";
if (pagecount>2)
layout.append("button 260 361 5537 5538 0 " + (pagecount-2));
endif
endfunctionThanks*Edwards wrote:Code: Select all
program textcmd_online( who ) SendSysMessage( who, "Creating list... It may take a moment" ); FillInArrays(); SendDialogGump( who, layout, data ); endprogram function FillInArrays() var city; // Variables designed to Store The full array of players, the number of players, and the current player local players := EnumerateOnlineCharacters(); local numplayer := len(players); local player; // Counter. local i := 0, online := 0, locationscount := 5, rowcount :=80, pagecount :=2, playercount :=0; layout.append("page 1"); // Cycle through all the players in the game and add them to the goto list. for (i := 1; i <= numplayer; i := i + 1) player := players[i]; If (player.cmdlevel==0) online := online +1; playercount := playercount +1; if (playercount>13) playercount :=1; rowcount :=80; // add forward button layout.append("button 350 361 5540 5541 0 " + pagecount); // add backward button if (pagecount>2) layout.append("button 260 361 5537 5538 0 " + (pagecount-2)); endif layout.append("page " + pagecount); pagecount := pagecount +1; endif layout.append("text 80 " + rowcount + " 0 " + locationscount); fixname(player); data.append(data[5]); locationscount := locationscount + 1; layout.append("text 360 " + rowcount + " 0 " + locationscount); city := IsInACity(player); if(!city OR city == "Blackthorn Castle") city := "Zulu Territory"; elseif ( city == "British Castle") city := "Britain"; endif If( city == "Zulu Territory") data.append(city); else data.append(city+" Territory"); endif //data.append("Zulu Territory"); locationscount := locationscount + 1; data.append(player.name); locationscount := locationscount + 1; rowcount := rowcount +20; endif SleepMS(10); //This is the most important and it will not affect a lot the timedelay before it opens. Test it and gives us a feedback. endfor data[1] := online + " players online"; if (pagecount>2) layout.append("button 260 361 5537 5538 0 " + (pagecount-2)); endif endfunction
Code: Select all
program textcmd_online( who )
FillInArrays();
SendDialogGump( who, layout, data );
endprogram
function FillInArrays()
var city;
// Variables designed to Store The full array of players, the number of players, and the current player
local players := EnumerateOnlineCharacters();
local numplayer := len(players);
local player;
// Counter.
local i := 0, online := 0, locationscount := 5, rowcount :=80, pagecount :=2, playercount :=0;
layout.append("page 1");
// Cycle through all the players in the game and add them to the goto list.
for (i := 1; i <= numplayer; i := i + 1)
player := players[i];
If (player.cmdlevel==0)
online := online +1;
playercount := playercount +1;
if (playercount>13)
sleepms(10); // Sleep when flipping the page.
playercount :=1;
rowcount :=80;
// add forward button
layout.append("button 350 361 5540 5541 0 " + pagecount);
// add backward button
if (pagecount>2)
layout.append("button 260 361 5537 5538 0 " + (pagecount-2));
endif
layout.append("page " + pagecount);
pagecount := pagecount +1;
endif
layout.append("text 80 " + rowcount + " 0 " + locationscount);
fixname(player);
data.append(data[5]);
locationscount := locationscount + 1;
layout.append("text 360 " + rowcount + " 0 " + locationscount);
city := IsInACity(player);
if(!city OR city == "Blackthorn Castle")
city := "Zulu Territory";
elseif ( city == "British Castle")
city := "Britain";
endif
If( city == "Zulu Territory")
data.append(city);
else
data.append(city+" Territory");
endif
//data.append("Zulu Territory");
locationscount := locationscount + 1;
data.append(player.name);
locationscount := locationscount + 1;
rowcount := rowcount +20;
endif
endfor
data[1] := online + " players online";
if (pagecount>2)
layout.append("button 260 361 5537 5538 0 " + (pagecount-2));
endif
endfunctionCWO wrote:I took your code Snocks and put the sleep in where it switches the page. This way, it will only sleep when going to a new page. With 130 players, it should be .1 second. And CPU load at 15 is getting on the higher end... but then again, I'm the nut that runs POL on his gaming computer so it almost never takes 1% load due to rescripting.
Code: Select all
program textcmd_online( who ) FillInArrays(); SendDialogGump( who, layout, data ); endprogram function FillInArrays() var city; // Variables designed to Store The full array of players, the number of players, and the current player local players := EnumerateOnlineCharacters(); local numplayer := len(players); local player; // Counter. local i := 0, online := 0, locationscount := 5, rowcount :=80, pagecount :=2, playercount :=0; layout.append("page 1"); // Cycle through all the players in the game and add them to the goto list. for (i := 1; i <= numplayer; i := i + 1) player := players[i]; If (player.cmdlevel==0) online := online +1; playercount := playercount +1; if (playercount>13) sleepms(10); // Sleep when flipping the page. playercount :=1; rowcount :=80; // add forward button layout.append("button 350 361 5540 5541 0 " + pagecount); // add backward button if (pagecount>2) layout.append("button 260 361 5537 5538 0 " + (pagecount-2)); endif layout.append("page " + pagecount); pagecount := pagecount +1; endif layout.append("text 80 " + rowcount + " 0 " + locationscount); fixname(player); data.append(data[5]); locationscount := locationscount + 1; layout.append("text 360 " + rowcount + " 0 " + locationscount); city := IsInACity(player); if(!city OR city == "Blackthorn Castle") city := "Zulu Territory"; elseif ( city == "British Castle") city := "Britain"; endif If( city == "Zulu Territory") data.append(city); else data.append(city+" Territory"); endif //data.append("Zulu Territory"); locationscount := locationscount + 1; data.append(player.name); locationscount := locationscount + 1; rowcount := rowcount +20; endif endfor data[1] := online + " players online"; if (pagecount>2) layout.append("button 260 361 5537 5538 0 " + (pagecount-2)); endif endfunction
Code: Select all
who.mobile.frozen := 1;
SetObjProperty(who.mobile,"frozen",1);Code: Select all
who.frozen := 1;
SetObjProperty(who,"frozen",1);Yeah, but it don't for some reason.CWO wrote:who.frozen := 1; should set it as long as who is a valid character/NPC...