Problem after resuming from sleep

x64 Replacement/Alternative to Microsoft's IntelliMouse application.
Forum rules
Please read the forum rules before posting for the first time.
The more information you can provide, the quicker and more accurately someone can help.
NOTE: To reduce spam, new users can not post links or images until they have at least 4 posts.
piyo
Member
Posts: 20
Joined: Wed Jul 31, 2013 6:58 am

Problem after resuming from sleep

Post by piyo »

OS: Windows 8 Pro x64
Language: Japanese(primary), English(secondary)
XMBC Version: 2.6 Beta 6 and Beta 7

Problem:
I cannot use Japanese IME and cannot input Japanese character after resuming from sleep mode.
So, I tried to switch language. But even though I select either Japanese or English, it changed to English keyboard. I cannot switch back to Japanese.

I'm using XMBC for almost 1 year, and I didn't have any language problem or any hook problem until 2.6 Beta 5.
But 2.6 Beta 6 and Beta 7 have this problem.

I already reverted to 2.6 Beta 5. It is working nicely without any problem.
Version 2.6 Beta 6
#177 - Fixed a bug where the hook failed after resuming from sleep/hibernation
(by reinstalling the hook when this happends).
Hmm, is there any chance to choose old hook behavior as an option for future release version ?
Thank you.

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

The resume from sleep bug simply re-installs the hook. Nothing different compared to startup - which is odd.
There was a language issue too, where XMBC attempted to use and load US English, which caused US English to be installed if it was not there. The change was to make XMBC only load the English language if it existed (US or UK). This is required to send certain simulated input.

Neither of these really explain your bug, so I will have to have a look at the code and try and figure out what is happening. What would be really useful would be the log file (it may need debug logging enabled prior to sleeping) from beta 6 or 7. Any chance you can get that for me (I guess it might mean upgrading to beta 6 or 7 temporarily)?

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

piyo
Member
Posts: 20
Joined: Wed Jul 31, 2013 6:58 am

Re: Problem after resuming from sleep

Post by piyo »

Thank you for your reply.

Which part of log do you need ?
This is a part of log which I took before uninstall beta 7.

If this is not enough, please tell me.
I will reinstall beta 7 again.
Thank you.

At start:

Code: Select all

28-07-2013 23:58:47.0937> X-Mouse Button Control v2.6 Beta 7 (x64) Startup. Commandline '/notportable '
28-07-2013 23:58:47.0375> X-Mouse Button Control is not running using an administrative account (UAC elevation)
28-07-2013 23:58:47.0375> Running on Microsoft Windows 8  (build 9200), 64-bit, Hook Timeout: 5000 ms
28-07-2013 23:58:47.0375> Hooking the mouse...
28-07-2013 23:58:47.0375> Successfully hooked into the mouse messages.
28-07-2013 23:58:47.0390> HookThread: Successfully set the mouse hook 0x10141
28-07-2013 23:58:47.0390> HookThread: Successfully set the keyboard hook 0x10143
28-07-2013 23:58:47.0500> Successfully created the main message window.
29-07-2013 00:10:14.0218> CMyMessageWnd::OnSetup   -   Clear hotkeys...
29-07-2013 00:10:14.0218> CMyMessageWnd::OnSetup   -   Opening setup dialog.
29-07-2013 00:10:38.0718> Applying changes to X-Mouse Button Control settings...
29-07-2013 00:10:38.0750> Enabling extra debug logging.
29-07-2013 00:10:38.0781> HookDLL: Load Settings took 31ms
At resume:

Code: Select all

29-07-2013 00:55:05.0406> Detected resume from a low-power state. Reinstalling mouse hook...
29-07-2013 00:55:10.0796> Hook thread exited with result 1
29-07-2013 00:55:10.0843> RemoveMouseHook took 62ms
29-07-2013 00:55:10.0859> HookDLL: Load Settings took 16ms
29-07-2013 00:55:10.0859> Current language is 04110411
29-07-2013 00:55:10.0859> HookThread: Successfully set the mouse hook 0x9107DF
29-07-2013 00:55:10.0859> HookThread: Successfully set the keyboard hook 0x16D09AB
29-07-2013 00:55:10.0125> Result of Set Wheel Scrolling 3 lines = 1
29-07-2013 00:55:11.0671> Found profile for window 'oedit.exe', 'OGAWA_EditCtrl', 'AfxFrameOrView42su' [method 1] but it was disabled.
29-07-2013 00:55:18.0625> MouseHookData: Message=0x0201 (WM_LBUTTONDOWN), X=971, Y=463, mouseData=0x00000000, flags=0x00000000, time=3502625, dwExtraInfo=0x0, MouseHookPtr=0x9107DF
29-07-2013 00:55:18.0625> Translating Left Button Down Keystate 0x0: Action 40 [** No Change (Don't intercept) **]
29-07-2013 00:55:19.0750> MouseHookData: Message=0x0202 (WM_LBUTTONUP), X=971, Y=463, mouseData=0x00000000, flags=0x00000000, time=3502750, dwExtraInfo=0x0, MouseHookPtr=0x9107DF
29-07-2013 00:55:19.0750> Translating Left Button Up Keystate 0x1: Action 40 [** No Change (Don't intercept) **]
29-07-2013 00:55:27.0406> Detected resume from a low-power state. Reinstalling mouse hook...
29-07-2013 00:55:31.0718> Hook thread exited with result 1
29-07-2013 00:55:31.0734> RemoveMouseHook took 16ms
29-07-2013 00:55:31.0750> HookDLL: Load Settings took 16ms
29-07-2013 00:55:31.0750> Current language is 04110411
29-07-2013 00:55:31.0750> HookThread: Successfully set the mouse hook 0x7A30C13
29-07-2013 00:55:31.0750> HookThread: Successfully set the keyboard hook 0x65808BF
29-07-2013 00:55:31.0812> Found profile for window 'oedit.exe', 'OGAWA_EditCtrl', 'AfxFrameOrView42su' [method 1] but it was disabled.
29-07-2013 00:55:31.0015> Result of Set Wheel Scrolling 3 lines = 1

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

That might be enough, I will need to study that along with the code. I'm busy this weekend so it will have to wait at least until next week. If I need more (debug) logging, I'll get back to you when I get a chance to look at it.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

piyo
Member
Posts: 20
Joined: Wed Jul 31, 2013 6:58 am

Re: Problem after resuming from sleep

Post by piyo »

piyo wrote:OS: Windows 8 Pro x64
Hmm, is there any chance to choose old hook behavior as an option for future release version ?
Thank you.
Was this rejected ? :(
Thanks.

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

What do you mean?
I have not rejected anything. I still dont understand what is causing your problem. Im not changing the hook behaviour because that is nothing to do with your problem. If anything your problem is related to the language change I mentioned.

The code than reinstalls the mouse hook will have no direct effect at all on this. It may be that it also changes the language at the same time - that I will have to look at some more. As to what is causing your problem, its difficult because its not easy for me to reproduce. I will have some more attempts (and I will add this to my bug tracker which I it seems I forgot to do :))

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

piyo
Member
Posts: 20
Joined: Wed Jul 31, 2013 6:58 am

Re: Problem after resuming from sleep

Post by piyo »

Thank you for your reply.
I apologize that it is hard for me to explain in English.

Well, language will not change, it is still Japanese after resuming. But IME text service will be killed, terminated or crashed, and I cannot input Japanese.
I know it is hard for you to solve this problem, and I think it never be solved.
I don't want you to waste your limited time for this, so I proposed to add an option instead.

The fact is versions from 2.5 to 2.6 Beta 5 work well, but Beta 6 and Beta 7 don't work. Only you know the difference and you already know the solution.
I don't even need GUI for this option, I can edit the setting file by hand.
For example, adding an option like as <ReInstall Disable="True">, and when resuming from sleep, if this flag is true, use old process, else use new process.

But this is your project, if you don't want to add such an option, it's ok.
I will continue using 2.6 Beta 5 as far as it works on future version of OS.

Anyway thank you.

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

I have been trying to reproduce this one today, but have failed so far!
I installed Japanese language and set it, then I made my PC sleep and resumed.
It still worked, I can still type Japanese characters in using the keyboard so I'm confused.

I have added a little more debugging, but can you tell me, what other (English) languages do you have installed? US English, UK English or others?

I will add a "do no reinstall hook option for you in the config file also, and then you can test it all (the new debug and this new flag) in Beta 9. I will try and get that out today and let you know what the flag is called (as you say I wont bother adding it to the GUI for now).,

But the code that runs when resuming from sleep, is exactly the same as when starting up so I dont really see how it can be any different.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

Aha... I think I might know whats going on. I have made a few changes (including the disable reinstall option IF my fixes don't work).

I would like you to test Beta 9 (which Im just about to make public) and tell me first, if it works properly again now, and if it does not, I will give you the information on the entry to add to the config file to disable the re-install so we can test that.

I hope it will work without having to disable the reinstall of the hook.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

piyo
Member
Posts: 20
Joined: Wed Jul 31, 2013 6:58 am

Re: Problem after resuming from sleep

Post by piyo »

Thank you very much.
I appreciate all your support and work.

I installed Beta 9 and tested it.
In short time test, it didn't cause IME problem. I think it still need long time test for more than half a month to confirm resolving this issue.

But unfortunatelly, this breaks the hook chain of my AHK script. It stopped working after resuming.
So, I hesitate to say this, but reinstalling hook is not my favor. It will cause unexpected result and I cannot live with it. I'm very sorry.

Since I don't want bother you anymore, I decided to keep using Beta 5.
So, you can remove hidden option.

Again I want to say thanks to you for your kindness and support.
phil wrote:But the code that runs when resuming from sleep, is exactly the same as when starting up so I dont really see how it can be any different.
I didn't say this, but the first time I had this problem was when I installed Beta 5.
I usually overwrite a new version without uninstalling a previous version.
When I first time installed Beta 5 on Beta 4, suddenly IME closed.

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

OK The IME issue I believe is fixed. I was unloading the language even though I hadn't loaded it (thus it was causing problems outside XMBC). If your not willing to test it for longer, then I will have to trust your initial test along with my own testing.

I'm disappointed that you dont want to work with me to fix your issue. Firstly you ask me to make a change and when I do, you ask me to remove it. Well I'm sorry that you feel that way but I'm not just about to remove it after making the change. Its quite possible that it will benifit others and not just yourself.

Whats more, if this is breaking AHK, I would like to know why before I release this to everyone and they all have problems. I guess I will have to find someone else to help me test it :(.

Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

piyo
Member
Posts: 20
Joined: Wed Jul 31, 2013 6:58 am

Re: Problem after resuming from sleep

Post by piyo »

I apologize that I confused you.

I think my issue is not a problem of XMBC.
Simply, this AHK script seems to need to start after XMBC to work correctly.
It's just a compatibility issue.

Unfortunatelly, I don't have spare PC for testing purpose.
I'm so selfish, but I want to use both like it used to be.
Sorry for this.

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

Will there is an option to disable the resume from sleep in the current beta.

If you want to know what it is, then I will tell you when I get home (I hanv't got access to the code from work).
Then it will not resume the hook when resuming from sleep, thus it wont reload the language etc. I hope it will therefore me more like beta 5.

Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

piyo
Member
Posts: 20
Joined: Wed Jul 31, 2013 6:58 am

Re: Problem after resuming from sleep

Post by piyo »

OK. So, could you kindly tell me how to use "do no reinstall hook option" ?
Thank you for your time.

User avatar
phil
Site Admin
Posts: 6402
Joined: Sun Apr 06, 2003 11:12 pm

Re: Problem after resuming from sleep

Post by phil »

Sure (sorry I forgot)....

Simply add this XML node anywhere under the root node...

Code: Select all

<ReinstallHook Disable="true"/>
Thanks,
Phil
--[ Phil ]--
--[ Administrator & XMBC Author ]--
Logitech G9, Logitech MX518, Microsoft Intellimouse, Trust 16341 BT Mouse
Windows 10 x64, Intel i5-9600k, Asus Z390-ROG, 16GB DDR4,
nVidia GeForce GTX 970, Evo 970 500Gb NVME, 2x2TB WD Black (RAID1)

Post Reply