Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.
RC3 EG freeze
RC3 EG freeze
This is with RC3 and Windows 10:
17:53:46: 0 MainMessageReceiver: SessionChangeNotifier.OnSessionChange(hwnd=265434, msg=689L, wparam=4L, lparam=1)
17:53:46: 0 MainMessageReceiver: SessionChangeNotifier.OnSessionChange(hwnd=265434, msg=689L, wparam=1L, lparam=1)
19:36:48: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=265434, uMsg=536L, wParam=32787L, lParam=156749016)
19:36:53: 0 MainMessageReceiver: timeout TriggerEventWait
File "threading.pyc", line 774, in __bootstrap
File "threading.pyc", line 801, in __bootstrap_inner
File "threading.pyc", line 754, in run
File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 280, in __MainLoop
self.__DoOneEvent()
File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 261, in __DoOneEvent
self.__PumpWaitingMessages()
File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 287, in __PumpWaitingMessages
while PeekMessage(byref(msg), 0, 0, 0, PM_REMOVE):
File "C:\Program Files (x86)\EventGhost\eg\Classes\MessageReceiver.py", line 127, in WindowProc
res = handler(hwnd, mesg, wParam, lParam)
File "C:\Program Files (x86)\EventGhost\eg\Utils.py", line 428, in LogItWrapper
return func(*args, **kwargs)
File "C:\Program Files (x86)\EventGhost\plugins\System\PowerBroadcastNotifier.py", line 254, in OnPowerBroadcast
source=self.plugin
File "C:\Program Files (x86)\EventGhost\eg\Classes\EventThread.py", line 151, in TriggerEventWait
traceback.print_stack()
19:36:57: 1 MainThread: Document.ShowFrame()
19:36:57: 1 MainThread: TreeCtrl.OnItemCollapsingEvent(event=<wx.TreeEvent>)
19:36:58: 1 MainThread: Document.ShowFrame => None
19:37:04: 1 MainThread: Document.CheckFileNeedsSave()
19:37:04: 1 MainThread: Document.CheckFileNeedsSave => 5100
19:37:04: 1 MainThread: Document.Close()
19:37:04: 1 MainThread: MainFrame.Destroy()
19:37:04: 1 MainThread: LogCtrl.Destroy()
19:37:04: 1 MainThread: TreeCtrl.Destroy()
19:37:04: 1 MainThread: StatusBar.Destroy()
19:37:04: 1 MainThread: StatusBar.__del__()
19:37:04: 1 MainThread: MainFrame.Destroy => True
19:37:04: 1 MainThread: Document.GetExpandState()
19:37:04: 1 MainThread: Document.Close => None
19:37:04: 1 MainThread: MainFrame.Iconize(flag=False)
19:37:04: 1 MainThread: MainFrame.Iconize(flag=False)
19:37:05: 1 MainThread: Triggering OnClose
It hung and I had to kill it in taskmanager to restart it.
Also is the latest install program supposed to uninstall the alternatemceirservice? Because if it doesn't, it can't update, or delete that folder.
17:53:46: 0 MainMessageReceiver: SessionChangeNotifier.OnSessionChange(hwnd=265434, msg=689L, wparam=4L, lparam=1)
17:53:46: 0 MainMessageReceiver: SessionChangeNotifier.OnSessionChange(hwnd=265434, msg=689L, wparam=1L, lparam=1)
19:36:48: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=265434, uMsg=536L, wParam=32787L, lParam=156749016)
19:36:53: 0 MainMessageReceiver: timeout TriggerEventWait
File "threading.pyc", line 774, in __bootstrap
File "threading.pyc", line 801, in __bootstrap_inner
File "threading.pyc", line 754, in run
File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 280, in __MainLoop
self.__DoOneEvent()
File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 261, in __DoOneEvent
self.__PumpWaitingMessages()
File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 287, in __PumpWaitingMessages
while PeekMessage(byref(msg), 0, 0, 0, PM_REMOVE):
File "C:\Program Files (x86)\EventGhost\eg\Classes\MessageReceiver.py", line 127, in WindowProc
res = handler(hwnd, mesg, wParam, lParam)
File "C:\Program Files (x86)\EventGhost\eg\Utils.py", line 428, in LogItWrapper
return func(*args, **kwargs)
File "C:\Program Files (x86)\EventGhost\plugins\System\PowerBroadcastNotifier.py", line 254, in OnPowerBroadcast
source=self.plugin
File "C:\Program Files (x86)\EventGhost\eg\Classes\EventThread.py", line 151, in TriggerEventWait
traceback.print_stack()
19:36:57: 1 MainThread: Document.ShowFrame()
19:36:57: 1 MainThread: TreeCtrl.OnItemCollapsingEvent(event=<wx.TreeEvent>)
19:36:58: 1 MainThread: Document.ShowFrame => None
19:37:04: 1 MainThread: Document.CheckFileNeedsSave()
19:37:04: 1 MainThread: Document.CheckFileNeedsSave => 5100
19:37:04: 1 MainThread: Document.Close()
19:37:04: 1 MainThread: MainFrame.Destroy()
19:37:04: 1 MainThread: LogCtrl.Destroy()
19:37:04: 1 MainThread: TreeCtrl.Destroy()
19:37:04: 1 MainThread: StatusBar.Destroy()
19:37:04: 1 MainThread: StatusBar.__del__()
19:37:04: 1 MainThread: MainFrame.Destroy => True
19:37:04: 1 MainThread: Document.GetExpandState()
19:37:04: 1 MainThread: Document.Close => None
19:37:04: 1 MainThread: MainFrame.Iconize(flag=False)
19:37:04: 1 MainThread: MainFrame.Iconize(flag=False)
19:37:05: 1 MainThread: Triggering OnClose
It hung and I had to kill it in taskmanager to restart it.
Also is the latest install program supposed to uninstall the alternatemceirservice? Because if it doesn't, it can't update, or delete that folder.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: RC3 EG freeze
what were you doing when it hung?
all this states is that for some reason the action thread got hung. not why it got hung. This is the same error you keep on getting. there is something you have going on in your macros that is causing this hang. It is doing it with a lot of things. my suggestion to you is to create a new tree and one at a time move your macros until you find out which one is causing it.
all this states is that for some reason the action thread got hung. not why it got hung. This is the same error you keep on getting. there is something you have going on in your macros that is causing this hang. It is doing it with a lot of things. my suggestion to you is to create a new tree and one at a time move your macros until you find out which one is causing it.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: RC3 EG freeze
and we have not done anything with the alternatemceir service. this is going to resolve it's self once we put into place the plugin repo. because the alternate mceir service will be in the user plugin directory and not the core plugin directory and we will have no need to delete that folder.
Re: RC3 EG freeze
kgschlosser wrote:what were you doing when it hung?
all this states is that for some reason the action thread got hung. not why it got hung. This is the same error you keep on getting. there is something you have going on in your macros that is causing this hang. It is doing it with a lot of things. my suggestion to you is to create a new tree and one at a time move your macros until you find out which one is causing it.
I was starting Kodi and the macro contained the 'monitor on' action that seems to be a problem child.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: RC3 EG freeze
the thing is that monitor issue seems so specific to your setup... until... there was another bug report.. still as mysterious as yours. I am going to spend some time digging into the API for it now that I have spent wuite a bit of time working with the Windows API and have a much better understanding of how it works.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: RC3 EG freeze
well well well...
look at what I have found
https://stackoverflow.com/questions/250 ... nt-turn-on
interesting. Microsoft strikes again. they broke it and never fixed it.
look at what I have found
https://stackoverflow.com/questions/250 ... nt-turn-on
interesting. Microsoft strikes again. they broke it and never fixed it.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: RC3 EG freeze
replace your plugins\System\__init__.py file with the one attached.
copy and paste the xml below into your tree and run the macro
copy and paste the xml below into your tree and run the macro
Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="WIP">
<Macro Name="Turn Off Monitor" Expanded="True">
<Action>
System.MonitorPowerOff()
</Action>
<Action>
EventGhost.Wait(5.0)
</Action>
<Action>
System.MonitorPowerOn()
</Action>
</Macro>
</EventGhost>
- Attachments
-
- __init__.py
- (73.84 KiB) Downloaded 144 times
Re: RC3 EG freeze
That works! Well done. 
I got an error in the log, but functionally it does the job. I changed the wait time to 10 secs, because the monitor takes quite a while to switch off fully.
I got an error in the log, but functionally it does the job. I changed the wait time to 10 secs, because the monitor takes quite a while to switch off fully.
Code: Select all
13:31:14 Turn Off Monitor
13:31:14 Turn Off Monitor
13:31:14 13:31:14: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=2034904, uMsg=536L, wParam=32787L, lParam=159843264)
13:31:14 Wait: 10.0 sec(s)
13:31:19 13:31:19: 0 MainMessageReceiver: timeout TriggerEventWait
13:31:19 File "threading.pyc", line 774, in __bootstrap
13:31:19 File "threading.pyc", line 801, in __bootstrap_inner
13:31:19 File "threading.pyc", line 754, in run
13:31:19 File "C:\Program Files (x86)\EventGhost\eg\Utils.py", line 441, in LogItWithReturnWrapper
13:31:19 result = func(*args, **kwargs)
13:31:19 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 280, in __MainLoop
13:31:19 self.__DoOneEvent()
13:31:19 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 261, in __DoOneEvent
13:31:19 self.__PumpWaitingMessages()
13:31:19 File "C:\Program Files (x86)\EventGhost\eg\Classes\ThreadWorker.py", line 287, in __PumpWaitingMessages
13:31:19 while PeekMessage(byref(msg), 0, 0, 0, PM_REMOVE):
13:31:19 File "C:\Program Files (x86)\EventGhost\eg\Classes\MessageReceiver.py", line 127, in WindowProc
13:31:19 res = handler(hwnd, mesg, wParam, lParam)
13:31:19 File "C:\Program Files (x86)\EventGhost\eg\Utils.py", line 428, in LogItWrapper
13:31:19 return func(*args, **kwargs)
13:31:19 File "C:\Program Files (x86)\EventGhost\plugins\System\PowerBroadcastNotifier.py", line 254, in OnPowerBroadcast
13:31:19 source=self.plugin
13:31:19 File "C:\Program Files (x86)\EventGhost\eg\Classes\EventThread.py", line 151, in TriggerEventWait
13:31:19 traceback.print_stack()
13:31:24 Turn On Monitor
13:31:24 System.Monitor.Off
13:31:24 13:31:24: 0 MainMessageReceiver: PowerBroadcastNotifier.OnPowerBroadcast(hwnd=2034904, uMsg=536L, wParam=32787L, lParam=159842656)
13:31:24 System.Monitor.On- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: RC3 EG freeze
ok so now I know why you are getting that TriggerEventWait traceback...
this is because EG is only able to run one event at a time. and you are running an event that turned the monitor off. then have the macro wait. so the thread is in a busy state. so when the monitor shuts off it causes windows to send a notification into EG on a different thread. and when that happens it calls TriggerEventWait. which is exactly what it implies. Trigger the Event but wait for it to actually get triggered and not put into a queue. but since the macro with Wait(10.0) is holding up the works. the TriggerEventWait times out before the event from windows gets triggered. that is why you see that error. and that being said you will only see an error if you have debugging on. but another solution would be to run the script in a different thread then the action/event thread. so if you make a python script and copy and paste the code below into it then run the script. you should no longer get that error.
this is because EG is only able to run one event at a time. and you are running an event that turned the monitor off. then have the macro wait. so the thread is in a busy state. so when the monitor shuts off it causes windows to send a notification into EG on a different thread. and when that happens it calls TriggerEventWait. which is exactly what it implies. Trigger the Event but wait for it to actually get triggered and not put into a queue. but since the macro with Wait(10.0) is holding up the works. the TriggerEventWait times out before the event from windows gets triggered. that is why you see that error. and that being said you will only see an error if you have debugging on. but another solution would be to run the script in a different thread then the action/event thread. so if you make a python script and copy and paste the code below into it then run the script. you should no longer get that error.
Code: Select all
import threading
def run():
import time
eg.plugins.System.MonitorPowerOff()
time.sleep(10)
eg.plugins.System.MonitorPowerOn()
t = threading.Thread(target=run)
t.daemon = True
t.start()
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
Re: RC3 EG freeze
@blaher
I told you i don't give up and we will get it sorted. sometimes it's a simple comment that someone else makes that sparks a thought. or one simple little tiny thing i read that makes me think a little differently. It could be 10 minutes, 10 days, or 10 years. but i will find a solution.
I told you i don't give up and we will get it sorted. sometimes it's a simple comment that someone else makes that sparks a thought. or one simple little tiny thing i read that makes me think a little differently. It could be 10 minutes, 10 days, or 10 years. but i will find a solution.
Re: RC3 EG freeze
Thank you. It's much appreciated!kgschlosser wrote:@blaher
I told you i don't give up and we will get it sorted. sometimes it's a simple comment that someone else makes that sparks a thought. or one simple little tiny thing i read that makes me think a little differently. It could be 10 minutes, 10 days, or 10 years. but i will find a solution.
- kgschlosser
- Site Admin
- Posts: 5190
- Joined: Fri Jun 05, 2015 5:43 am
- Location: Rocky Mountains, Colorado USA
