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

Recipe Error after unlocking machine #300

Open
sytone opened this Issue Dec 6, 2018 · 8 comments

Comments

Projects
None yet
2 participants
@sytone
Copy link

sytone commented Dec 6, 2018

Describe the bug
After unlocking my machine I get the error below, restarting MaxTo enables the recipe to work again. This has only recently started happening. Happens for all apps.

To Reproduce
Steps to reproduce the behavior:

  1. Pres Win + Num6,4,etc

Expected behavior
App to move between windows

Screenshots
image

System information:

  • Windows version: 10-1803
  • MaxTo version 2.0.0-beta3

Additional context
Please collect and attach log files that may be relevant, but cut them down for brevity. For MaxTo crashes, please see %AppData%\MaxTo\maxto.log. For installer issues, please see %LocalAppData%\SquirrelTemp\SquirrelSetup.log

2018-12-06 08:20:59 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.ViewModels.NotificationIconViewModel"
2018-12-06 08:21:05 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 08:21:05 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:21:05 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 08:21:05 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:21:09 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 08:21:09 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:21:09 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 08:21:09 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:21:13 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 08:21:13 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:21:16 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 08:21:16 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:21:18 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 08:21:18 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:23:40 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 08:23:40 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 08:23:40 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:23:40 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 08:27:18 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 08:27:18 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 09:30:26 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"ResetWindowScript"' with 1 ingredients
2018-12-06 09:30:26 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 09:30:29 [MaxTo@2.0.0.346] [Information] Logger setup (online logging: True, process #39980)
2018-12-06 09:30:29 [MaxTo@2.0.0.346] [Information] Found no specified configuration location file, using default settings location "C:\Users\REDACTED\AppData\Roaming\MaxTo"
2018-12-06 09:30:30 [MaxTo@2.0.0.346] [Information] Logger setup (online logging: True, process #52568)
2018-12-06 09:30:30 [MaxTo@2.0.0.346] [Information] Found no specified configuration location file, using default settings location "C:\Users\REDACTED\AppData\Roaming\MaxTo"
2018-12-06 09:31:28 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 09:31:28 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 09:31:31 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 09:31:31 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 09:31:32 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 09:31:32 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 09:31:35 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 09:31:35 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 09:44:45 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"ResetWindowScript"' with 1 ingredients
2018-12-06 09:44:45 [MaxTo.Core@2.0.0.346] [Information] Recipe '1' executed successfully
2018-12-06 09:44:48 [MaxTo@2.0.0.346] [Information] Logger setup (online logging: True, process #84704)
2018-12-06 09:44:48 [MaxTo@2.0.0.346] [Information] Found no specified configuration location file, using default settings location "C:\Users\REDACTED\AppData\Roaming\MaxTo"
2018-12-06 09:44:49 [MaxTo@2.0.0.346] [Information] Logger setup (online logging: True, process #69144)
2018-12-06 09:44:49 [MaxTo@2.0.0.346] [Information] Found no specified configuration location file, using default settings location "C:\Users\REDACTED\AppData\Roaming\MaxTo"
2018-12-06 09:44:53 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 09:44:53 [MaxTo.Core@2.0.0.346] [Warning] Received exception from command request 1 while executing '"Move window right"'. Aborting.
System.ArgumentException: Could not find monitor matching 
   at MaxTo.Core.Commands.Window.MoveCommand.<Execute>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MaxTo.Core.Commands.CommandExecutor.<Execute>d__3`2.MoveNext()
2018-12-06 09:44:54 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 09:44:54 [MaxTo.Core@2.0.0.346] [Warning] Received exception from command request 1 while executing '"Move window left"'. Aborting.
System.ArgumentException: Could not find monitor matching 
   at MaxTo.Core.Commands.Window.MoveCommand.<Execute>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MaxTo.Core.Commands.CommandExecutor.<Execute>d__3`2.MoveNext()
2018-12-06 09:44:54 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 09:44:54 [MaxTo.Core@2.0.0.346] [Warning] Received exception from command request 1 while executing '"Move window right"'. Aborting.
System.ArgumentException: Could not find monitor matching 
   at MaxTo.Core.Commands.Window.MoveCommand.<Execute>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MaxTo.Core.Commands.CommandExecutor.<Execute>d__3`2.MoveNext()
2018-12-06 09:44:55 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 09:44:55 [MaxTo.Core@2.0.0.346] [Warning] Received exception from command request 1 while executing '"Move window left"'. Aborting.
System.ArgumentException: Could not find monitor matching 
   at MaxTo.Core.Commands.Window.MoveCommand.<Execute>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MaxTo.Core.Commands.CommandExecutor.<Execute>d__3`2.MoveNext()
2018-12-06 09:44:55 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window right"' with 1 ingredients
2018-12-06 09:44:55 [MaxTo.Core@2.0.0.346] [Warning] Received exception from command request 1 while executing '"Move window right"'. Aborting.
System.ArgumentException: Could not find monitor matching 
   at MaxTo.Core.Commands.Window.MoveCommand.<Execute>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MaxTo.Core.Commands.CommandExecutor.<Execute>d__3`2.MoveNext()
2018-12-06 09:45:07 [MaxTo.UI@2.0.0.346] [Information] Found 2 screens.
2018-12-06 09:46:37 [MaxTo.UI@2.0.0.346] [Information] Found 2 screens.
2018-12-06 09:47:15 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.Components.Settings.SettingsViewModel"
2018-12-06 09:47:15 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.Components.Settings.Language.LanguageViewModel"
2018-12-06 09:47:17 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.Language.LanguageViewModel". Closed: False
2018-12-06 09:47:17 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.Components.Settings.About.AboutViewModel"
2018-12-06 09:47:20 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.Language.LanguageViewModel". Closed: True
2018-12-06 09:47:20 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.About.AboutViewModel". Closed: True
2018-12-06 09:47:20 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.SettingsViewModel". Closed: True
2018-12-06 09:47:30 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.Components.Settings.About.AboutViewModel"
2018-12-06 09:47:30 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.About.AboutViewModel". Closed: False
2018-12-06 09:47:30 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.Components.Settings.SettingsViewModel"
2018-12-06 09:47:30 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.Components.Settings.Language.LanguageViewModel"
2018-12-06 09:47:32 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.Language.LanguageViewModel". Closed: False
2018-12-06 09:47:32 [MaxTo.UI@2.0.0.346] [Information] Activated "MaxTo.UI.Components.Settings.About.AboutViewModel"
2018-12-06 09:47:33 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.Language.LanguageViewModel". Closed: True
2018-12-06 09:47:33 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.About.AboutViewModel". Closed: True
2018-12-06 09:47:33 [MaxTo.UI@2.0.0.346] [Information] Deactivated "MaxTo.UI.Components.Settings.SettingsViewModel". Closed: True
2018-12-06 09:47:58 [MaxTo.Core@2.0.0.346] [Information] Executing recipe '"Move window left"' with 1 ingredients
2018-12-06 09:47:58 [MaxTo.Core@2.0.0.346] [Warning] Received exception from command request 1 while executing '"Move window left"'. Aborting.
@vegardlarsen

This comment has been minimized.

Copy link
Member

vegardlarsen commented Dec 6, 2018

This could very well be a bug. Could you please get me the contents of %AppData%\MaxTo\config.json as well?

@sytone

This comment has been minimized.

Copy link
Author

sytone commented Dec 14, 2018

Yep.

{
  "$schema": "https://maxto.net/config.schema.json",
  "language": null,
  "startup": {
    "startOnLogon": true,
    "runElevated": false
  },
  "updates": {
    "enabled": true,
    "channel": "Beta"
  },
  "behavior": {
    "snap": {
      "to": [
        "Window",
        "Region",
        "Screen"
      ],
      "distance": 10
    },
    "transparentWindowsWhenMoving": true
  },
  "shims": {
    "toggled": {}
  },
  "license": {
    "firstStart": "2018-12-05T18:35:39.3635097Z"
  },
  "recipes": [
    {
      "name": "Move window left",
      "hotkey": "Windows+NumPad4",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Left"
          }
        }
      ]
    },
    {
      "name": "Move window up",
      "hotkey": "Windows+NumPad8",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Up"
          }
        }
      ]
    },
    {
      "name": "Move window right",
      "hotkey": "Windows+NumPad6",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Right"
          }
        }
      ]
    },
    {
      "name": "Move window down",
      "hotkey": "Windows+NumPad2",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Down"
          }
        }
      ]
    },
    {
      "name": "Swap window left",
      "hotkey": "Windows+Control+NumPad4",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Left",
            "swap": true
          }
        }
      ]
    },
    {
      "name": "Swap window up",
      "hotkey": "Windows+Control+NumPad8",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Up",
            "swap": true
          }
        }
      ]
    },
    {
      "name": "Swap window right",
      "hotkey": "Windows+Control+NumPad6",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Right",
            "swap": true
          }
        }
      ]
    },
    {
      "name": "Swap window down",
      "hotkey": "Windows+Control+NumPad2",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "direction": "Down",
            "swap": true
          }
        }
      ]
    },
    {
      "name": "Center window",
      "hotkey": "Windows+NumPad5",
      "ingredients": [
        {
          "command": "window:center",
          "parameters": {}
        }
      ]
    },
    {
      "name": "VDMove",
      "hotkey": "Windows+Divide",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "window": "",
            "monitor": "",
            "virtualDesktop": 0
          }
        }
      ]
    },
    {
      "name": "VDMoveOne",
      "hotkey": "Windows+Multiply",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "window": "",
            "monitor": "",
            "virtualDesktop": 1
          }
        }
      ]
    },
    {
      "name": "ResetWindowScript",
      "hotkey": "Windows+NumPad0",
      "ingredients": [
        {
          "command": "uncategorized:launch",
          "parameters": {
            "executable": "C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\powershell.exe",
            "arguments": "-NoProfile -File C:\\Users\\REDACTED\\OneDrive\\scripts\\powershell\\CoreFunctions\\setupmaxto.ps1"
          }
        }
      ]
    }
  ],
  "monitor": {
    "idSelection": "SerialNumber",
    "virtualDesktop": true
  },
  "errorReporting": {
    "anonymityLevel": "MachineIdentifier",
    "enabled": true
  },
  "presets": [
    {
      "type": "split",
      "splits": {
        "orientation": "Vertical",
        "distance": 0.5,
        "child1": null,
        "child2": null
      },
      "name": "Two-way vertical"
    },
    {
      "type": "split",
      "splits": {
        "orientation": "Horizontal",
        "distance": 0.5,
        "child1": null,
        "child2": null
      },
      "name": "Two-way horizontal"
    },
    {
      "type": "split",
      "splits": {
        "orientation": "Horizontal",
        "distance": 0.25014543339150669,
        "child1": null,
        "child2": {
          "orientation": "Horizontal",
          "distance": 0.75005498786869174,
          "child1": null,
          "child2": null
        }
      },
      "name": "VD0-Default"
    },
    {
      "type": "split",
      "splits": {
        "orientation": "Horizontal",
        "distance": 0.33304246655031983,
        "child1": null,
        "child2": null
      },
      "name": "VD1-Default"
    }
  ]
}
@vegardlarsen

This comment has been minimized.

Copy link
Member

vegardlarsen commented Dec 14, 2018

If you delete the lines saying "window": "", and "monitor": "" (I saw two instances of each), does it work then?

@sytone

This comment has been minimized.

Copy link
Author

sytone commented Jan 17, 2019

No, still throws COM exception

@vegardlarsen

This comment has been minimized.

Copy link
Member

vegardlarsen commented Jan 18, 2019

@sytone I cannot see a COM Exception in the logs above. Can you be a bit more specific? Is this still an issue in beta 7?

@sytone

This comment has been minimized.

Copy link
Author

sytone commented Jan 18, 2019

Updated to 7 and most command seem to be working. Still get a error on the command to move active window between desktops. I just want a keyboard combo to send the active window to a specific desktop so noting set but the desktop number.

It keeps on injecting the empty values back into the config.

2019-01-18 08:20:54 [MaxTo.Core@2.0.0.392] [Information] Executing recipe '"VDMoveOne"' with 1 ingredients
2019-01-18 08:20:54 [MaxTo.Core@2.0.0.392] [Warning] Received exception from command request 1 while executing '"VDMoveOne"'. Aborting.
System.NullReferenceException: Object reference not set to an instance of an object.
   at WindowsDesktop.VirtualDesktopHelper.MoveToDesktop(IntPtr hWnd, VirtualDesktop virtualDesktop)
   at MaxTo.Core.Commands.Window.MoveCommand.<Execute>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at MaxTo.Core.Commands.CommandExecutor.<Execute>d__3`2.MoveNext()

Recipie

{
      "name": "VDMoveOne",
      "hotkey": "Windows+Multiply",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "virtualDesktop": 1,
            "window": "",
            "monitor": ""
          }
        }
      ]
    },
    {
      "name": "VDMove",
      "hotkey": "Windows+Divide",
      "ingredients": [
        {
          "command": "window:move",
          "parameters": {
            "virtualDesktop": 0,
            "window": "",
            "monitor": ""
          }
        }
      ]
    }
@vegardlarsen

This comment has been minimized.

Copy link
Member

vegardlarsen commented Jan 22, 2019

@sytone If you manually delete the window and monitor lines, does it start to work then?

@vegardlarsen

This comment has been minimized.

Copy link
Member

vegardlarsen commented Jan 22, 2019

I have made a fix that stops the changes made in the user interface from outputting these empty string lines. Instead the value will be set to null, which MaxTo interprets correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment