digitalcreations / MaxTo

Public issue tracker for MaxTo
https://docs.maxto.net
76 stars 5 forks source link

Recipe Error after unlocking machine #300

Closed sytone closed 4 years ago

sytone commented 5 years ago

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:

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 commented 5 years ago

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

sytone commented 5 years ago

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 commented 5 years ago

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

sytone commented 5 years ago

No, still throws COM exception

vegardlarsen commented 5 years ago

@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 commented 5 years ago

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 commented 5 years ago

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

vegardlarsen commented 5 years ago

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.

s3w47m88 commented 5 years ago

I'm experiencing this issue as well. New user as of today. Running Windows 8.1 - when I type CMD + Alt + C (to center window) I get the popup in the bottom right with no explanation as to how to resolve. I am using a Samsung external TV as a monitor through full size HDMI port on a Razer Blade 2014

vegardlarsen commented 5 years ago

@s3w47m88 Does this also happen after editing the config.json file and changing window and monitor to null instead of ""?

vegardlarsen commented 4 years ago

Closing due to lack of feedback.