Functions what work fine in windows but crash in linux (research thread)
Hello alliedmodders!
I thought i should post it somewhere else but all we do here is talk about scripting and functions so i hope i did the right thing. I made a huge plugin what is working fine in windows but crash in linux. So far i found out that using Ham_think PHP Code:
Correct code: PHP Code:
Well, now i fixed everything in my code what i know. There is still something i dont know and something still causes the crash. My question here is that what else causes crash on linux but not in windows. There cant be that many things. Thanks! |
Re: Functions what work fine in windows but crash in linux
Always checking an entity is valid before doing something.
|
Re: Functions what work fine in windows but crash in linux
I tested somethings
PHP Code:
PHP Code:
Just got error logs (invalid entity) Now the problem is that when im doing something with entities im using always set_pev ( im replacing them soon with engine but since it is easier to write with pev im using that ) And the funny thing is that i never got error logs saying entity is invalid. I also checked my code and i check everytime if user is connected or is entity valid. Im out of ideas now. I need to find those functions what crash ohter ways all that huge work creating that mod was useless because it cant be used if it is crashing. There is still one thing what i havent tested and that is entity count. If there are more than 1300 + something entities server crashes. ( seems pretty ridiculous that i reached that limit but who knows... ) |
Re: Functions what work fine in windows but crash in linux
You need to stop overthinking, stop wasting your time with weird tests, and simply adding sanity check before doing something like pev_valid/is_valid_ent.
|
Re: Functions what work fine in windows but crash in linux
PHP Code:
|
Re: Functions what work fine in windows but crash in linux
Thanks Arkshine and GuskiS.
I found one new crash type yet i dont know how to explain it yet because i dont understand it. It is something to do with set_view(id, CAMERA_3RDPERSON) i should recode my player model system because it is doing strange things sometimes. I tried to be friendly with old version and code got really complicated. Edit: If you set player model's submodel what is blank then use set_view(id, CAMERA_3RDPERSON) server will crash. If you find/know something then this thread is always welcome to accept your crash cause. |
Re: Functions what work fine in windows but crash in linux (research thread)
.Dare Devil., do you prеcache models/rpgrocket.mdl for set_view ?
|
Re: Functions what work fine in windows but crash in linux (research thread)
Quote:
I made my own set_view function but since it having some troubles i need to create new topic. |
| All times are GMT -4. The time now is 21:17. |
Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.