Raised This Month: $45 Target: $400
 11% 

Server crashing for no reason?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: idk
Old 11-26-2021 , 16:21   Server crashing for no reason?
Reply With Quote #1

Hello. I would like to ask if there are no errors in the server's console nor in the "addons/amxmodx/logs" folder, but the server still crashes after a certain time after its start, what does that mean?

Recently I added around 30 new plugins and a lot of models at once. Could this be the reason? Maybe, too many plugins cause the server to crash for no reason? Why would this happen? Could it be that too many precaches cause the server to crash?

When I join the server, there is no lag. There is no high CPU usage, but normal CPU usage.

I also enabled the following option:

Code:
; If you want your models to have accurate hitboxes, try enabling this.
; Note: make sure your models don't have messed up hitboxes, otherwise
; this setting might cause your server insane cpu usage and lag!
SET MODELINDEX OFFSET = 1


Enabling this option didn't cause higher CPU usage.

Also, I changed the names of the models. Does it matter what the name of a model will be? See the following code, for example:

Code:
// Runner Zombie Attributes
new const zclass2_name[] = { "Runner Zombie" }
new const zclass2_info[] = { "[Runs fast]" }
new const zclass2_model[] = { "zombie_source" }
new const zclass2_clawmodel[] = { "v_knife_zombie.mdl" }
const zclass2_health = 45000
const zclass2_speed = 300
const Float:zclass2_gravity = 1.0
const Float:zclass2_knockback = 1.5
The name of the hands model is "v_knife_zombie.mdl". However I removed things like "v_", "w_", "p_" and left the models with only names.

Here are some examples. The following models:

v_model_hands_example.mdl
v_zombie_hands_example.mdl
v_zombie_body_example.mdl


were turned into:

model_hands_example.mdl
zombie_hands_example.mdl
zombie_body_example.mdl


Could it be that the absence of prefixes like "v_", "w_" and "p_" are causing the crashes because these prefixes are required by the engine to correctly interpret the models?

There were no crashes before I introduced the changes I mentioned in this thread.

Also, I know the crashes are NOT caused by problems with my computer or OS, because when I start the server that is in the BACK-UP folder (I make BACK-UPs of my server every time before I start making changes to my server), the server runs and doesn't crash. This means that the crashes are caused by some of the changes I introduced.

Read carefully again: There is ABSENCE of errors in the console and in the "logs" folder. This means that the crashes are NOT caused by errors. So, if the crashes aren't caused by errors, then what causes the crashes?

More plugins = more precache. Could it be that the HL engine gets overloaded by these precaches and get crashed, even if the CPU usage of my computer is low, not high? I mean that the crash is may not be caused by overheating of my PC's CPU because the server's console causes too high CPU usage.

So, what could cause the server to crash, for no reason, without showing errors in the server's console nor in the "logs" folder? What causes the crashes according to you?
GlobalPlague is offline
Bugsy
AMX Mod X Moderator
Join Date: Feb 2005
Location: NJ, USA
Old 11-26-2021 , 23:31   Re: Server crashing for no reason?
Reply With Quote #2

IIRC, the server will crash without errors if you call precache_model() on a file that does not exist. Is this potentially your problem?
__________________

Last edited by Bugsy; 11-26-2021 at 23:31.
Bugsy is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 11-27-2021 , 10:27   Re: Server crashing for no reason?
Reply With Quote #3

I don't think you repeated enough times the fact that there are no errors in console and "logs" folder and the fact that the crash is not caused by errors. I think you should have repeated at least once more the fact that there are no errors in console and "logs" folder and the fact that the crash is not caused by errors. Only then people would properly understand that there are no errors in console and "logs" folder and that the crash is not caused by errors.
I think you also need more red and bold text.

Joking aside, if you kept your posts short and clear, without adding irrelevant information(like you enabling model index or high/low CPU usage) and without repeating the same information one million times, people would have a much easier time keeping track of what you wrote and have an easier time understanding the issue.

Now, about the issue: you said the server crashes after some time? What do you mean exactly? Can you actually join the server and then during gameplay it crashes? Or do you start the server and it never actually starts because it crashes?

1.If the server doesn't even start: there is a precache issue likely -> you are precaching a model/sprite that does not exist or the path is incorrect. The solution is to double-check the paths.
2.If the server starts but you crash during gameplay: you are trying to set a model that is not being precached. The solution is to precache all resources that are being used.

I also noticed a potential problem:
(please use PHP tags when you post code, not code tags)
PHP Code:
new const zclass2_clawmodel[] = { "v_knife_zombie.mdl" 
Models need to be precached with "model/" in path so unless that is being manually added before precache_model and before the model is set(with pev_viewmodel2) the server will crash. Please post the relevant code(how this model is precached and applied to the player).

Moreover, there is absolutely no reason to remove v_, p_ and w_ prefixes. It will just create confusion because now you no longer knows what model is of what type. Just leave the prefixes alone, they don't hurt in any way.
__________________

Last edited by HamletEagle; 11-27-2021 at 10:30.
HamletEagle is offline
GlobalPlague
Senior Member
Join Date: Feb 2016
Location: idk
Old 11-27-2021 , 12:33   Re: Server crashing for no reason?
Reply With Quote #4

Quote:
Originally Posted by Bugsy View Post
IIRC, the server will crash without errors if you call precache_model() on a file that does not exist. Is this potentially your problem?
Thanks for explaining this to me. I added a model that the HL Model Viewer was unable to open, and showed error. I thought the error is coming from the HL Model Viewer itself, but it turned out the model itself is broken. This model causes the crash. I removed the model, and the server no longer crashes.

Quote:
Originally Posted by HamletEagle View Post
I don't think you repeated enough times the fact that there are no errors in console and "logs" folder and the fact that the crash is not caused by errors. I think you should have repeated at least once more the fact that there are no errors in console and "logs" folder and the fact that the crash is not caused by errors. Only then people would properly understand that there are no errors in console and "logs" folder and that the crash is not caused by errors.
I think you also need more red and bold text.

Joking aside, if you kept your posts short and clear, without adding irrelevant information(like you enabling model index or high/low CPU usage) and without repeating the same information one million times, people would have a much easier time keeping track of what you wrote and have an easier time understanding the issue.

Now, about the issue: you said the server crashes after some time? What do you mean exactly? Can you actually join the server and then during gameplay it crashes? Or do you start the server and it never actually starts because it crashes?

1.If the server doesn't even start: there is a precache issue likely -> you are precaching a model/sprite that does not exist or the path is incorrect. The solution is to double-check the paths.
2.If the server starts but you crash during gameplay: you are trying to set a model that is not being precached. The solution is to precache all resources that are being used.

I also noticed a potential problem:
(please use PHP tags when you post code, not code tags)
PHP Code:
new const zclass2_clawmodel[] = { "v_knife_zombie.mdl" 
Models need to be precached with "model/" in path so unless that is being manually added before precache_model and before the model is set(with pev_viewmodel2) the server will crash. Please post the relevant code(how this model is precached and applied to the player).

Moreover, there is absolutely no reason to remove v_, p_ and w_ prefixes. It will just create confusion because now you no longer knows what model is of what type. Just leave the prefixes alone, they don't hurt in any way.
Every time I started the server, it crashed after around 30 minutes. The problem was coming from a model that has bug, but removed the model and the server no longer crashes.

The reason why I repeat the same things several times is because I don't speak English very well, and I can't explain things very well... so, i repeat different versions of the same thing I'm saying, so i can make sure people will understand what actually I'm saying.

Thanks for explaining.
GlobalPlague is offline
Old 11-27-2021, 12:53
HamletEagle
This message has been deleted by HamletEagle. Reason: Misread
Reply


Thread Tools
Display Modes

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 10:31.


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