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.

Crashes on Linux in Log class

See original GitHub issue

It crashes for me on my headless Linux server because the Log class tries to access pyoslog.is_supported() while the corresponding import is only called on darwin. This was introduced by line 130 in a9d8923533f0c119eeb0b00a7875aed862d72736.

I also suggest adding a try - except block around the pystray import, as I’m on a system where the dummy backend is broken.

Edit: This doesn’t work. RetinaIcon requires pystray to be loaded, so I’ll have to fix my system.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
andyboehcommented, May 24, 2022

The problem is that pystray.Icon is passed to the class. Python seems to parse this before actually starting the script and this is why it fails. It was very straightforward to set up a virtualenv with pystray == 0.18.0 and this works as expected.

0reactions
simonrobcommented, Jun 4, 2022

Just to follow up - b69c23b makes these entire classes conditional on the platform, and they are ignored except on macOS - you should now be able to skip that import with no other issues. (Though still better I think to just install the package so no script edits are required)

Read more comments on GitHub >

github_iconTop Results From Across the Web

How can we trace problems of crashing programs in Linux?
Linux provides a way for a daemon to be notified of process crashes. Ubuntu's apport and Red Hat's abrt use this to provide...
Read more >
linux - How to determine cause of system crash? - Server Fault
I have checked /var/log/messages and it just stops recording at some point and starts at the computer post information when I perform a...
Read more >
crash(8) - Linux manual page - man7.org
Crash is a tool for interactively analyzing the state of the Linux system while it is running, or after a kernel crash has...
Read more >
Why crash inside boost log when program terminate
My application is running on linux. In class destructor, I have log printing. The core file shows that that is the crashing point....
Read more >
Fatal Error Log - Troubleshooting Guide for HotSpot VM
When a fatal error occurs, an error log is created with information and the state ... This example shows that the VM crashed...
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