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.

QT4 and Eventghost = Crashes

If you have a question or need help, this is the place to be.
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

QT4 and Eventghost = Crashes

Post by masterjoe »

Hi folks,

to improve the visual quality of the OSD I wanted to implement my own - which I did. Now I have a file containing several classes which will display some widgets with text, images etc. I have developed these classes with a standalone Python26 + PyCharm to implement and test them. Everything works pretty well and looks the way I want.

However using the exact same file with Eventghost and QT4 (installed to its site-packages) I only get Eventghost crashing right away! It does not even run a single line from my file and crashes Eventghost during code compilation!

Does anyone have some experience with QT4 and knows how to get it running with Eventghost? It shoulld really work because I am using a older install from here:
https://sourceforge.net/projects/pyqt/f ... e/download

which is compiled for Python26 which is also the basis for Eventghost. Why does the thing crash??

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

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

pyqt is not apart of the eventghost standard library, tho it would be nice to have something more updated in it.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

Maybe you might have to put a path statement to the eventghost directory I don't know tho I did notice it installs to the wrong lib folder I tried it and moved the package to where it belongs and I also edited the conf files to the proper directory still froze eg on me when I did an import I think eg runs python from a zip file and the python exe has been renamed I wish there was some documentation on adding libs and building from source


But I also like to distribute anything I make and if its not apart of the standard library it becomes to difficult to install
If you like the work I have been doing then feel free to Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

Well, the folder to which it has been installed is correct because to ensure it I recreated the expected structure with symbolic links. This cannot be the problem.
There is no "import error" or anything but instead the Eventghost application really crashes hard (I suspect an exception that goes through to system level or worse) when the QT code is reached.

I am sure that my code (successfully tested with Python26 standalone) and the folders (installed to correct site packages folder) are not the issue.

The hard crash however is a problem. I was not able to find out why it crashes so ungently with no hint regarding the cause.

Maybe some of you guys might try this, too? Install the provided QT4 package from the link to the correct site pakckages folder and then test some simple QT4 sample in form of an Eventghost plugin or in form of a Python code action.

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

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

The issue I believe is that the default libs folder for event ghost is not pointing to the Libs folder but instead pointing to libs26

And also unless QT knows that python is being run from a zip file and knows to open it to make all the correct dependency changes and what have you its not going to work

Now yours crashing upon loading eg is odd because when I installed it and then tried to import statement from a script I got an import error I didn't get crashing until I moved the install and changed the directory pointers in the conf files thats when it crashed

What I am thinking is to decompress the zip I will have to take s look see to find out where it is supposed to go then install QT with it pointing to that folder for python then move the installation to the lib26 folder and reconfigure QT to point to that folder decompress the EG python and replace the stock zip

This is why if this is for a plugin that is going to get redistributed adding to the python standard lib is not done

I am guessing at this but it sounds right I will have to do a fair amount of research on this

I am also guessing that there are possibly a lot of modifications to the package that have to get done because I am almost 100 % sure that the zip gets decompressed to a temp folder which the name of the folder would dynamically change each time you run eg sivthat would have to be handled
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

And I have tried it and it crashes right at import of QT
If you like the work I have been doing then feel free to Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

Hi kgschlosser,

thanks for taking your time to recreate the issue :D I don't get your details regarding the zip decompression procedure or why that would be necessary...
Well, to work around the folder location issue I already had created a symbolic link with this nice package:
http://schinagl.priv.at/nt/hardlinkshel ... nsion.html

I had added a symbolic link parallel to lib26 that is named "Lib" and pointing to lib26. This way QT4 (from the provided link) can be installed directly to the correct folder without any further tricks! Therefore I do not think that the folder as such could be the problem.
The crash happens reproducible as you have already tested at the import statement - but it is neither an "import error" that happens nor any other catchable exception but a hard crash that kills the Eventghost application every time.

I really want to use QT for my plans because it offers so much more than any other GUI library that can be used with Eventghost. So there must a way to get this working somehow...?

The question could also be: Why is it so remarkably problematic to add something like the QT4 package to Eventghost as this should be an easy task? Eventghost is such a nice piece of software but limitations like this are pretty ugly and unnecessarily prevent some advanced usage. What I plan is no specific plugin for QT but I already have developed a plugin which extends Eventghost's event processing features dramatically. And within this plugin I intend to use QT for several standalone *.py files that can be used (loaded, compiled, called) with my plugin. Using Eventghost as basis for this project now seems to hit a wall as QT4 compiled for Python 2.6 is unexpectedly not compatible with Eventghost?!

Hopefully there is a solution for this...? :shock:

Thanks for any help :)
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

python is in a zip file it is not decompressed in the EG folder.

all you are seeing is the library (i believe) i don't know a whole hell of a lot on the back end of eventghost but there is a zip file called python26.zip and i am almost sure it is python and when eg runs it decompresses it and uses it from a temp folder that being said i don't think that QT knows this and decompresses it and makes the necessary adjustments to to python then recompresses it

so i am not sure how to add a library like to to EG and have it work

i am sure someone has done it and posted the directions.

i am going to go and see if i can find something on it
If you like the work I have been doing then feel free to Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

Thank you, your help is very much appreciated :)

Well, I have been able to successfully use many other libraries in the site-packages folder of Eventghost with no issues. But QT4 kill EG immediately.
Also if Eventghost does what you say it's way too complicated how it is done and should be simplified. Because it sounds like something that should not be done that way! As said my code and QT4 runs very well with the good old Python 2.6 distribution found here:

https://www.python.org/download/releases/2.6.6/

Integrating other libraries with Eventghost's version of Python should be as easy as it is with this standalone version. Otherwise something goes wrong badly.
So far I was able to use some other libraries and had no problems with them. QT4 however is not working at all.

It is very silent here on the Forum and I wonder if there is any of the authors here around to shine some light on the issue and how to solve it...?

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

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

the original author of EG has left the development process, not sure why. but i do know he left the project to a few people here on the forums. but development has slowed they recently got onto github with it and there is some movement there I am sure that's going to be a huge help. again this is somehting that has been made and maintained as a hobby more or less. there is no paycheck for anyone that is helping with EG. and if that is the case with how eventghost was installed with the zip file and all (i really haven't looked at it) i am sure the author had good reason to, and it's probably something along the lines of making plugins using libraries that aren't EG standard and causing problems. so steps were made to make it difficult to do so that developers would use the libraries distributed with eventghost instead of having the user alter the version they have and then running into complications from it and then it would be expected of the EG author to fix the problem the user created.

i have altered the core code to suit my needs but I have to remember when i am writing a plugin not to use certain features because no one else has them (it's actually quite hard. i have a second computer so i can test my plugin against windows 10 and also a plain jane EG
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

and oh as far as the symbolic links there are a few different kinds, and i don't recall off the top of my head which one it is that pretty much tricks everything except the filesystem

and it will also make the links across a network :-D

i also like it because it has shell integration and to have a drag and drop for making the links is very nice

it's called Link Shell Extension and you have to also install the visual c++ 2005 runtime libraries
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

i managed to get the library to import using the python shell that came with EG, but when i do the same thing in a script it just crashed EG. there has to be some kind of compatibility problem with it and not an installation issue.
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

and i am correct in saying that python is loading from a zip, it's using it as an image file
If you like the work I have been doing then feel free to Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

kgschlosser wrote:and oh as far as the symbolic links there are a few different kinds, and i don't recall off the top of my head which one it is that pretty much tricks everything except the filesystem

and it will also make the links across a network :-D

i also like it because it has shell integration and to have a drag and drop for making the links is very nice

it's called Link Shell Extension and you have to also install the visual c++ 2005 runtime libraries
Err, I already use this extension as stated in one of my previous posts ;)
And what I do is a (NTFS) "junction". I am sure that this is not the cause of theses crashes.
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

kgschlosser wrote:i managed to get the library to import using the python shell that came with EG, but when i do the same thing in a script it just crashed EG. there has to be some kind of compatibility problem with it and not an installation issue.
Yes this is what I am also suspecting... but why is Eventghost incompatible when both the QT4 library and Eventghost are based on Python 2.6? What exactly prevents the QT lib from working?
Oh man, life could be so easy if it wasn't that complicated :lol:
Last edited by masterjoe on Wed May 18, 2016 9:14 am, edited 1 time in total.
Post Reply