EOSERV Bug Tracker > Bug #202: Quests crash on reset()

Bug #202: Quests crash on reset()

Quests crash on reset()
ID #202
Submitter Ryouken
Product EOSERV
Severity Critical
Submitted 13th Dec 2012
Updated 1st Mar 2014
Related SVN Revisions
Rev# Date Description
r425 01 Mar 2014 22:24:01 UTC Prevent crashes caused by Reset / ResetQuest (bug #202), Prevent triggering of rules in "disa ...
Ryouken Submitter 5 years, 4 days ago

Whenever reset() is called in a state with other actions in it, the server crashes for some odd reason. o.o


Ryouken Submitter 5 years, 4 days ago

Actually, it seems to crash on reset either way.

Apollo 5 years, 3 days ago

I am having no problems with using Reset(). Can you send an example to my inbox?

Ryouken Submitter 5 years, 3 days ago

Was it tested on the latest revision? It might be something I added to the code, although I've never messed with quests as far as adding new actions and rules. But I don't see how that would effect it. o.o

Updated Severity to TRIVIAL

Apollo 5 years, 2 days ago

I am using a modified current revision. Also, about half of my quests were the original model quests used for designing EO+ for EOSERV. This is why I would need to see a sample quest you have that actually breaks.

Ryouken Submitter 5 years, 2 days ago



questname "Tasks"

version 1.0



state Begin


action AddNpcText(8,"Choose a task:");

action AddNpcInput(8,1,"Kill 10 goats");

action AddNpcInput(8,2,"Kill 15 blobs");

action AddNpcInput(8,3,"Close");

rule InputNpc(1)goto killgoat

rule InputNpc(2)goto killblob

rule InputNpc(3)goto res


state killgoat


desc "Kill 10 goats"

action AddNpcText(8,"Information: --Kill 10 goats Reward: --500 exp and 25 gold");

action AddNpcInput(8,1,"Abort task");

rule KilledNpcs(7,10)goto goatrew

rule InputNpc(1)goto begin


state killblob


desc "Kill 10 blobs"

action AddNpcText(8,"Information: --Kill 10 blobs Reward: --750 exp and 80 gold");

action AddNpcInput(8,1,"Abort task");

rule KilledNpcs(3,10)goto blobrew

rule InputNpc(1)goto begin


state goatrew


action GiveItem(1,25);

action GiveExp(500);

action ShowHint("You obtained 25 gold and 500 exp");

rule Always()goto res


state blobrew


action GiveItem(1,80);

action GiveExp(750);

action ShowHint("You obtained 80 gold and 750 exp")

rule Always()goto res


state res


action Reset();


I noticed it doesn't do it for every type of reset. In this case it seems to only do it after switching states after a KilledNpc check

Apollo 5 years, 2 days ago

I believe the only proper Reset() is triggered by rule TalkedToNpc(#id). Not entirely sure why this is, but that should fix any lock ups you have.

Ryouken Submitter 5 years, 2 days ago

Ah, I guess I could just make the player talk to them again after its done. Thanks :P

Ryouken Submitter 5 years, 2 days ago

I find it odd though. This quest worked before, but now it crashes on reset. It must of been one of sausages fixes, but I'm not entirely sure which one.

Apollo 5 years, 2 days ago

I am not sure of the exact reason for this, but there has never been a case of resetting without talking to an NPC on EO. Sausage would need to specify why this is manditory.

Sausage Developer 4 years, 38 weeks ago

Un-tested but probably another invalidation bug:

UTIL_FOREACH(from->quests, q) { q.second->KilledNPC(this->Data().id); }

KilledNPC may call TriggerRule which may call DoAction which may call Character::ResetQuest which mutates the quest container.

Updated Severity to CRITICAL
Updated Status to CONFIRMED

Apollo 4 years, 38 weeks ago

I have had success in sending to a Reset() state without the need of NPC. It seems safe to use an Always() rule to send to a Reset() in a situation where a character's database data holds a statename that currently doesn't exist. This is checked at login and I have 100% success in calling it. Definitely not the actual bug, but it might be useful information for a work-around or for changed quests that require a non-npc reset.

Sausage Developer 3 years, 41 weeks ago

Fixed in r425.

Updated Status to CLOSED, FIXED

Add Comment

Please don't post unless you have something relevant to the bug to say.
Do not comment to say "thanks" or "fix this please".

Please log in to add comments. EOSERV Bug Tracker > Bug #202: Quests crash on reset()