1. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  2. The Aftermath has been revealed for the 19th Terraining Contest! Be sure to check out the Results and see what came out of it.
    Dismiss Notice
  3. Melee Mapping Contest #3 - Results are out! Congratulate the winners and check plenty of new 4v4 melee maps designed for this competition!
    Dismiss Notice
  4. The winners of our cinematic soundtrack competition have been decided! Step by the Music Contest #11 - Results to check the entries and congratulate the winners!
    Dismiss Notice

Dialog and Alt+F4 display bug

Discussion in 'The Lab' started by Prometheus3375, Jan 12, 2019.

  1. Prometheus3375

    Prometheus3375

    Joined:
    Jul 20, 2018
    Messages:
    31
    Resources:
    0
    Resources:
    0
    In my map in multiplayer the first button of any dialog displays the time for selection an option. If the option is not selected and time is out, the first option is applied. After that the dialog is hidden and cleared.
    And I got a little problem with timed dialogs.

    Player presses Alt+F4 during displaying of my dialog. Now he see the exit dialog. Meantime, the time of my dialog is out, it is hidden and cleared. Player decides to continue playing and clicks Cancel, and for some reason my dialog is displayed! Since it has been cleared, it is empty, and player cannot do anything.
    The video of this issue is below.



    I created a test map for this bug, you can download it here.
    The video on test map.



    Such issue is occurring at least on 1.26a version. I will really appreciate if someone will test it in the latest patch. If it takes place in the latest patch, It must be reported to Blizzard. The official forum of WC3.
     

    Attached Files:

  2. Prometheus3375

    Prometheus3375

    Joined:
    Jul 20, 2018
    Messages:
    31
    Resources:
    0
    Resources:
    0
    I asked Meddin from XGM site to test this on the latest patch since he uses it. He approved that the bug is still in presence on the latest path, so it must be fixed.
    Unfortunately, he cannot share the video with me because now he is in the countryside and will not return to town in the nearest future.

    UPD: made post on the official forum.
     
    Last edited: Jan 14, 2019
  3. Dr Super Good

    Dr Super Good

    Spell Reviewer

    Joined:
    Jan 18, 2005
    Messages:
    25,030
    Resources:
    3
    Maps:
    1
    Spells:
    2
    Resources:
    3
    It is worth pointing out this is only a problem in multiplayer. The map cannot be tested single player as Warcraft III is paused in single player while a dialog is displayed.

    Have you tried destroying the dialog (not just hiding it) when the timer expires by using...
    Code (vJASS):
    native DialogDestroy takes dialog whichDialog returns nothing

    The bug likely is due to the hide dialog action being ignored due to the alt+F4 dialog being open. As such an empty dialog is being shown when the alt+F4 dialog is closed and the original dialog is restored. By destroying the dialog it should have nothing to return to after closing the alt+F4 dialog and hence put the user back into game play, at least in theory.
     
  4. Prometheus3375

    Prometheus3375

    Joined:
    Jul 20, 2018
    Messages:
    31
    Resources:
    0
    Resources:
    0
    Absolutely right, that's why I tested it solo in LAN, not in singleplayer custom game.
    This tend me to check if this issue takes place when any new dialog is displayed above, not only Alt+F4 dialog. Test map.
    Type 'show' in multiplayer. At first, the 1st dialog will be shown, after 2 secs the 2nd one. Now you see the 2nd dialog and after 3 secs the 1st will be hidden (you cannot notice it). After 2 secs the 2nd dialog will be hidden, and the 1st is not shown.
    The result: the issue takes place only with the exit dialog.
    I my case original dialog is empty, because I'm clearing it when hiding. If dialog is not cleared, all buttons will be in place.
    You are right, original dialog is not restored if it was destroyed, but then you will get unplayable game: player can do absolutely nothing. Test map.

     

    Attached Files:

  5. Halo7568

    Halo7568

    Joined:
    Jun 16, 2004
    Messages:
    108
    Resources:
    0
    Resources:
    0
    I suspect that you can fix the "player can do absolutely nothing" issue by enabling user control on the player. I am aware of some other dialog box issues that existed in the past, noted here: Dialog buttons and user control issues - Wc3C.net

    Not sure if everything in that post is still relevant, but it is probably still the case that keeping a dialog box around (hidden) instead of deleting it still poses a risk if some hacker decides to get a little creative.
     
  6. Prometheus3375

    Prometheus3375

    Joined:
    Jul 20, 2018
    Messages:
    31
    Resources:
    0
    Resources:
    0
    Wow, this actually helped. Thank you.
    Moreover, enabling user control hides all dialogs (custom, exit and menu).
    Test map with enabling user control.
    I found interesting thing in singleplayer: pressing Cancel in the exit dialog unpauses the game, so my dialog hides after 5 seconds.
     

    Attached Files: