PlaneShift

  • Status Closed
  • Percent Complete
    100%
  • Task Type Bug Report
  • Category
  • Assigned To
    Kenneth Graunke
    Rizin
  • Operating System
  • Severity Low
  • Priority
  • Reported Version
  • Due in Version Undecided
  • Due Date Undecided
  • Votes
  • Private
Attached to Project: PlaneShift
Opened by Rizin - 13.04.2008
Last edited by Steven Schwartfeger - 15.04.2008

FS#1421 - Killnpc command correctly using "name"

Adjustment of the killnpc command to work with name or pid. The help file in game says that name should work, but every attempt tried yields no npc targeted.

Closed by  Steven Schwartfeger
15.04.2008 00:27
Reason for closing:  
Additional comments about closing:  

Works nicely now, and no crash.

Caarrie commented on 13.04.2008 23:38

/killnpc PID: 13 works fine for me on my local server with no modification of the source, please retest and include the space after PID:

Steven Schwartfeger commented on 13.04.2008 23:40

Hmm, this gets tricky when you do something like "/killnpc Rogue"… there are many NPCs with that name.

Rizin commented on 14.04.2008 00:27

Just tested on Laanx PID: with and without space fails. "No NPC was targeted."

The reason I mention name is that the help file says name does work. This isn't really something we would be chasing down multi-spawn NPC's with - but for fixing important NPC's who fall off of the map to hard to target spots since.

Kenneth Graunke commented on 14.04.2008 00:30

Confirming. It doesn't work with EID at all, and the PID syntax suffers from an off-by-one error making it fail 100% of the time.

Making it work with a name is probably still useful if, say, you need to reboot Finra or something.

Kenneth Graunke commented on 14.04.2008 01:02

Fixed in trunk and stable (r1337).

Steven Schwartfeger commented on 14.04.2008 12:21

Nice work, you made it so the name works ;) but on the other hand…

now using the "pid: #" format crashes the server, reproduced twice:

Core was generated by `./psserver –run=/this/loadbasic'.
Program terminated with signal 11, Segmentation fault.
#0 0x00002aeff0a37c2c in ?? () from /lib/libc.so.6
(gdb) bt
#0 0x00002aeff0a37c2c in ?? () from /lib/libc.so.6
#1 0x000000000047da5d in AdminManager::KillNPC (this=<value optimized out>, me=0x268af40, msg=<value optimized out>, data=@0x41000130,

  client=0x26528c0) at /usr/include/gentoo-multilib/amd64/stdlib.h:336

#2 0x0000000000499b7a in AdminManager::HandleAdminCmdMessage (this=0xc4d7e0, me=0x268af40, msg=@0x41000e20, data=@0x41000130, client=0x26528c0)

  at src/server/adminmanager.cpp:1041

#3 0x000000000049b53f in AdminManager::HandleMessage (this=0xc4d7e0, me=0x268af40, client=0x26528c0) at src/server/adminmanager.cpp:144
#4 0x000000000068cf85 in MsgHandler::Publish (this=0xc041c0, me=0x268af40) at src/common/net/msghandler.cpp:93
#5 0x0000000000756bb2 in EventManager::Run (this=0xc041c0) at src/common/util/eventmanager.cpp:171
#6 0x00000000005a346d in CS::Threading::Implementation::(anonymous namespace)::proxyFunc (param=0x7fffbb0871b0)

  at libs/csutil/threading/pthread_thread.cpp:75

#7 0x00002aefefc42047 in start_thread () from /lib/libpthread.so.0
#8 0x00002aeff0ac428d in clone () from /lib/libc.so.6
#9 0x0000000000000000 in ?? ()
(gdb) bt full
#0 0x00002aeff0a37c2c in ?? () from /lib/libc.so.6
No symbol table info available.
#1 0x000000000047da5d in AdminManager::KillNPC (this=<value optimized out>, me=0x268af40, msg=<value optimized out>, data=@0x41000130,

  client=0x26528c0) at /usr/include/gentoo-multilib/amd64/stdlib.h:336
      obj = <value optimized out>
      target = <value optimized out>
      p = <value optimized out>

#2 0x0000000000499b7a in AdminManager::HandleAdminCmdMessage (this=0xc4d7e0, me=0x268af40, msg=@0x41000e20, data=@0x41000130, client=0x26528c0)

  at src/server/adminmanager.cpp:1041
      targetobject = (class gemObject *) 0x0
      targetactor = (class gemActor *) 0x0
      targetclient = (Client *) 0x0
      targetID = <value optimized out>
      p = <value optimized out>
      p = <value optimized out>
Kenneth Graunke commented on 14.04.2008 18:44

Blimey. Sorry, I'll fix it later today.

By the way, "pid: #" is erroneous syntax and actually never worked in the first place…Caarrie must have had the NPC targeted when testing.

Kenneth Graunke commented on 14.04.2008 22:38

Fixed the crash in r1342. Again, "pid: #" is wrong and won't work…use "pid:#".

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing