Raised This Month: $ Target: $400
 0% 

Solved Server crash: IndexOfEdict: bad entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
happy_2012
Senior Member
Join Date: Aug 2012
Old 06-19-2018 , 15:41   Server crash: IndexOfEdict: bad entity
Reply With Quote #1

Hello,

So I am running a Counter-Strike server with the latest AMX Mod X 1.8.3 installation, the server works perfectly fine without out the plugin admin_commands.amxx a custom and a public plugin I've created that is currently in development phase.

Please find the code on my github: https://github.com/TaurusMD/Admin-Co...n_commands.sma

I read the plugin like about 2550 times and I couldn't find anything weird that could possible cause the crash, and on server console I get this error when the server crash FATAL ERROR (shutting down): IndexOfEdict: bad entity

Thanks in advance!

Last edited by happy_2012; 06-20-2018 at 03:42. Reason: Title update
happy_2012 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-19-2018 , 15:55   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #2

Thanks for the 1374 lines plugin. Do you really believe someone is going to take the time to figure out what's wrong? Do some debugging yourself, just reading the plugin in most cases won't magically tell you what is wrong.
Comment out everything, make sure it doesn't crash and then start enabling code until it crashes again. Now you found what part of the code is causing the crash.

Post it here and we will take a look.
__________________
HamletEagle is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 06-19-2018 , 16:02   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #3

Quote:
Originally Posted by HamletEagle View Post
Thanks for the 1374 lines plugin. Do you really believe someone is going to take the time to figure out what's wrong? Do some debugging yourself, just reading the plugin in most cases won't magically tell you what is wrong.
Comment out everything, make sure it doesn't crash and then start enabling code until it crashes again. Now you found what part of the code is causing the crash.

Post it here and we will take a look.
Well, I remember Arkshine read some plugin I posted earlier and it was more than just 1300 lines and he discovered the missing symbol that caused compilation error. Thanks for you quite depressing reply lmao.

I believe I tried everything possible, the server crashes right when a player spawns, I tried disabling ham_spawn and ham_killed, but still same problem. And FYI the plugin was working absolutely fine with AMX Mod X 1.8.2, and when I added full support to AMX Mod X 1.8.3 the server started crashing for the mentioned reason.

- I tried commenting out codes
- I tried changing codes and used different methods for the same purpose

Same problem, same crash error! Server crash instantly on spawn :/

Last edited by happy_2012; 06-19-2018 at 16:03.
happy_2012 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-19-2018 , 16:31   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #4

Quote:
Originally Posted by happy_2012 View Post
Well, I remember Arkshine read some plugin I posted earlier and it was more than just 1300 lines and he discovered the missing symbol that caused compilation error. Thanks for you quite depressing reply lmao.

I believe I tried everything possible, the server crashes right when a player spawns, I tried disabling ham_spawn and ham_killed, but still same problem. And FYI the plugin was working absolutely fine with AMX Mod X 1.8.2, and when I added full support to AMX Mod X 1.8.3 the server started crashing for the mentioned reason.

- I tried commenting out codes
- I tried changing codes and used different methods for the same purpose

Same problem, same crash error! Server crash instantly on spawn :/
Compilation error != runtime error. If you don't want to debug, fine, wait for someone to do it for you.
__________________
HamletEagle is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 06-19-2018 , 16:41   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #5

There are no error logs in the logs directory, I just get FATAL ERROR (shutting down): IndexOfEdict: bad entity in server console right when someone spawns. The plugin worked perfectly fine on AMX 182, but crashes the server on AMX 183.

Updated from AMX182 to AMX183:
- Replaced client_print( ) with client_print_color( ).
- Replaced g_iMaxPlayers = get_maxplayers( ) with using MaxClients.
- Replaced get_players( ) with get_players_ex( ).
- Removed out MAX_PLAYERS from the code as AMX 183 already has it.

Compiled with AMX 183 compiler, and installed into my server and got that crash error! I did it for most of my plugins since I started using AMX183 recently, all plugins worked fine, but this plugin crash.

Last edited by happy_2012; 06-19-2018 at 16:41.
happy_2012 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-19-2018 , 16:49   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #6

Well, I tried your plugin and I don't get any crash. Try only with this plugin and everything else disabled. Does it happen again?
__________________
HamletEagle is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 06-19-2018 , 16:56   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #7

I tried this:
- Disabled all 3rd party plugins except my plugin Server works.
- Activated all 3rd party plugins and disabled my plugin Server works.
- Activated all 3rd party plugins Server crash.

I think I should keep my plugin enabled, and test it with all 3rd party plugins, and let's see what causes it?
happy_2012 is offline
HamletEagle
AMX Mod X Plugin Approver
Join Date: Sep 2013
Location: Romania
Old 06-19-2018 , 16:57   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #8

Maybe it's a conflict with another plugin. Yes, keep yours enabled, disabled all other 3rd party plugins. Then enable the other plugins one by one until you find out what combination is causing the crash.
__________________

Last edited by HamletEagle; 06-19-2018 at 16:58.
HamletEagle is offline
happy_2012
Senior Member
Join Date: Aug 2012
Old 06-19-2018 , 17:03   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #9

Well, I did that! It appears to be Base Builder 6.5 main plugin
Attached Files
File Type: sma Get Plugin or Get Source (base_builder.sma - 791 views - 85.9 KB)

Last edited by happy_2012; 06-19-2018 at 17:06. Reason: Added base builder source code I am using!
happy_2012 is offline
marcelowzd
Senior Member
Join Date: Feb 2011
Location: São Paulo, Brazil
Old 06-19-2018 , 20:33   Re: Server crash: IndexOfEdict: bad entity
Reply With Quote #10

Base Builder has this problem since always, just change the following and there won't be another crash.

PHP Code:
register_forward(FM_TraceLine,         "fw_Traceline")
-->
register_forward(FM_TraceLine,         "fw_Traceline"1
__________________

Last edited by marcelowzd; 06-19-2018 at 20:33.
marcelowzd 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 12:48.


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