Menu

#652 Inventory item prints to console instead of chat buffer

Devel
closed-fixed
GTK (115)
5
2004-11-03
2004-05-29
a_ruse
No

I'm playing on RedHat 9 with 0.0.7E6F2, using GTK.

If try to eat something and I only have one or two
types of food in my inventory, I can press "?" to get a
list of the available options. This list is printed to
the linux console instead of the GTK chat buffer. The
bug also occurs with any inventory choice where I have
only one or two possible items to choose from.

Discussion

  • J. Ali Harlow

    J. Ali Harlow - 2004-05-29
    • milestone: --> Devel
     
  • J. Ali Harlow

    J. Ali Harlow - 2004-06-12
    • assigned_to: nobody --> j_ali
     
  • J. Ali Harlow

    J. Ali Harlow - 2004-08-07

    Logged In: YES
    user_id=64456

    There is an intended different behaviour depending on
    whether you have just one or two choices or a longer list.
    In the first case the choices are simply written to the
    message are (top left area in the GTK interface). In the
    second case a dialog is displayed. However it sounds as
    though you are seeing some very strange behaviour. Can you
    confirm that you do get a dialog when there are more choices
    available and also confirm that by "linux console" you mean
    the gnome-terminal or whatever that you started slashem up
    from. I don't seem to have any problems here.

     
  • a_ruse

    a_ruse - 2004-09-14

    Logged In: YES
    user_id=1052316

    Yes, I do get a dialog when there are more choices available
    via a GTK window. Yes, sorry, by "linux console" I mean the
    terminal from which I started slashem. I use gnome-terminal.

    To be clear, whenever I'm asked question that requires an
    answer in the form of an inventory item, I can press "?" to
    get a list of inventory items. If the list is only one or
    two items, it gets printed to my terminal instead of the top
    left area in the GTK interface.

     
  • J. Ali Harlow

    J. Ali Harlow - 2004-09-14

    Logged In: YES
    user_id=64456

    How bizarre.

    gtkhack's implementation of message_menu (which is used for
    these cases) can output to standard output (which will go to
    the gnome-terminal which started it) if the GTK interface is
    not initialized, but I can't see how that can happen.

    Casting about for ideas, I guess one possibility is that the
    variable which remembers whether the GTK interface is
    initialized or not could have got corrupted. If that were
    the case then I would expect that it would work as normal
    when you first start a game but stop working after a while
    when the corruption occurs. Might this be the case?

     
  • a_ruse

    a_ruse - 2004-09-14

    Logged In: YES
    user_id=1052316

    It's not the case. I just started a new barbarian, pressed
    "e" to eat, and then "?". I look at my terminal window and
    see this:

    $ /usr/local/bin/slashem
    d - 2 uncursed food rations {40}.

    I tried a couple tests with redirecting output and found
    that it's getting printed to stderr, not stdout.

     
  • a_ruse

    a_ruse - 2004-09-14

    Logged In: YES
    user_id=1052316

    It's not the case. I just started a new barbarian, pressed
    "e" to eat, and then "?". I look at my terminal window and
    see this:

    $ /usr/local/bin/slashem
    d - 2 uncursed food rations {40}.

    I tried a couple tests with redirecting output and found
    that it's getting printed to stderr, not stdout.

     
  • J. Ali Harlow

    J. Ali Harlow - 2004-11-03
    • status: open --> closed-fixed
     
  • J. Ali Harlow

    J. Ali Harlow - 2004-11-03

    Logged In: YES
    user_id=64456

    Found the problem. It only occurs when you build GTK as a
    proxified window interface. In this case slashem forks and
    therefore has two copies of the global variables. The
    problem was that two of these variables
    (iflags.window_inited and WIN_MESSAGE) where being used by
    the interface process but only set in the game process. I
    have fixed this by making sure that they are set in both
    processes.

     

Log in to post a comment.

MongoDB Logo MongoDB