Author Topic: Client crashes when picking up ghost items  (Read 831 times)

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Client crashes when picking up ghost items
« on: April 30, 2007, 09:38:57 pm »
I already reported the fact as Bug #2656 (and hope I did not miss a previous report by searching for different keywords).

My question for this thread is rather: How could someone create ghost items to check the issue?

I could imagine that some people drop a bunch of items. Another logs in - and while loading, they pick up all items. The items the new user still can see must be ghost items.

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

Caarrie

  • Forum Addict
  • *
  • Posts: 3369
  • We want no UNFIXED bugs!!!!!!!!!!!!!
    • View Profile
    • PlaneShift3dMods
Re: Client crashes when picking up ghost items
« Reply #1 on: April 30, 2007, 10:18:18 pm »
I have had lots of crashes on picking up items. I have been told to wait for the next release and to test again so we are to wait and see what happens and if this strange bug has been fixed.

[something to the effect that the server reports object has no hp]

<src/client/psclientdr.cpp:245 HandleStatsUpdate>:
  Server report HP but object is not alive

acraig

  • Administrator
  • Veteran
  • *
  • Posts: 1562
    • View Profile
Re: Client crashes when picking up ghost items
« Reply #2 on: May 01, 2007, 03:24:41 am »
The inventory system has undergone a fairly extensive re-design so I expect a rash of different issues but hopefully easier to solve this time around.
----------
Andrew
"For all I know, she's lying, everyone's lying; welcome to the Internet"

Suno_Regin

  • Forum Addict
  • *
  • Posts: 2445
    • View Profile
Re: Client crashes when picking up ghost items
« Reply #3 on: May 01, 2007, 04:13:49 am »
What's a ghost item? =/

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Client crashes when picking up ghost items
« Reply #4 on: May 01, 2007, 06:59:11 am »
@ acraig:

"Ghost items" are probably not inventory related, because they are not yet in the inventory.

And the crash currently happens already when targeting them, even before you really pick them up.
__

@ Suno Regin:

A "ghost item" is an item which is not laying on the floor anymore, because someone already picked it up; just your client missed the message that it disappeared out of the world. So your client still sees this item dropped on the floor.

If you try to pick it up, I guess the server tells your client that this item is unknown (that is the conflict between everyone else and your client). This fact as such must not lead into a crash of your client, though.

My guess is now that a function in the client code tries to access attributes of this (not anymore existing) item, but the server returned an error value instead of an item instance. The client tries to read an attribute which does not exist in your RAM, therefore it tries to access a memory region it is not allowed to, which results in an "access violation exception".

Developers need to find the lazy code which accessed an instance of some class without checking first if it is assigned at all.

Well - so far my good guess based on some coding experience I have myself. ;)

Gag Harmond
Knight and Ambassador
The Royal House of Purrty

stfrn

  • Hydlaa Citizen
  • *
  • Posts: 324
  • the beaver ex-dev :B
    • View Profile
Re: Client crashes when picking up ghost items
« Reply #5 on: May 03, 2007, 12:21:08 am »
@ acraig:

"Ghost items" are probably not inventory related, because they are not yet in the inventory.

And the crash currently happens already when targeting them, even before you really pick them up.

Ah, but they are items that can be held in the inventory system, so thusly they fall under it's rules :) And more to this case the ghosts may occur because of a mistake in the invtory of the person who created the ghost.

When the server tells you an item exists on the ground, you are given a few pieces of infromation, such as it's location, which model to use, etc. But to interact with it you need more infromation, which is only asked for when you try to interact with it. In this case selecting an item displays it's health in the info window... even tho there should be something saying that it doesn't need health.

"The [inventory system] has undergone a fairly extensive re-design so I expect a rash of different issues but hopefully easier to solve this time around." would make a great slogan  :D
player -> gm -> dev -> bum

LigH

  • Forum Legend
  • *
  • Posts: 7096
    • View Profile
Re: Client crashes when picking up ghost items
« Reply #6 on: May 03, 2007, 08:45:38 am »
Slogan - yeah, surely! :D

I think the appearance of ghost items is a result of either

a) network issues (a packet with the "Item got picked up" message did not arrive), or
b) threading issues (the application is too busy loading the world, that the "Item got picked up" message could not be handled).

Everyone else in sight of the item got the message, their clients removed the item from their local worlds. Just your client somehow missed the removal, and still believes it is in the world.

Now when you try to pick the (already gone) item up, the server is asked for details (e.g. if this item is pickable). But instead of item details, the server returns "Item unknown" because it knows that the item was picked up. If the client would correctly check this possibility, the item may simply disappear, maybe with a message... but instead, a function in the client code seems to assume that it got a valid item class instance, accesses an undefined attribute - and provokes an access violation.

So far my guess. Not based on crash logs, but based on years of experience of coding. ;)

Gag Harmond
Knight and Ambassador
The Royal House of Purrty