Issue information

Issue ID
#8483
Status
Fixed
Severity
None
Started
kyeme
Dec 31, 2014 12:01
Last Post
Haru
Dec 31, 2014 20:11
Confirmation
N/A

kyeme - Dec 31, 2014 12:01

Using Latest db5fd3795cba3d30bb3d031719a272eec23cd586


[img]http://i.imgur.com/QDYMcIE.jpg[/img]

npc.c line 153[code=auto:0] if (sd->areanpc_id != nd->bl.id) [/code]

npc.c line 990[code=auto:0] npc->onuntouch_event(sd, nd); [/code]

This post has been edited by kyeme on Dec 31, 2014 12:46

Frost - Dec 31, 2014 13:12

How did you reproduce this?

4144 - Dec 31, 2014 15:41

You can always reproduce this?

From code look like it try call OnUnTouch event for not existing npc
sd->areanpc_id is non zero, but npc with this id not exists.

Crash itself simple to fix, but I not sure why this happend.

kyeme - Dec 31, 2014 15:50

As I remember i use @unloadnpcfile and @loadnpc earlier.. still I encountered mapcrash (first time)

This post has been edited by kyeme on Dec 31, 2014 15:51

Haru - Dec 31, 2014 17:56

Hmm, makes sense... When the NPCs are unloaded, all the related sd->areanpc_id become invalid, so the id2bl lookup returns NULL...

4144 - Dec 31, 2014 20:04

Fix is here [url="https://github.com/HerculesWS/Hercules/pull/432"]https://github.com/HerculesWS/Hercules/pull/432[/url]

Haru - Dec 31, 2014 20:11

and merged, thank you!