ActivityWatch / aw-qt

Tray icon that manages ActivityWatch processes, built with Qt.
Mozilla Public License 2.0
27 stars 29 forks source link

Doesn't start with pyinstaller anymore #43

Closed johan-bjareholt closed 5 years ago

johan-bjareholt commented 5 years ago

Ran GDB on windows from the build on my 0.8.0b8 branch and got this sefault https://github.com/ActivityWatch/activitywatch/pull/270

starting aw-server manually works fine

#0  0x74013397 in python35!PyDict_SetItem () from C:\Users\Johaj\Desktop\activitywatch-0.8.0b8-prerelease\python35.dll
#1  0x6eca5d14 in pythoncom35!?PyCom_IsGatewayRegistered@@YAHABU_GUID@@@Z ()
   from C:\Users\Johaj\Desktop\activitywatch-0.8.0b8-prerelease\pythoncom35.dll
#2  0x04ec4698 in ?? ()
#3  0x7421fb38 in python35!PyTupleIter_Type ()
   from C:\Users\Johaj\Desktop\activitywatch-0.8.0b8-prerelease\python35.dll
#4  0x00000000 in ?? ()
johan-bjareholt commented 5 years ago

Or maybe it's not actually pyinstaller but pywin32?

The IsGatewayRegistered function can be found here

https://github.com/mhammond/pywin32/blob/d64fac8d7bda2cb1d81e2c9366daf99e802e327f/com/win32com/src/Register.cpp#L214

johan-bjareholt commented 5 years ago

Not sure if it's pywin32 or pypiwin32 installed via PyInstalled though, the function exists in both.

https://github.com/Googulator/pypiwin32/blob/c8880b5b58bf0c86e59a8efecc93d87bbeab0c4b/com/win32com/src/Register.cpp#L214

Having trouble starting my windows VM currently...

ErikBjare commented 5 years ago

pypiwin32 hasn't been updated in two years, so my first guess is that it's actually a PyInstaller issue. Try rebuilding with an older, known to work, version of PyInstaller and if that doesn't do it we'll investigate further (which reminds me, we really need to start using dependency locks).

johan-bjareholt commented 5 years ago

PyInstaller 3.4 adds support for python3.7 and other goodies though so I want to track down the actual issue. I got my windows VM working again and have verified that aw-qt starts from source (I don't get a trayicon though for some reason?)

johan-bjareholt commented 5 years ago

If I build aw-qt myself locally I get another error:

Failed to execute script __main__

Maybe I'm just building it wrong though

EDIT: Got it working, same issue

johan-bjareholt commented 5 years ago

Hardcoding PyInstaller version to 3.3.1 instead of 3.4 fixes this issue. Doing this creates another issue with aw-server though, so it's not really a solution.

johan-bjareholt commented 5 years ago

Fixed the aw-server issue in https://github.com/ActivityWatch/aw-core/pull/75 so this is pretty much fixed, closing