question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Exception creating tray icon on mac

See original GitHub issue

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```

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
ErikBjarecommented, Jun 2, 2017

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 😉

0reactions
huantianadcommented, Nov 8, 2022

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

Read more comments on GitHub >

github_iconTop Results From Across the Web

java: TrayIcon right click disabled on Mac OsX - Stack Overflow
I'm trying to develop a Mac OsX app provided by a system tray icon, so after the first attempt with the simplest code...
Read more >
Can't make Tray Icon run on Mac OS Sierra - Support - Duplicati
For the life of me, I can't get the tray icon to run. Which, considering there is apparently no way to stop the...
Read more >
Big Sur: Detect Dark Tray/Menubar | Apple Developer Forums
Recently with the upgrade to Big Sur, the menu bar and system tray area goes light/dark based on the wallpaper, NOT based on...
Read more >
SystemTray icon on Mac OSX problem - IvoNet.nl
I want to have an icon in the SystemTray of Mac in order to sync some calendar stuff. ... public SystemTrayApp() throws Exception...
Read more >
How to Use the System Tray (The Java™ Tutorials > Creating ...
For example, an AWTException will be thrown by X-Window desktops if the system tray does not exist on the desktop. The TrayIcon class...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found