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

LogClientTab: Use stand-alone logging class #489

Merged
merged 1 commit into from
Mar 23, 2021

Conversation

jonasdn
Copy link
Contributor

@jonasdn jonasdn commented Mar 18, 2021

When we use a QT widget as a Loghandler we get spooky actions at exit:

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python3.8/logging/__init__.py", line 2115, in shutdown
    h.close()
RuntimeError: wrapped C/C++ object of type LogClientTab has been deleted

Fixes: bitcraze/crazyflie-lib-python#210

When we use a QT widget as a Loghandlet we get spooky actions at exit:

```
Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "/usr/lib/python3.8/logging/__init__.py", line 2115, in shutdown
    h.close()
RuntimeError: wrapped C/C++ object of type LogClientTab has been deleted
```

Fixes: bitcraze/crazyflie-lib-python#210
Copy link
Contributor

@whoenig whoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to include this in the release, since this error message at shutdown is looking very bad for overall SW and QA quality.

class LogClientTab(Tab, log_client_tab_class, logging.StreamHandler):
class LogHandler(logging.StreamHandler):
def __init__(self, signal):
logging.StreamHandler.__init__(self)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is a scary way of doing it. I think recommended in Python3 would be super().init(), but in this particular case you should be able to just remove this line, since the ctor doesn't require any arguments.

@ataffanel
Copy link
Member

This looks good as is. Lets merge it to get rid of this crash in the new release.

@ataffanel ataffanel merged commit 7ecaa9f into bitcraze:master Mar 23, 2021
@ataffanel ataffanel added this to the next-release milestone Mar 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Client crashing when exiting
3 participants