SphereServer BugTracker - SphereServer
View Issue Details
0001984SphereServerexecutable - linux buildpublic19-06-11 14:3306-01-14 12:41
Mirravin 
Ben 
normalcrashhave not tried
closedunable to reproduce 
 
 
Automated (specify build number)
None
None
1457
0001984: Infinity loop seems to be related with combat.
18:15:FATAL:Segmentation fault
18:15:DEBUG:__ thread (3026189200) __ | # | _____ function _____________ | ticks passed from previous function start ______
18:15:DEBUG:>> 3026189200 | 0 | CServer::OnTick | +0
18:15:DEBUG:>> 3026189200 | 1 | CDataBase::OnTick | +4
18:15:DEBUG:>> 3026189200 | 2 | CChar::OnTick | +1391368756
18:15:DEBUG:>> 3026189200 | 3 | CChar::Skill_Done | +0
18:15:DEBUG:>> 3026189200 | 4 | CChar::Skill_Stage | +0
18:15:DEBUG:>> 3026189200 | 5 | CChar::Skill_Fighting | +0
18:15:DEBUG:>> 3026189200 | 6 | CChar::Fight_HitTry | +0
18:15:DEBUG:>> 3026189200 | 7 | CChar::Fight_Clear | +0
18:15:DEBUG:>> 3026189200 | 8 | CChar::Fight_Attack | +0
18:15:DEBUG:>> 3026189200 | 9 | CChar::Fight_Clear | +0
18:15:DEBUG:>> 3026189200 | 10 | CChar::Fight_Attack | +0
18:15:DEBUG:>> 3026189200 | 11 | CChar::Fight_Clear | +0
18:15:DEBUG:>> 3026189200 | 12 | CChar::Fight_Attack | +0
18:15:DEBUG:>> 3026189200 | 13 | CChar::Fight_Clear | +0
18:15:DEBUG:>> 3026189200 | 14 | CChar::Fight_Attack | +0
18:15:DEBUG:>> 3026189200 | 15 | CChar::Fight_Clear | +0
[INFINITY]
I haven't got this error before.
I think, it is related with PvM. May be related with my scripts(I have many strange overrides in AI/Combat), so if you can't fix this, please write about the meaning of this errors.
Experimental=01|08|010000|0800000|08000
OptionFlags=08|0200|080|02000
NPCAI=01|02|04|08|040|0200
MagicFlags=04|08|01
//CombatFlags=0
No tags attached.
Issue History
19-06-11 14:33MirravinNew Issue
19-06-11 21:01xantierNote Added: 0001135
19-06-11 21:19MirravinNote Added: 0001136
19-06-11 21:20MirravinNote Edited: 0001136bug_revision_view_page.php?bugnote_id=0001136#r360
22-06-11 02:57MrSugarCubeNote Added: 0001143
06-01-14 01:41MirravinNote Added: 0001885
06-01-14 12:41BenStatusnew => closed
06-01-14 12:41BenAssigned To => Ben
06-01-14 12:41BenResolutionopen => unable to reproduce

Notes
(0001135)
xantier   
19-06-11 21:01   
i think you should post your @hit* triggers here. Fight_Attack() only fails (or calls attack_clear()) if you attack yourself, attack a dead person, attack a disconnected person, attack a person that you can't see, attack an invalid target or if you are dead. so one of these conditions must be creating an infinite loop. so check these.
(0001136)
Mirravin   
19-06-11 21:19   
(edited on: 19-06-11 21:20)
Ok, I will make some tests next week, when I will have time.

P.s. It may be related with attacking the mounted(inactivated,invisible) animal.

(0001143)
MrSugarCube   
22-06-11 02:57   
Is it just the last two lines that are repeated?

18:15:DEBUG:>> 3026189200 | .. | CChar::Fight_Attack | +0
18:15:DEBUG:>> 3026189200 | .. | CChar::Fight_Clear | +0

(if there's anything else then it could be useful for me to see the rest, otherwise continue reading below :))


Are you trying to mess with memory items, perhaps under @Destroy (on memory items) or maybe @Attack (on characters)?

It looks like a hit attempt was aborted (likely to be for one of the reasons xantier listed, another possible reason could be a guest account attacking a non-guest account).

When this happens, Sphere will:
1. Clear the invalid fight memory.
2. Find a different target (by checking for any remaining memory_war_targ memories).
3. If a new target was found, try to attack the target.

If the new target is invalid, Sphere will go back to step 1 (clear memory, find new target). This will continue until a valid target is found or no memory_war_targ memories are left.

From what I can see in the error log, Sphere got stuck in this loop and was never able to find a new target. Currently, the only way I can see to reproduce this is for a script to prevent the memories from being removed/cleared (or the script could be creating new memories).



I was able to reproduce a similar-looking error here using the following script. '.f_fightmem' creates an NPC that is forced to attack you, but it cannot because you are dead -- unfortunately, that @Destroy trigger prevents the fight memory from being cleared, causing the infinite loop:

[function f_fightmem]
serv.newnpc c_headless
ref1 = <new.uid>
ref1.movenear <uid> 3
ref1.memory <uid> memory_war_targ

flags |= statf_dead
ref1.attack <uid>
return

[typedef t_eq_memory_obj]
on=@destroy
    color |= memory_fight|memory_war_targ
    return 1
(0001885)
Mirravin   
06-01-14 01:41   
It seems, that this issue was scp-related or it's already fixed. I couldn't reproduse it, and had't seen this error again.
Can be closed.