Author Topic: Access Violations  (Read 1022 times)

0 Members and 1 Guest are viewing this topic.

Offline Hacktank

  • Camper
  • ***
  • Posts: 462
  • Soldat Scripter
    • HTZRPG
Access Violations
« on: April 20, 2009, 09:14:42 pm »
I recently rented a server and am running a (fully updated) version of my ZRPG. But after about 20 minutes the script crashes and throws out an unending stream of access violation messages. This does not happen to me when I self host it (windows).

Example of the access violations:
Code: [Select]
[*] [Error] ZRPG -> (OnPlayerDamage): Access violation at address 0809E78C, accessing address 00216FF0
09-04-20 20:52:34  [*] [Error] ZRPG -> (OnPlayerDamage): Access violation at address 0809E78C, accessing address 00217000
09-04-20 20:52:34  [*] [Error] ZRPG -> (OnPlayerDamage): Access violation at address 0809E78C, accessing address 00217010
09-04-20 20:52:34  [*] [Error] ZRPG -> (OnPlayerDamage): Access violation at address 0809E78C, accessing address 00217020
09-04-20 20:52:34 (1) < 0 _ 0 > lol killed (2) Zombie with Ak-74
09-04-20 20:52:34  [*] [Error] ZRPG -> (OnPlayerKill): Access violation at address 0809E78C, accessing address 00217030
09-04-20 20:52:34  [*] [Error] ZRPG -> (OnWeaponChange): Access violation at address 0809E78C, accessing address 00217040
09-04-20 20:52:34 66.169.138.246:23073 requesting game...
09-04-20 20:52:34  [*] [Error] ZRPG -> (OnPlayerRespawn): Access violation at address 0809E78C, accessing address 00217050
09-04-20 20:52:34  [*] [Error] ZRPG -> (AppOnIdle): Access violation at address 0809E78C, accessing address 00217060

What could be causing this? Is it fixable? Since Linix is case sensitive and i assume that the rented server is linix does it matter if some of my variables in the script do not use correct capitalization?(like player[5].LVL and PlaYeR[5].Lvl)


Offline CurryWurst

  • Camper
  • ***
  • Posts: 265
    • Soldat Global Account System
Re: Access Violations
« Reply #1 on: April 21, 2009, 07:30:59 am »
I assume it's a problem of the non-thread safe scriptcore. I occasionally encounter the same access violations while running my loginsystem script.
It happens if some thread tries to access a variable of an other thread while it's currently being in use by the other thread.

Unfortunately, I can't come up with any solutions. Hope EnEsCe is going to improve the thread reliability in upcoming versions.

Since Linix is case sensitive and i assume that the rented server is linix does it matter if some of my variables in the script do not use correct capitalization?(like player[5].LVL and PlaYeR[5].Lvl)

Afaik, it doesn't matter.
Soldat Global Account System: #soldat.sgas @ quakenet

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Access Violations
« Reply #2 on: April 22, 2009, 05:31:39 pm »
try to do 'active' checks outside the "if" blocks (before everything else as a separate "if"), always use '= true/false' with bool getplayerstats and try to avoid using xsplit to improve stability... there might be some other things that increase the chance of access violations, and it highly depends on the system... It might even act completely different on two almost identical servers, its really weird. Just try different hosts and see which ones are the best for your script =/

Offline LORD KILLA

  • Camper
  • ***
  • Posts: 254
  • Happie
Re: Access Violations
« Reply #3 on: May 01, 2009, 06:25:13 am »
I think it could be caused of too big integer or byte values
as you see the address always grow up by 1, so its kinda like "buffer overflow"

(also possible too big damage multiplier, but very less possiblity)
« Last Edit: May 01, 2009, 06:26:51 am by LORD KILLA »

Offline danmer

  • Camper
  • ***
  • Posts: 466
  • crabhead
Re: Access Violations
« Reply #4 on: May 03, 2009, 09:07:09 am »
I think it could be caused of too big integer or byte values
as you see the address always grow up by 1, so its kinda like "buffer overflow"

(also possible too big damage multiplier, but very less possiblity)
not from my experience. Ints and bytes will just wrap, try it for yourself