bug with command line "eventghost.exe -e"

Found a bug in EventGhost? Report it here.
User avatar
kgschlosser
Site Admin
Posts: 4046
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: bug with command line "eventghost.exe -e"

Post by kgschlosser » Sat Apr 21, 2018 9:48 am

OK so i have been working on this quite a bit. and I have managed to get this whole thing running as a multi-threaded asynchronous overlapped IO pipe. What this means is it doesn't operate round robin style. so it can handle multiple instances of the pipe writing data back and forth and no set intervals. so while one instance is reading another can be writing. This is going to be very useful in the future when we eventually get EG to run as a service. there will be a lot of data that is going to need to be transferred between a GUI and the service. and this is the mechanism to do it. and the best part is i wrote it so that it only uses the python standard library and is pure python so no problematic use of pywin32. I still have a few kinks to iron out but it is looking really good. I could not find a single piece of information of something like this being done in python. So i may convert it into a python library.
If you like the work I have been doing then feel free to Image

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

Re: bug with command line "eventghost.exe -e"

Post by kgschlosser » Sat Apr 21, 2018 11:34 pm

Ok so I believe I have worked out all the kinks. I am sure someone will find a bug in it. When I get home I will submit the code to be added to EG that will cause a build to take place. When it is done building I will post a link to the download. It will not update the build button at the top of the forum until the code clears quality control. I feel really good about the code that has been done up on this. The original code I knew was going to need some work, I thought it would suffice for our current needs. This new code should be good for a very very long time. I made it scalable
If you like the work I have been doing then feel free to Image

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

Re: bug with command line "eventghost.exe -e"

Post by kgschlosser » Sun Apr 22, 2018 2:44 am

I haven't tried the build yet but here is the link to it if anyone wants to give it a go. This one has the updated named pipe.

https://ci.appveyor.com/api/buildjobs/k ... _Setup.exe
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: bug with command line "eventghost.exe -e"

Post by Snowbird » Mon Apr 23, 2018 8:01 pm

ok, so here is the error I got after a few hours of usage :

Code: Select all

Traceback (most recent call last):
  File "EventGhost.pyw", line 53, in <module>
  File "C:\Program Files (x86)\EventGhost\eg\__init__.py", line 31, in <module>
    import Cli
  File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 183, in <module>
    send_message('eg.TriggerEvent', *args.startupEvent)
  File "C:\Program Files (x86)\EventGhost\eg\Cli.py", line 110, in send_message
    '%s, %s' % (msg, str(msg_args))
  File "C:\Program Files (x86)\EventGhost\eg\NamedPipe.py", line 1095, in send_message
    raise PipeError(err)
eg.NamedPipe.PipeError: The pipe has been ended. [0x0000006D]
I left the default settings as is : Allow "3" named pipe, i'm going to change it to 6 and see what happens.

BTW, is there a way to get the date and time in EG log so we can know exactly when errors occur ?

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

Re: bug with command line "eventghost.exe -e"

Post by kgschlosser » Tue Apr 24, 2018 12:16 am

give me some information in what you were doing when this error occurred. or what was happening. Did it happen while you were tinkering with it?

Did it happen at some other point?



this is what takes place when you have EG already open and run eventghost with the --event switch.


a second copy of EG starts and it check for the existence of the pipe. if the pipe is found then there is a copy of EG already running.
Since there is a copy of EG running it will then proceed to check which command line arguments were used and it will determine if anything needs to be sent through the pipe. and if something does it will make a connection to the pipe and send the information. it will then read the pipe to get an answer.

the server side reads that lane on the pipe takes the command and processes it. after it is done processing it it will take any returned information and send it back through to the client. if an error occurs during that processing the server will close that channel in the pipe. thus disconnecting the client.

The error that you got was from the client side not the server side. Now that i think about it i need to change the client side up a bit. This is due to the second instance getting stuck and the process not closing because the traceback has occurred.


I am going to make it so that the program terminates in a error state. this way whatever program you are using to trigger the event will be able to read that it closed in an error state and it can try to resend the event.

I have been rewriting the named pipe portion again to make it a more full featured client and server This was a a test run to see how it went.

When reporting the error I am going to need a full copy of the log file not just the one error. because the client and server are going to be spitting out information before and after the error that is going to tell me what happened. If you do not want to post the log in the open forum send it to me in a PM


also changing the number of connections is not going to fix that error. the error occurred because the server closed the pipe on the client for some reason.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: bug with command line "eventghost.exe -e"

Post by Snowbird » Tue Apr 24, 2018 6:42 am

ok, I think you're on the right track ! :) I've sent you a PM with a complete log and some explanations, hope it helps, if you need more things let me know !

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: bug with command line "eventghost.exe -e"

Post by Snowbird » Sun Apr 29, 2018 6:24 am

hi, any progress on this ?

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

Re: bug with command line "eventghost.exe -e"

Post by kgschlosser » Sun Apr 29, 2018 8:39 am

when i get it working 100% you will be the first to know.
If you like the work I have been doing then feel free to Image

Snowbird
Experienced User
Posts: 340
Joined: Fri Jul 03, 2009 10:04 am

Re: bug with command line "eventghost.exe -e"

Post by Snowbird » Sat May 26, 2018 6:22 am

I tried the latest WIP, and the problem is still there regarding the namedpipe, it works fine for a while then suddenly EG runs a new instance of itself... (a new EG process is created on top of the current one), and then the mess starts everywhere since most of the plugins are ran twice, events are generated twice, etc. and it ends up freezing EG because it's not a normal use. I can assure you that there's nothing helpful in the log. I can't give you any clue unfortunately, I know you have tested this and everything works for you, but I'm pretty sure that there is still something that needs to be fixed. The thing I don't understand is why it works fine for many hours, sometimes days, and suddenly starts acting weird, this is really strange....

Post Reply