#1 2017-11-03 23:37

101
Member
Registered: 2017-11-03
Posts: 22

Sometimes Shutter freezes if the action is close window

Sometimes Shutter freezes if the action is "close window". Then I have to kill the shutter process with the task manager, but then it happens always again after Shutter is restarted and this action should be done (or I want to add this action to a plan/preset). The only way to get it work again is to restart Windows (Win7SP1x64).

I have tried to add the shutter program folder to the exception list of my antivirus, but it doesn't make any difference.

Any Ideas?

Offline

#2 2017-11-04 14:46

101
Member
Registered: 2017-11-03
Posts: 22

Re: Sometimes Shutter freezes if the action is close window

Now I found a thread in this forum which describes the same problem, but I don't have hard- and software from Logitech and Windows don't show an error message when Shutter freezes: Shutter freezes when using Logitech SetPoint

Last edited by 101 (2017-11-04 15:05)

Offline

#3 2017-11-04 17:57

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Sometimes Shutter freezes if the action is close window

101 wrote:

Sometimes Shutter freezes if the action is "close window".

When exactly does this happen? When you are configuring an action, or when it is executing?

Can you provide a screenshot please?

Offline

#4 2017-11-05 00:52

101
Member
Registered: 2017-11-03
Posts: 22

Re: Sometimes Shutter freezes if the action is close window

Thank you very much for your reply.

I can not reproduce the problem. Sometimes it happens and sometimes not. Shutter is started from Windows task scheduler with an command line preset. The preset event is an countdown and the action is "close window" and "utilities: close application". I notice that Shutter is freezed, when it is staying in the tray after the countdown has expired. Then the Shutter tray tooltip shows "Time left: 00:00:01". It seems to work until 1 second before the action "close window" should be done.

When Shutter then is opened with double click on the tray icon, the event and action areas are blank (no response). There are also no responses via tray right click (no menu) and Shutters window menu. The only way to exit Shutter is to kill the process via task manager.

And the only way to get the action "close window" to work after the first freeze, is to restart the OS, maybe to restart the explorer.exe (I will try this the next time after it has happend).

Edit: I'm using Actual Window Manager from Actualtools, which is always looking for new windows. I use this to set the CPU priority and CPU affinity for the process of an opened window, make the window stay on top and start an application with an opened window with no issues. I have tried an exception in AWM for the shutter program folder but it doesn't make any difference for this problem.

Last edited by 101 (2017-11-05 03:11)

Offline

#5 2017-11-05 12:56

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Sometimes Shutter freezes if the action is close window

Do you use any wildcard characters in your Close Window action configuration? Such as *, ?, []

Which method do you have selected in the Close Window configuration?

Which version of Shutter are you using?

It would help if you could provide a screenshot of the rule configuration window and the main window.

Offline

#6 2017-11-05 18:17

101
Member
Registered: 2017-11-03
Posts: 22

Re: Sometimes Shutter freezes if the action is close window

den4b wrote:

Do you use any wildcard characters in your Close Window action configuration? Such as *, ?, []

Yes: * is used with all 3 "send CLOSE message" actions because the application which have to close uses tabs and from the asterisk on, the tab titles are different. The title of an tab is fixed not dynamically, but the application have to close if any tab is active. I use the "CLOSE message" because the application does save its data from the RAM to files on closing automatically.

den4b wrote:

Which method do you have selected in the Close Window configuration?

Only "send CLOSE message"

den4b wrote:

Which version of Shutter are you using?

3.8 (3.8.1 beta also tested)

Shutter_3_8_Actions.jpg

Last edited by 101 (2017-11-05 23:25)

Offline

#7 2017-11-06 17:06

101
Member
Registered: 2017-11-03
Posts: 22

Re: Sometimes Shutter freezes if the action is close window

Workaround with AutoIT scripts (compiled as standalone executables)

Opt("WinTitleMatchMode", 1) ;1=start, 2=subStr, 3=exact, 4=advanced, -1 to -4=Nocase
WinClose("window_title_beginning_from_the_left_no_wildcard_is needed")
Exit

Shutter_3_8_Actions_Workaround.jpg

Offline

#8 2017-11-07 18:36

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Sometimes Shutter freezes if the action is close window

The use of wildcards in the "Close Window" action requires Shutter to enumerate all active windows, in order to match their titles against the specified pattern. The enumeration procedure is performed through EnumWindows (Windows API function) and involves querying each window for its title. Unfortunately, some misbehaving applications can block this procedure indefinitely, as mentioned in Shutter freezes when using Logitech SetPoint.

If this is indeed what is causing your freezes, then we could try to isolate the application which blocks the enumeration procedure. The enumeration procedure is also executed when you trigger a dropdown menu in the "Close Window" action configuration. Can you confirm if the dropdown menu also causes Shutter to freeze?

You have mentioned that the freeze occurs only sometimes. Can you identify if it occurs when you lunch some particular applications?

I am surprised that AutoIt script doesn't freeze as well. Maybe it is using an alternative window enumeration method, or perhaps it just didn't encounter the problematic application/window yet.

Offline

#9 2017-11-07 23:36

101
Member
Registered: 2017-11-03
Posts: 22

Re: Sometimes Shutter freezes if the action is close window

den4b wrote:

The use of wildcards in the "Close Window" action requires Shutter to enumerate all active windows, in order to match their titles against the specified pattern. The enumeration procedure is performed through EnumWindows (Windows API function) and involves querying each window for its title. Unfortunately, some misbehaving applications can block this procedure indefinitely [...]

Hm, I think that autoit uses the same method. What I have understand is, that it also doesn't use window handles (HWNDs) (autoitscript.com/autoit3/docs/intro/windowsadvanced.htm). Maybe the wildcard is automatically set at the end when the WinTitleMatchMode is 1 and not 3.

den4b wrote:

If this is indeed what is causing your freezes, then we could try to isolate the application which blocks the enumeration procedure. The enumeration procedure is also executed when you trigger a dropdown menu in the "Close Window" action configuration. Can you confirm if the dropdown menu also causes Shutter to freeze?

Yes, if it has happened and I have killed the process and have started it again, it freezes again when any method is used to set the window title, also a klick on the dropdown arrow. I have to restart the OS to fix it until the next time. This indicates that something must be crashed while shutter has searched for the window title.

den4b wrote:

You have mentioned that the freeze occurs only sometimes. Can you identify if it occurs when you lunch some particular applications?

I cannot reproduce it if I want and have tried all windows that I typically use (browsers, mediaplayer, explorer, cmd, configuration windows of applications and tools and certainly the terminals. :-( I have an instance always running for testing this. Maybe any update has fixed the problem accidentally.

den4b wrote:

I am surprised that AutoIt script doesn't freeze as well. Maybe it is using an alternative window enumeration method, or perhaps it just didn't encounter the problematic application/window yet.

Certainly it can be a coincidence. Could it be an ANSI/unicode problem somewhere (window titles or the program code)?

Last edited by 101 (2017-11-08 10:02)

Offline

#10 2017-11-08 14:36

den4b
Administrator
From: den4b.com
Registered: 2006-04-06
Posts: 3,367

Re: Sometimes Shutter freezes if the action is close window

Please downloading this development utility:
https://www.den4b.com/download/shutter/ … indows.zip

It is a command line tool which tests several different window enumeration sequences.

Usage: TestEnumWindows.exe [action]
Actions:
  enum1 = IsWindowVisible & GetWindowLong & SendMessageA(WM_GETTEXT)
  enum2 = IsWindowVisible -> GetWindowLong -> SendMessageW(WM_GETTEXT)
  enum3 = IsWindowVisible -> GetWindowLong -> GetWindowTextW
  enum4 = IsWindowVisible -> GetWindowLong -> SendMessageTimeoutW(WM_GETTEXT)
  enum5 = IsWindowVisible -> GetWindowLong
  enum6 = IsWindowVisible

You need to get to a moment when Shutter begins to freeze, and then run this tool to test how each enumeration sequence performs.

You will need to run it from the command line, i.e. "TestEnumWindows.exe enum1", "TestEnumWindows.exe enum2", and so on.

Method "enum1" is what Shutter 3.8 is performing, which we expect to freeze. Other methods may work without freezing. The goal is to identify which methods will work without freezing. Please allow couple of minutes for each method before terminating it.

Offline

Board footer

Powered by FluxBB