Issue information

Issue ID
#7089
Status
Fixed
Severity
None
Started
KyleZ
Feb 22, 2013 6:30
Last Post
Ind
Apr 6, 2013 4:51
Confirmation
Yes (4)
No (0)

KyleZ - Feb 22, 2013 6:30

This bug wasn't found by me, so I'm just gonna show you how to reproduce it step by step.


1. get naked...(LOL
2. put on any +16 official garment
3. summon multiple aggressive mobs(enough to incur def1 penalty
4. at some point, your def1 reaches -400, where the denominator of DEF formula equals to 0( As for as i know, +16 garment has a bonus def1 of 40. -400=40x(-10)?
5. server crashes.

I don't know why, but it was said that only garment could crash the server. You change it to any other gears(+16 or not, server worked fine.

Could it has sth. to do with battle_config.vit_penalty?

Is it intended on officials that this config would make actual def1 negative? I always thought 0 was the floor, under this circumstance.

The following snaps are for your further study of this issue.


[attachment=94:1.jpg]

[attachment=95:2.jpg]

[attachment=96:3.jpg]

[sharedmedia=core:attachments:94]

[sharedmedia=core:attachments:95]

[sharedmedia=core:attachments:96]

This post has been edited by KyleZ on Feb 22, 2013 6:42

KyleZ - Feb 22, 2013 6:33

[s]oh no... attachments not working ,again..?[/s]

This post has been edited by KyleZ on Feb 22, 2013 6:43

exneval - Feb 22, 2013 9:34

can't get it[code=auto:0] 3. summon multiple aggressive mobs(enough to incur def1 penalty [/code]

malufett - Feb 22, 2013 10:54

I can't reproduce...
please check if I do it right..
I got naked..uhmm..no not me my character
then get +16 muffler
then summon 40 echio
and I don't get a map crash or any..I just survive for 5 seconds...


:meow:

KyleZ - Feb 22, 2013 11:23

@malufett

Good for you! haha

Try Ranger and summon Zombie instead, that's the same config as when he found the bug.

btw: 40 might be too many.. just try to survive longer..

The bug disappeared, 'cause we used a manual fix, preventing def1 from negative.

I'll remove the fix and test it again later.

malufett - Feb 22, 2013 12:13

still I can't reproduce..that only thing I think to make it crash is if def1 turns -400 and I don't think there is a way it turns to that..BTW what is your config for def penalty??
:meow:

Ind - Feb 22, 2013 20:58

I cant reproduce the crash either, i spawned about 200 zombies. I however noticed that at some point i'd get instantly killed even thou i still had about 80% hp left, I guess the def1 value goes mad. Edit:
the point where I was insta killed:[code=auto:0] [Debug]: Def1:-401[/code](I was printing the var at every iteration)

This post has been edited by Ind on Feb 22, 2013 21:01

KyleZ - Feb 23, 2013 2:07

For the record, the crash wouldn't reveal instantly, you have to survie for a certain time. ( >30s
Try increasing your HP ratio or anything that can reach this goal.

After my test, I rulled out Job issue. ( both RK and RA crashed the server
We compiled pure source to rull out potential causes related to custom features. (except HP x 3, MAXLV 210, MAXSTAT 210

200 mobs is enough, as you can see from the following screenshots, we used zombie. Archer Skeletons were also summoned to make sure. And yes, it also crashed.

As Ind said earlier, def1 went wild at some point. To verify if other gears can also induce crash, I put on +16 Leather Jacket only.Everything was fine, for quite a while. Then i plused another gear. It is supposed to reduce the dmg while it went the other way around. Every attack was 3-digit, If I hadn't had HP adjusted or VIT increased, i'd be dead instantly.

The difference between my test and Ind's is I got -400 def1 and went crash, Ind managed to reach -401 without crash somehow.

And both of us confirmed: [b]def1 goes negative due to penalty[/b]

Put aside other issues, this couldn't be right. A capped value (0) is needed here.

As for how I reached -400, that remains a mystery...

RA +16 garment: crashed
[attachment=97:RA16.jpg]

RA +17: fine
[attachment=98:RA17.jpg]

RK +16: crashed
[attachment=99:RK16A.jpg]
[attachment=100:RK16B.jpg]

This post has been edited by KyleZ on Feb 23, 2013 2:17

Ind - Feb 23, 2013 2:53

Thank you for the additional information, reproduced![code=auto:0] [Error]: Server received crash signal! Attempting to save all online characters! Floating point exception: 8 [/code]will work on debugging it further, employing gdb as of now

Ind - Feb 23, 2013 2:54

Yahooo. <3 gdb[code=auto:0] Program received signal EXC_ARITHMETIC, Arithmetic exception. 0x0000000100151b4a in battle_calc_weapon_attack (src=0x7fff5fbff8c0, target=0x7fff5fbff8c0, wflag=1606416576, skill_lv=63680, skill_id=0) at battle.c:3260 3260 wd.damage = wd.damage * (4000+def1) / (4000+10*def1) - vit_def; [/code]

Ind - Feb 23, 2013 3:13

The value it receives before the crash[code=auto:0] [Debug]: Def1:-400;vit_def:1[/code]

KyleZ - Feb 23, 2013 6:29

that's it...Any further on debug, you'll lose me - -

Thanks for confirming this. All the 'torture' from the mobs was worthwhile~ haha

This post has been edited by KyleZ on Feb 23, 2013 8:19

Ind - Apr 6, 2013 4:51

Fixed [url="https://github.com/HerculesWS/Hercules/commit/7e35b764fac24c51f4fc4a486ef33cf97b1225cb"]https://github.com/HerculesWS/Hercules/commit/7e35b764fac24c51f4fc4a486ef33cf97b1225cb[/url]