#690 Wrong item selected when clicked on

None
open
nobody
5
2014-08-11
2010-01-24
Anonymous
No

version: 1.12-beta-r12190M
server: crossfire.metalforge.net
client: GTK v2 (oroboros.glade layout, cache images _set_, download all images from server _set_)
OS: Win XP sp3
char: selenil (lvl 21 monk dragon of gaea)
email: harveyfxREMOVEALLCAPSNOSPAM@hotmail.com

When I am getting or dropping stuff using the mouse (rightclick), especially if "count" has been modified (to force the dropping or getting of a specific amount), then the action will select the wrong item. My mouse will be in one place, but some other item in the inventory list gets selected for drop or pickup, instead. This is repeatable with the count variable selected and modified; it happens at least 50% of the time under those specific conditions.

Often the item selected is one that I had dropped or picked up just previously.

I noticed this problem when I switched to the oroboros.glade layout. I don't know if it is specific to that layout, or affects others as well.

Discussion

  • Kevin R. Bulgrien

    I have observed this issue Linux, current top of SVN, but with no where near 50% repeatable when using the count input. In fact it is so infrequent as to be very difficult to judge whether it is a UI issue or something else.

    I feel doubtful that this is a .glade file issue, but the problem is so infrequent as to be difficult to reproduce reliably enough to show that it happens on all or only some layouts. I also suspect it has something to do with quantities of items on the ground, etc. I have only ever seen it happen when picking up from the ground on a large stack of items, and usually involving an item with large nrof.

     
  • Kevin R. Bulgrien

    I first observed it probably when using chthonic.glade.

     
  • Kevin R. Bulgrien

    Observed tonight on linux with gtk-v2.glade in use. As I do not believe this to be a layout issue, so the summary is changed so as not to imply such without more data.

    Frequency this evening also significantly less than 50% of time with use of count.

    Error did occur on pickup of an item >100 pieces. Pickup attempts <100 did not, though that may be a coincidence, though of note as the bad behavior occurred multiple times in a row trying to pickup the same stack of items >100. Third time it worked, but this could have had something to do with the fact that the previous accidental pickups had not been re-dropped. It would be interesting to note whether the problem frequency would go up if the accidental pickups were dropped before a re-attempt to perform the original pickup with count.

     
  • Kevin R. Bulgrien

    • summary: oroboros.glade layout (maybe others too) has get/take errors --> crossfire-client-gtk2 has get/take errors
     
  • Kevin R. Bulgrien

    I am running icon scale 75%, map scale 100%, map size 18x18. Fast TCP Send, Cache Images, fog-of war, and smoothing are all checked, and I'm using OpenGL. It's not clear that these have any bearing at this time, but it seems worth noting just in case.

     
  • Kevin R. Bulgrien

    Standing over a pile of bodies...

    eleven gnolls; two ogres; five madman; gnoll; sixteen ogres; and 21 more corpse stacks of varying quantities. Ground view is about 5 icons tall; inventory about 12 tall; messages about 23 lines tall. the sixteen ogres are second from the top of the viewable window... meaning eleven gnolls, two ogres; and five madmen are out of sight above. 100% of the time I want to pick up 15 of the ogres, I instead get the eleven gnolls as long as I redrop the gnolls after picking them up incorrectly. There is no question about the mouse being in the right place. The malfunction is not particular to the exact stack order as I pick up an ogre below the sixteen ogres and drop it so the sixteen are one lower than before. The eleven gnolls are still on top. With the sixteen ogres again in the second visible row, when I try to pick up 15, the top item (the 11 gnolls) is picked up instead... Of course I am not running under gdb. gtk-v2.glade.

    I step off the stack, and back on, and it does not repeat. Instead when I try to pickup 15 ogres, it tells me: That item is too heavy for you to pick up.

    I scroll up to the top of the ground view and back down to put the sixteen ogres in the second visible row and try to pick up 15 of the 16 ogres again, and it picks up the 11 gnolls instead. When I scrolled up, I grabbed the sliding button (did not use the up/down buttons on scrolled window widget).

    I step off again, and back on and try to pick up 15 of 16 ogres and am told they are too heavy. This time I scroll to the top of the ground view with the up arrow, and back down so the 16 ogres are in the second row. Unlike when I scrolled up using the sliding button, the bug does not recur, even after multiple attempts.

    I repeat the step off, step back, and use the sliding button... and the bug manifests itself. It appears the bug is related to use of the sliding button to scroll the ground view.

     
  • Kevin R. Bulgrien

    Prior experiment was on 32bit system. Change to 64bit system (without implying bug is related to architecture), bug is not immediately reproducible. Test was in character's apartment, with player inventory and apartment unchanged. Client window geometries were slightly different, and icon size set 100%. I wasn't very persistent.

    Went back to 32bit system and retried. Initially was a bit hard to reproduce, but eventually did after using the scroll wheel on the mouse to reposition the ground view. It looks like I have a repeatable situation though I do not yet fully understand what triggers the bug. Tired. Will have to work on this more later.

    Uploaded gdefaults2 and gtk-v2.pos as attachments in case window layout is relevant.

     
  • Kevin R. Bulgrien

    gdefaults2 in effect when bug observed.

     
  • Kevin R. Bulgrien

    gtk-v2.pos in use when bug observed/reproduced.

     
  • Mark Wedel

    Mark Wedel - 2010-11-18

    It might be interesting to add some debugging code to list_item_action() in gtk-v2/src/inventory.c to see what item is being selected.

    I suspect that the client is selecting the wrong item, and so the server is just acting on the data is receives.

    If there is some way to 100% reproduce this (whether that means making up a custom map), that would obviously be helpful. The code in inventory.c looks fairly straightforward to me:
    The entire list is redrawn whenever an item is added/removed.
    The lists use the pointer to the item to know what item is selected
    The code uses the normal gtk widgets to figure that out.

    I can't see any way really for the lists to get out of sync, so it may be the case that gtk is returning the incorrect item, or somehow the item pointer is messed up.

     
  • Kevin Zheng

    Kevin Zheng - 2013-08-30
    • summary: crossfire-client-gtk2 has get/take errors --> Wrong item selected when clicked on
     
  • Kevin Zheng

    Kevin Zheng - 2014-05-22

    This may be an unrelated issue, but when the client window is enlarged and then shrunk, the item icons are out of place and the wrong items are consistently selected.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks