New version 0.5.0-rc4 is out

Keep up to date with EG related information here.
User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Sat Aug 26, 2017 7:54 am

you can set disable actions from the various session events that take place as well. these events should take place when using Microsoft RDP and you start a remote session.

as an example if you start an RDP session you will get
System.RemoteConnect
and if hat session is a console session you will also get this event
System.ConsoleConnect

and when the session disconnects
System.RemoteDisconnect

and if that session was a console session
System.ConsoleDisconnect

other session events. don't know what may or may not get triggered here

System.SessionLogon
System.SessionLogoff
System.SessionLock
System.SessionUnlock
System.SessionRemoteControl
If you like the work I have been doing then feel free to Image

tameion
Posts: 20
Joined: Sat Nov 22, 2014 8:08 am
Location: New Zealand

Re: New version 0.5.0-rc4 is out

Post by tameion » Wed Oct 04, 2017 8:41 am

Hi Team

Hit an error with an older plugin when upgrading. It is for the Raspberry Pi and came from
http://eventghost.net/forum/viewtopic.p ... +pi+plugin

It is not critical to my systems but was nice to have
I used SSH to reboot one of my Pi's via SSH when the Raspberry Pi plugin reported overheating or excessive memory usage.

I have restarted EG and deleted and reloaded the plugin without success.
Here is a copy of the error that is generated at plugin activation time. Plugin is then marked as UNKNOWN.

Code: Select all

21:31:10   Error loading plugin file: C:\Program Files (x86)\EventGhost\plugins\RaspberryPi
21:31:10   Traceback (most recent call last) (0.5.0-rc4):
21:31:10     File "C:\Program Files (x86)\EventGhost\plugins\RaspberryPi\__init__.py", line 82, in <module>
21:31:10       import paramiko
21:31:10   ImportError: No module named paramiko
21:31:10   Error compiling script.
21:31:10   Traceback (most recent call last):
21:31:10   SyntaxError: EOL while scanning string literal (31, line 1)
21:31:10   Traceback (most recent call last) (0.5.0-rc4):
21:31:10     File "wx\_core.pyc", line 16766, in <lambda>
21:31:10     File "C:\Program Files (x86)\EventGhost\eg\Core.py", line 205, in Notify
21:31:10       listener(value)
21:31:10     File "C:\Program Files (x86)\EventGhost\eg\Classes\MainFrame\TreeCtrl.py", line 801, in OnNodeSelected
21:31:10       path = node.GetPath()
21:31:10     File "C:\Program Files (x86)\EventGhost\eg\Classes\TreeItem.py", line 284, in GetPath
21:31:10       path.append(parent.childs.index(item))
21:31:10   ValueError: tuple.index(x): x not in tuple
- @Tameion

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Wed Oct 04, 2017 12:32 pm

This is not a huge issue. There are 2 ways that this can be handled. First way is. On the computer where EG is installed you can install python 2.7.9 once installed open a command window and navigate to the python directory/scripts once in the scripts folder type in. "Pip install paramiko" without the quotes. This will install the necessary packages. You will have to leave Python installed or you can locate the installed packages in the Python directory/libs/site-packages folder and copy them to EventGhost/lib27/site-packages this will allow you to remove python if you wanted to.

EG 0.5 has been set up to load packages from it's internal site-packages folder but it also goes and looks to see if python is installed and will load from there as well if it is installed.


Or o can zip up the packages and send em to ya.

The decision is yours
If you like the work I have been doing then feel free to Image

tameion
Posts: 20
Joined: Sat Nov 22, 2014 8:08 am
Location: New Zealand

Re: New version 0.5.0-rc4 is out

Post by tameion » Wed Oct 04, 2017 1:18 pm

Thanks for such a quick and clear reply.

I have followed your instructions carefully but have hit another error.

Code: Select all

02:15:36   Traceback (most recent call last) (0.5.0-rc4):
02:15:36     File "C:\Program Files (x86)\EventGhost\eg\Classes\TaskletDialog.py", line 162, in ProcessingTask
02:15:36       self.Configure(*args, **kwargs)
02:15:36     File "C:\Program Files (x86)\EventGhost\eg\Classes\ConfigDialog.py", line 106, in Configure
02:15:36       treeItem.Configure(*args)
02:15:36     File "C:\Program Files (x86)\EventGhost\eg\Classes\ActionItem.py", line 80, in Configure
02:15:36       return self.executable.Configure(*args)
02:15:36     File "C:\Program Files (x86)\EventGhost\plugins\RaspberryPi\__init__.py", line 1523, in Configure
02:15:36       bottomSizer.Add(prefLbl,0,wx.TOP,3)
02:15:36     File "wx\_core.pyc", line 14457, in Add
02:15:36   PyAssertionError: C++ assertion "Assert failure" failed at ..\..\src\common\sizer.cpp(1401) in wxGridSizer::DoInsert(): too many items (5 > 2*2) in grid sizer (maybe you should omit the number of either rows or columns?)

No rush with the reply. It is 2:15am here in New Zealand and I gotta get some sleep. Will look again in the morning.

@Tameion

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Wed Oct 04, 2017 3:12 pm

ok so the first error is now gone. when we started work on EG 0.5 we needed to do some upgrading. and one of those things was a package or module called wx. wx is responsible for communicating with windows to draw all of the graphics and GUI related bits. wx is very problematic and if there was an easy way to go about changing it to something else we would in a heartbeat. but because the original author wanted to use wx it has locked us to using it. but with every new release of wx comes changes for things that weren't broken. but weren't correct. and now are correct but the code for things like plugins has been written to use the incorrect way. I will fix this plugin no worries there. But you will have to upgrade it to the new version when I am done. It will be a nice double click a single file install so no worries there. and you won't even have to restart EG. But since I am now going to have to remedy this problem by releasing a new version of the plugin I will include the needed paramiko and subsequent modules with it. so you can uninstall python if you like as it will not be needed once i make these changes
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Wed Oct 04, 2017 5:34 pm

here ya go on that RPi plugin
viewtopic.php?p=48563#p48563
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: New version 0.5.0-rc4 is out

Post by blaher » Sat Oct 14, 2017 2:41 am

blaher wrote:
Sat Aug 26, 2017 4:09 am
I came up with a workaround to avoid setting the audio endpoint before it's ready, because I have a feeling that this is what is causing the majority of the problems. I think the RDP is affecting the keyboard plug-in logging, so I might just use a batch file to restart EventGhost after the session is logged on locally.

http://i.imgur.com/B0AN21t.jpg

We'll see how we go.
topix wrote:Maybe as a workaround disable those macros that wouldn't work
Cheers, I'll try disabling the keyboard plugin when an RDP session is in effect.
I disabled the audioendpoint plugin setting my audio defaults, and I haven't had a crash in ages now, so I'm fairly confident it was that plugin causing the issues.

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Sat Oct 14, 2017 3:02 am

Tis what I told ya :shock:

Audio changes cannot be performed on anything but the default audio device (this is because windows will properly select the device)
Monitor actions like powering off the monitors

cannot be done in an RDP session (all programs that create a remote session with another computer).

I am sure there are probably other devices that would cause issues as well. But a good rule of thumb is if you go into the device manager while in an RDP session and you no longer see the device then you cannot perform actions on it while in an RDP session. The device should be visible if you login locally.


So here is a possible solution. if you log into the computer locally then login from a remote session under a different username. This can be done by clicking the proper link below to "enable" this feature.

WindowsXP -7
Windows10

if You have EG running for the one user that is running locally. You will get an event that will be generated in EG when the second user logs in. Now i do not know how EG will respond if you have EG running in 2 different sessions. But here is what I would do.

if you are running EG 0.5 make a script and in that script put this code

Code: Select all

if eg.WinApi.User.Name() == 'ENTER YOUR USERNAME HERE':
    eg.TriggerEvent(prefix='RDP', suffix='Disable.All')
else:
    eg.TriggerEvent(prefix='RDP', suffix='Enable.All')

place that script as the top most item in your Autostart group. What this is going to do is it will check for the logged in user name and trigger an event if the user matches of not a different one gets triggered.

make 2 macros one for each of the events. in one macro add the disable event then add the action disable for each of the plugins and one for each of the root folders/macros in your tree.

and the opposite for the Enable event. reverse the process of the disable event.

This is going to allow you to open the tree from the RDP session that is logged in with a different username and allow you to edit the tree file without having EG crash on ya. you will have to do 2 things to get EG to start right. place your save file outside of a specific username. it cannot be saved anywhere in the c:\users folder. and in the remote session you will want to start EG with the -multiload command line switch.

if you set up the network event receiver and sender plugin i can tell you how to get EG to reload the save file on the local logged in user. If ya want. but this will allow you to get the thing running so you can edit the tree.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Sun Oct 15, 2017 2:44 am

I made some modifications to some of the core files and sent them upstream to be added to EG. But i will post them here so you can use them. it will help in setting up the disabling features. I want to go a little further with it and add an extra method to the plugins that can be used to disable a specific plugin if the logged in user is on a remote session. so this can all be done in the back end of EG without the need to have the user do this kind of work. we are going to see more and more people using remote sessions. so the only way to deal with it is to either completely rewrite EG to run as a service with a web GUI front end or to make some changes in it how it sits now to deal with it until we get around to rewriting it.
Attachments
AutostartItem.py
replace AutostartItem.py in the eg/Classes folder with this one.
(3.41 KiB) Downloaded 24 times
ActionThread.py
replace ActionThread.py in the eg/Classes folder with this one.
(4.56 KiB) Downloaded 21 times
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: New version 0.5.0-rc4 is out

Post by blaher » Thu Dec 14, 2017 6:14 am

I've been getting regular crashes now, even with audioendpoint disabled.

Code: Select all

Traceback (most recent call last) (0.5.0-rc4):
  File "_ctypes/callbacks.c", line 315, in 'calling callback function'
  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\plugins\Task\__init__.py", line 128, in MyWndProc
    self.WindowGotFocusProc(None, None, lParam, None)
  File "C:\Program Files (x86)\EventGhost\plugins\Task\__init__.py", line 158, in WindowGotFocusProc
    ident = self.CheckWindow(hwnd)
  File "C:\Program Files (x86)\EventGhost\plugins\Task\__init__.py", line 112, in CheckWindow
    name = splitext(GetProcessName(pid))[0]
WindowsError: [Error 8] Not enough storage is available to process this command: 'CreateToolhelp32Snapshot'
Seems to be the culprit.
Attachments
Log - Copy.rar
(18.89 KiB) Downloaded 18 times

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Thu Dec 14, 2017 9:19 am

You can try increasing your IRPStackSize. this is going to require you to edit your registry.

Click Start, click Run, type regedit, and then click OK.
Locate and then click the following registry subkey: If the IRPStackSize entry is not present in this subkey, follow these steps:
Click Edit, point to New, and then click DWORD Value.
Type IRPStackSize, and then press ENTER.

Note Type IRPStackSize exactly as it appears. The value name is case sensitive.
Click IRPStackSize, click Edit, and then click Modify.
In the Data Value box, type a larger value, and then click OK.

Values can be

0x1
0x2
0x3
0x4
0x5
0x6
0x7
0x8
0x9
0xA
0xB
0xC


Change it one step at a time until the problem goes away. if it does not let me know.
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: New version 0.5.0-rc4 is out

Post by blaher » Thu Dec 21, 2017 2:10 am

I'm up to the max and it's still crashing. I think I'll put it back to the default and see if it helps.

Here's an updated log.
Attachments
Log - Copy (3).rar
(10.79 KiB) Downloaded 19 times

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Thu Dec 21, 2017 5:02 am

I am going to suggest you run some kind of a memory check on your computer.

I am thinking there is something wrong there. Or one of the voltages on your mainboard. Do you overclock your computer at all?

The reason why I am asking this is because of the number of really strange errors that don't seem to have any kind of a common denominator. The problems are coming from all different parts of EG that aren't related in a manner that would cause these errors. Maybe you have some HDD corruption or possibly window system files are corrupted.

MCE Remote Vista plugin
WindowsError: [Error 1072] The specified service has been marked for deletion.


this one from eg.document. this one doesn't even know what went wrong.
wxError1: Can't create window of class wxWindowNR (error 0: unknown error 0)

this one from Task Monitor
WindowsError: [Error 8] Not enough storage is available to process this command: 'CreateToolhelp32Snapshot'

this one from the Main GUI control of EG
PyAssertionError: C++ assertion "image.IsOk()" failed at ..\..\src\msw\bitmap.cpp(922) in wxBitmap::CreateFromImage(): invalid image

this one is from eg.Scheduler.
error: can't start new thread


run these few tests for me.

first check you HDD for any errors. use the builtin windows checker. don't fix any bad sectors as that portion could take forever. when that is done report the results from it. then run this from the command line. this could take a really long time to run. so you may want to do it before you go to sleep. run CMD with admin privileges. then key in this command

Code: Select all

sfc /scannow
this is going to test all of the windows OS files for any problems. and if there are any issues it will make an attempt to repair them. it may or may not be able to. running this will consume a pretty good sized chunk of resources. so close all running programs..

once that is done you will want to key this into that same command window. running this command is going to parse the output log files from the scan and save that information to a file named sfcdetails.txt on your desktop. zip up that file and attach it to a PM to me. I need to look at it to see what it has found and what it was able to fix and not fix.

Code: Select all

findstr /c:"[SR]" %windir%\logs\cbs\cbs.log > %USERPROFILE%\Desktop\sfcdetails.txt 
I am going to ask some really dumb questions. don't get mad at me. sometimes things get forgotten or overlooked.

Have you rebooted the computer?
Have you done a power cycle of the computer? (shutdown, unplug for 30 seconds, power it back up)
Have you tried disabling one plugin at a time?
Have you tried running EG with a blank config tree?


I am not sure what you are changing or doing to your tree that keeps on causing the plugin manager to restart. but it happens right after some program gets run from EG. I have seen this 7 times and this appears before and after some of the errors. Not sure what it is.

Code: Select all

20:20:24: 1 MainThread: creating named pipe
20:20:24: 1 MainThread: calling ConnectNamedPipe
20:20:24: 1 MainThread: starting subprocess
20:20:24: 1 MainThread: waiting for subprocess to connect
20:20:24: 1 MainThread: got connect event
20:20:24: 1 MainThread: sending startup message
20:20:24: 0 MainThread: PluginManager.ScanAllPlugins :0.132135220365641
If you like the work I have been doing then feel free to Image

blaher
Experienced User
Posts: 481
Joined: Thu Nov 17, 2011 1:27 am

Re: New version 0.5.0-rc4 is out

Post by blaher » Fri Dec 22, 2017 4:20 am

kgschlosser wrote:
Thu Dec 21, 2017 5:02 am
I am going to suggest you run some kind of a memory check on your computer.

I am thinking there is something wrong there. Or one of the voltages on your mainboard. Do you overclock your computer at all?
No, no overclocking. No instability in any other programs, even CPU/GPU intensive ones like games.
MCE Remote Vista plugin
WindowsError: [Error 1072] The specified service has been marked for deletion.
This one is explainable: I was getting double presses in Kodi, i.e. the service had failed to disable the native Win key presses, so after trying to uninstall from the EG plugin without success, I went to the plugin directory, and ran the uninstall, rebooted, ran install, rebooted. It's now back to working properly.
this one from eg.document. this one doesn't even know what went wrong.
wxError1: Can't create window of class wxWindowNR (error 0: unknown error 0)


this one from Task Monitor
WindowsError: [Error 8] Not enough storage is available to process this command: 'CreateToolhelp32Snapshot'

this one from the Main GUI control of EG
PyAssertionError: C++ assertion "image.IsOk()" failed at ..\..\src\msw\bitmap.cpp(922) in wxBitmap::CreateFromImage(): invalid image

this one is from eg.Scheduler.
error: can't start new thread


run these few tests for me.

first check you HDD for any errors. use the builtin windows checker. don't fix any bad sectors as that portion could take forever. when that is done report the results from it.
No errors on any drive.
then run this from the command line. this could take a really long time to run. so you may want to do it before you go to sleep. run CMD with admin privileges. then key in this command

Code: Select all

sfc /scannow
this is going to test all of the windows OS files for any problems. and if there are any issues it will make an attempt to repair them. it may or may not be able to. running this will consume a pretty good sized chunk of resources. so close all running programs..

once that is done you will want to key this into that same command window. running this command is going to parse the output log files from the scan and save that information to a file named sfcdetails.txt on your desktop. zip up that file and attach it to a PM to me. I need to look at it to see what it has found and what it was able to fix and not fix.

Code: Select all

findstr /c:"[SR]" %windir%\logs\cbs\cbs.log > %USERPROFILE%\Desktop\sfcdetails.txt 
I am going to ask some really dumb questions. don't get mad at me. sometimes things get forgotten or overlooked.
Have you rebooted the computer?
yes

Have you done a power cycle of the computer? (shutdown, unplug for 30 seconds, power it back up)
yes
Have you tried disabling one plugin at a time?
Have you tried running EG with a blank config tree?
No, I use EG for home automation so it needs to be up.
I am not sure what you are changing or doing to your tree that keeps on causing the plugin manager to restart. but it happens right after some program gets run from EG. I have seen this 7 times and this appears before and after some of the errors. Not sure what it is.

Code: Select all

20:20:24: 1 MainThread: creating named pipe
20:20:24: 1 MainThread: calling ConnectNamedPipe
20:20:24: 1 MainThread: starting subprocess
20:20:24: 1 MainThread: waiting for subprocess to connect
20:20:24: 1 MainThread: got connect event
20:20:24: 1 MainThread: sending startup message
20:20:24: 0 MainThread: PluginManager.ScanAllPlugins :0.132135220365641
Is it when I kill EG with task manager, and have to restart it, perhaps?

User avatar
kgschlosser
Site Admin
Posts: 3595
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: New version 0.5.0-rc4 is out

Post by kgschlosser » Fri Dec 22, 2017 8:17 am

I am going to suggest running the sfc/scannow

and since you are having an issue with your production EG. I would suggest systematically shutting down one plugin at a time for a day or 2 each and see if it is possibly a single plugin causing the problem. I know this sucks But unless we can isolate exactly what is causing it my hands are tied.
If you like the work I have been doing then feel free to Image

Post Reply