Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Window" selection in ingredient randomly changing #639

Closed
manuelhuber opened this issue Oct 31, 2020 · 5 comments
Closed

"Window" selection in ingredient randomly changing #639

manuelhuber opened this issue Oct 31, 2020 · 5 comments
Assignees
Labels
bug Confirmed bug in MaxTo.
Milestone

Comments

@manuelhuber
Copy link

manuelhuber commented Oct 31, 2020

Describe the bug
The settings of my ingredient keep changing randomly, sometimes when I execute the recipe, sometimes when I leave the recipe menu and come back and sometimes just while switching from one ingredient to another within the same recipe. I've mainly observed this issues with the "window" setting where it will go from "Search for Window" to "Foreground Window" or to not selection at all. The json of the recipe is also updated - so it's not just a display bug, the actual recipe changes.

Video
In the video I regularly click outside of MaxTo - I'm just refreshing Notepad++ to see how the recipe in the config.json looks (unfortunately it didn't record that). The config.json regularly updates though sometimes it is out of sync with what's displayed but it does change the ingredients in the json by itself. When you see the loading spinner around the mouse I'm executing the recipe.
https://www.youtube.com/watch?v=VZGbpGbZn1k

System information:

  • Windows version: Windows 10, Version 1903
  • MaxTo version: 2.1.0

Additional context
My logs (there's a whole bunch of exceptions in there - I've been having trouble with MaxTo all day)
maxto20201031.log
My config (as .txt since json isn't allowed):
config.txt

This is the ingredient:

{
      "name": "_LoadLeftMonitor",
      "hotkey": null,
      "triggers": [
        {
          "type": "keyboard:hotkey",
          "Hotkey": "Windows+NumPad0"
        },
        {
          "type": "monitor:connected",
          "Monitor": "L5LMQS024838"
        }
      ],
      "ingredients": [
        {
          "command": "uncategorized:launch",
          "parameters": {
            "executable": "%LOCALAPPDATA%\\WhatsApp\\WhatsApp.exe",
            "waitforinputidle": true,
            "bringtofront": true,
            "waitforwindow": "\\\\\\"
          }
        },
        {
          "command": "uncategorized:launch",
          "parameters": {
            "executable": "%APPDATA%\\Spotify\\Spotify.exe",
            "waitforinputidle": true,
            "waitforwindow": "\\\\\\"
          }
        },
        {
          "command": "uncategorized:launch",
          "parameters": {
            "executable": "%LOCALAPPDATA%\\Discord\\Update.exe",
            "arguments": "--processStart Discord.exe",
            "waitforinputidle": true,
            "waitforwindow": "\\\\\\"
          }
        },
        {
          "command": "window:move",
          "parameters": {
            "window": "\\\\\\*Spotify*",
            "monitor": "L5LMQS024838",
            "region": "top left",
            "virtualdesktop": null
          }
        },
        {
          "command": "window:move",
          "parameters": {
            "window": "\\\\\\WhatsApp",
            "monitor": "L5LMQS024838",
            "region": "bottom left"
          }
        },
        {
          "command": "window:move",
          "parameters": {
            "window": "\\\\\\* - Discord",
            "monitor": "L5LMQS024838",
            "region": "center"
          }
        }
      ]
    }
}
@vegardlarsen vegardlarsen self-assigned this Nov 1, 2020
@vegardlarsen vegardlarsen added the bug Confirmed bug in MaxTo. label Nov 1, 2020
@vegardlarsen
Copy link
Member

Thank you for the detailed report. I will be looking at this this coming week.

My hunch is that this saves correctly if you check "Search for window" and ensure your details are filled in before pressing "Save changes", and whenever you open a page and immediately hit "Save changes" when neither of the radio buttons are checked, it will save the incorrect value.

@manuelhuber
Copy link
Author

manuelhuber commented Nov 1, 2020

whenever you open a page and immediately hit "Save changes" when neither of the radio buttons are checked, it will save the incorrect value.

When you look at the video at the very start I go through all 3 ingredients. Each one has a value selected when I press save. Later on, when I switch back to an ingredient it will sometimes have no value selected (which I don't understand - why is it changing without my input?) but then I still select an option before pressing save.
In those cases where all of a sudden nothing is selected, the json of the ingredient will be "window": null

@manuelhuber
Copy link
Author

manuelhuber commented Nov 1, 2020

I think I've pinpointed the issue a bit more! I can now consistently reproduce the issue!

Steps:

  1. Open _LoadLeftMonitor recipe
  2. Click on one of the three "move" ingredients
  3. The first one you click will have the "Search Window" selected (as expected)
  4. The second one you click will have nothing selected (doesn't matter which ingredient!) <- Unexpected behavior
  5. Clicking back and forth between the ingredients causes seemingly random behavior where they have either "Search", "Foreground" or nothing selected <- Unexpected behavior

Made a new video:
https://youtu.be/d7vaySIO7ow

This is the state that's on disk:
2020-11-01 12_51_26-C__Users_nelo1_AppData_Roaming_MaxTo_config json - Notepad++

Clicking on one "move" ingredient and then another will cause it to have nothing selected:
2020-11-01 12_51_39-C__Users_nelo1_AppData_Roaming_MaxTo_config json - Notepad++

If I press back it tells me I have made changes:
2020-11-01 12_51_57-C__Users_nelo1_AppData_Roaming_MaxTo_config json - Notepad++

@vegardlarsen vegardlarsen added this to the 2.1.1 milestone Nov 3, 2020
@vegardlarsen
Copy link
Member

I've been debugging this specific issue for 4 hours now, and I can easily reproduce it. The corruption happens when you switch back to an ingredient that has been displayed before, if any other ingredient that has a Window argument has been selected in the mean-time.

However, I am having a much harder time actually figuring out why it changes.

@vegardlarsen
Copy link
Member

vegardlarsen commented Nov 12, 2020

As I haven't been able to solve this issue, I've decided to avoid it by removing the radio buttons (which were the cause of the issue). The new UI isn't as intuitive, but at least it works consistently.

image

Will be in 2.1.1.

Edit: English

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Confirmed bug in MaxTo.
Projects
None yet
Development

No branches or pull requests

2 participants