Jump to content

  •  

Bug Tracker Migration

June 3rd
Good news everyone! The staff has decided that it is time to slowly kill off this Bug Tracker. We will begin the process of slowly migrating from this Bug Tracker over to our Github Issues which can be found here: https://github.com/HerculesWS/Hercules/issues

Over the next couple of days, I will be closing off any opportunity to create new reports. However, I still will keep the opportunity to reply to existing Bug Reports. Doing this will allow us to slowly fix any bug reports we have listed here so that we can easily migrate over to our Issue Tracker.

Update - June 7th 2015: Creating new bug posts has been disabled. Please use our https://github.com/HerculesWS/Hercules/issues tracker to post bugs. Users are still able to reply to existing bug posts.

- Administration

Issue Information

  • #000032

  • 5 - Critical

  • Fixed

Issue Confirmations

  • Yes (0)No (0)
Photo

Crash: Land Protector With Higher Skill Level

Posted by Hercules Bot on 10 September 2007 - 11:07 AM

Originally posted by theultramage
http://www.eathena.w...cker&showbug=32

(Originally reported here)

All skill units have/get a skill layout (a number that indexes a layout table).
The first MAX_SQUARE_LAYOUT (value: 5) entries are reserved for predefined square layouts of increasing radius.
The point is, only these few are defined, so anything attempting to do a larger area effect will go out of safe array bounds.

Now, land protector's definition looks like this
CODE
3:3:4:4:5
which the auto-guessing code extends by 5,6,6,7,7,..., up to MAX_SKILL_LEVEL.
What does this mean? That when you do @useskill Landprotector 100, the server crashes trying to deploy the skill using a layout that consists of random values.

Note: NJ_SUITON and any other skill that defines its layout this way is affected by this same problem.
jAthena doesn't have to deal with this since their 'guessing' code just takes the current max. value.

How to fix? Well, one way is to define the sequence so that the value stops at 5 and stays there.
It's also possible to add a second pass over all skill unit entries that fixes all invalid ones.

EDIT:
Or verify if the value is valid each time it is retrieved from the array. This seems to be the least complex solution.

This post has been edited by theultramage: Sep 10 2007, 05:22 AM