Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception creating tray icon on mac #62

Closed
theguybieber opened this issue Jun 2, 2017 · 10 comments
Closed

Exception creating tray icon on mac #62

theguybieber opened this issue Jun 2, 2017 · 10 comments

Comments

@theguybieber
Copy link

theguybieber commented Jun 2, 2017

I get the following error creating a tray icon on the mac:

(venv) Guys-MacBook-Pro:activitywatch guybieber$ aw-qt
INFO:aw.qt.manager:Starting module aw-server
INFO:aw.qt.manager:Starting module aw-watcher-afk
INFO:aw.qt.manager:Starting module aw-watcher-window
INFO:root:Creating trayicon...
2017-06-02 07:11:57.228 Python[29273:1089314] *** Assertion failure in -[NSBitmapImageRep initWithCGImage:], /Library/Caches/com.apple.xbs/Sources/AppKit/AppKit-1504.82.104/AppKit.subproj/NSBitmapImageRep.m:1296
2017-06-02 07:11:57.266 Python[29273:1089314] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Invalid parameter not satisfying: cgImage != NULL'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fffa550962b __exceptionPreprocess + 171
	1   libobjc.A.dylib                     0x00007fffba7461da objc_exception_throw + 48
	2   CoreFoundation                      0x00007fffa550e182 +[NSException raise:format:arguments:] + 98
	3   Foundation                          0x00007fffa6f74ce0 -[NSAssertionHandler handleFailureInMethod:object:file:lineNumber:description:] + 195
	4   AppKit                              0x00007fffa30c9986 -[NSBitmapImageRep initWithCGImage:] + 149
	5   QtGui                               0x0000000104cbaabd _Z21qt_mac_create_nsimageRK5QIconi + 525
	6   libqcocoa.dylib                     0x00000001078e6fda qt_plugin_instance + 154170
	7   libqcocoa.dylib                     0x00000001078e4197 qt_plugin_instance + 142327
	8   QtWidgets                           0x00000001045ba9e9 _ZN5QMenu15setPlatformMenuEP13QPlatformMenu + 537
	9   QtWidgets                           0x00000001047c52cd _ZN15QSystemTrayIcon14messageClickedEv + 909
	10  QtWidgets                           0x00000001047c51ca _ZN15QSystemTrayIcon14messageClickedEv + 650
	11  QtWidgets.so                        0x000000010405986c _ZL35meth_QSystemTrayIcon_setContextMenuP7_objectS0_ + 108
	12  Python                              0x000000010006a688 _PyCFunction_FastCallDict + 568
	13  Python                              0x00000001000f33e4 call_function + 612
	14  Python                              0x00000001000f8d84 _PyEval_EvalFrameDefault + 21892
	15  Python                              0x00000001000f27a0 _PyEval_EvalCodeWithName + 2720
	16  Python                              0x00000001000f3636 _PyFunction_FastCallDict + 422
	17  Python                              0x000000010000e984 _PyObject_FastCallDict + 356
	18  Python                              0x000000010000eaa0 _PyObject_Call_Prepend + 208
	19  Python                              0x000000010000e5b3 PyObject_Call + 99
	20  Python                              0x0000000100089871 slot_tp_init + 81
	21  Python                              0x0000000100080144 type_call + 212
	22  Python                              0x000000010000e8d4 _PyObject_FastCallDict + 180
	23  Python                              0x000000010000ed00 _PyObject_FastCallKeywords + 288
	24  Python                              0x00000001000f3225 call_function + 165
	25  Python                              0x00000001000f7aa0 _PyEval_EvalFrameDefault + 17056
	26  Python                              0x00000001000f27a0 _PyEval_EvalCodeWithName + 2720
	27  Python                              0x00000001000f2fab fast_function + 219
	28  Python                              0x00000001000f33cb call_function + 587
	29  Python                              0x00000001000f7aa0 _PyEval_EvalFrameDefault + 17056
	30  Python                              0x00000001000f312e fast_function + 606
	31  Python                              0x00000001000f33cb call_function + 587
	32  Python                              0x00000001000f8d84 _PyEval_EvalFrameDefault + 21892
	33  Python                              0x00000001000f27a0 _PyEval_EvalCodeWithName + 2720
	34  Python                              0x00000001000f2944 PyEval_EvalCode + 100
	35  Python                              0x000000010012f21e PyRun_FileExFlags + 206
	36  Python                              0x000000010012f4bf PyRun_SimpleFileExFlags + 447
	37  Python                              0x0000000100148ada Py_Main + 3914
	38  Python                              0x0000000100000dfe Python + 3582
	39  Python                              0x0000000100000c34 Python + 3124
	40  ???                                 0x0000000000000002 0x0 + 2
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6```
@theguybieber
Copy link
Author

Though all three processes are running the browser interface doesn't seem to do much. Perhaps due to the error above.

activitywatch

@ErikBjare
Copy link
Member

ErikBjare commented Jun 2, 2017 via email

@ErikBjare
Copy link
Member

Found this eerily similar bug: OtterBrowser/otter-browser#1313

I have a potential fix in ActivityWatch/aw-qt#15

@theguybieber
Copy link
Author

The system is collecting data and I can view it under activity then clicking my macbook. Very cool. It would be cool if the main page went right to the data and also showed the status of the service (right now it shows all the status options).

@theguybieber
Copy link
Author

I get it the status stuff is a placeholder.

@ErikBjare
Copy link
Member

Yeah, I agree. The start page is something we'll have to design better.

@ErikBjare
Copy link
Member

So, I did a lot of work in order to eliminate future problems like this.

So, fixed! Thanks for being our macOS bug catcher @theguybieber ;)

@huantianad
Copy link

Are the changes in ActivityWatch/aw-qt#15 still needed? It seems the qt bug causing the issue mentioned in OtterBrowser/otter-browser#1313 has also been fixed.

Only noticed this issue when packaging aw for NixOS, where I had to add the qtsvg library to have the icon show up. Maybe that could be noted as a dependency on Linux?

@ErikBjare
Copy link
Member

@huantianad Wouldn't surprise me if this has been fixed and the workaround is no longer needed as we've switched from PyQt4 to PyQt6 since.

@huantianad
Copy link

Perhaps someone on macOS could test if this workaround is still needed?

vasuemme111 pushed a commit to vasuemme111/activitywatch that referenced this issue Mar 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants