SphereServer BugTracker - SphereServer
View Issue Details
0002042SphereServerexecutable - windows buildpublic25-09-11 17:4115-12-13 22:15
Terrikate 
Ben 
normalmajoralways
resolvedfixed 
 
0.56c Nightly 
Automated (specify build number)
None
None
1495
0002042: Pets mounted disappear after a save and restart
http://www.sphereserver.net/index.php?/topic/48709-gc-and-mounts/ [^]
http://www.sphereserver.net/index.php?/topic/41265-mount-erase-on-save/page__p__191976__hl__mount__fromsearch__1 [^]
- Your pet attacks a NPC
- You ride on your pet
- The NPC dies before a saved
- Your pet still has memories of combat
- The server makes a save
- Restart the server
- After connecting your mount will be gone
No tags attached.
Issue History
25-09-11 17:41TerrikateNew Issue
06-07-12 23:08AnarchCassiusIssue Monitored: AnarchCassius
09-07-12 07:15ShaklabanIssue Monitored: Shaklaban
09-07-12 07:18ShaklabanNote Added: 0001325
09-07-12 07:19ShaklabanNote Edited: 0001325bug_revision_view_page.php?bugnote_id=0001325#r425
09-07-12 23:53TerrikateNote Added: 0001326
20-07-12 02:26TerrikateNote Added: 0001330
20-07-12 02:26TerrikateNote Edited: 0001330bug_revision_view_page.php?bugnote_id=0001330#r429
20-07-12 02:26TerrikateNote Edited: 0001330bug_revision_view_page.php?bugnote_id=0001330#r430
20-07-12 02:27TerrikateNote Edited: 0001330bug_revision_view_page.php?bugnote_id=0001330#r431
20-07-12 02:28TerrikateNote Added: 0001331
17-09-12 20:37TerrikateAssigned To => Terrikate
17-09-12 20:37TerrikateStatusnew => assigned
23-09-12 19:40TerrikateNote Added: 0001388
23-09-12 19:41TerrikateStatusassigned => feedback
25-09-12 18:53ShaklabanNote Added: 0001394
25-09-12 18:54ShaklabanNote Edited: 0001394bug_revision_view_page.php?bugnote_id=0001394#r459
25-09-12 18:55ShaklabanNote Edited: 0001394bug_revision_view_page.php?bugnote_id=0001394#r460
25-09-12 18:55ShaklabanNote Edited: 0001394bug_revision_view_page.php?bugnote_id=0001394#r461
15-12-13 22:15BenNote Added: 0001852
15-12-13 22:15BenStatusfeedback => resolved
15-12-13 22:15BenFixed in Version => 0.56c Nightly
15-12-13 22:15BenResolutionopen => fixed
15-12-13 22:15BenAssigned ToTerrikate => Ben

Notes
(0001325)
Shaklaban   
09-07-12 07:18   
(edited on: 09-07-12 07:19)
additional info:

shrinked pets also disappearing.

non-mount npcs which is shrinked can be disappearing with the same error.

example error:

22:59:ERROR:UID=033f5b9, id=063ab 'Biz Geldik Lutfen Kacmayin ', Invalid code=1203 (Ridden NPC not acting as such)
22:59:ERROR:GC: Object memory leak 175640!=175639

i try to remove flags and memories from the npc but not helps.

(0001326)
Terrikate   
09-07-12 23:53   
Finally I had to do a workaround...

When I make a save I see that all players (online and offline) that are on a mount (FINDLAYER.25) and if in that LAYER contains an MORE2 aiming to NPC nonexistent... means that the pet will be cleared on the next reboot. So I delete the NPC, create other and force the player to ride it.

If you need help with it let me know and look for the script.
(0001330)
Terrikate   
20-07-12 02:26   
(edited on: 20-07-12 02:27)
This is the script. I reduced it by removing things from my server and I translated it, if something fails me know.

Greetings.

sphere_serv_triggers.scp
[FUNCTION f_onserver_save]
ALLPLAYERS F_PETS_RECREATE



Anywhere.scp
[FUNCTION F_PETS_RECREATE]
REF1=<FINDLAYER.25>
IF (<REF1>) // player rides a pet
    REF2=<FINDLAYER.25.MORE2>
    IF (!<REF2>) // pet will be deleted on the next restart, not exist in the world

        // create new pet
        SERV.NEWNPC <REF1.MORE1>
        NEW.P=


                REF3=<NEW>

        // create owner memory
        SERV.NEWITEM=i_memory
        NEW.COLOR=memory_ipet
        NEW.LINK=<UID>
        NEW.LAYER=layer_special
        NEW.CONT=<REF3>
        
        // update findlayer and disconnect pet
        REF1.MORE2=<REF3>
        REF3.NAME=<REF1.NAME>
        REF3.COLOR=<REF1.COLOR>
        REF3.FOOD=15
        REF3.FLAGS=statf_ridden|statf_pet
        REF3.ACTARG1=<REF1.UID>|030000000
        REF3.ACTION=06f
        REF3.DISCONNECT
    ENDIF
ENDIF

[FUNCTION ALLPLAYERS]
FOR ACCOUNT 0 <EVAL <SERV.ACCOUNTS>-1>
    FOR CHAR 0 <EVAL <SERV.ACCOUNT.<dLOCAL.ACCOUNT>.CHARS> - 1>
        REF1=<SERV.ACCOUNT.<dlocal.CUENTA>.CHAR.<dLOCAL.CHAR>.UID>
        IF (<REF1>)
            REF1.<ARGS>
        ENDIF
    ENDFOR
ENDFOR

(0001331)
Terrikate   
20-07-12 02:28   
NEW.P= P // Fix that, take it as html
(0001388)
Terrikate   
23-09-12 19:40   
I can not reproduce the problem with the latest versions Nightly. I'll try in previous versions to do exactly the same.

Shaklaban if you get it on the latest versions let me know and show me step by step what you do.

Let's see if we get something clear...
(0001394)
Shaklaban   
25-09-12 18:53   
(edited on: 25-09-12 18:55)
i can't reproduce this in april 2012 build in the past. it occurs randomly and rare. by the way if you need to test here is the april build http://stones.gen.tr/SphereSvr.rar [^]

i put under @mount

argo.action=-1
argo.removeallmemories //generic function from scp while findid.i_memory remove
argo.flags &= ~statf_war

(0001852)
Ben   
15-12-13 22:15   
This doesn't seem to be an issue anymore... closing