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

RuntimeError when disconnecting monitors #11997

Closed
5 of 10 tasks
Cristianasp opened this issue Mar 26, 2020 · 2 comments · Fixed by #12008
Closed
5 of 10 tasks

RuntimeError when disconnecting monitors #11997

Cristianasp opened this issue Mar 26, 2020 · 2 comments · Fixed by #12008

Comments

@Cristianasp
Copy link

Cristianasp commented Mar 26, 2020

Issue Report Checklist

  • Searched the issues page for similar reports
  • Read the relevant sections of the Spyder Troubleshooting Guide and followed its advice
  • Reproduced the issue after updating with conda update spyder (or pip, if not using Anaconda)
  • Could not reproduce inside jupyter qtconsole (if console-related)
  • Tried basic troubleshooting (if a bug/error)
    • Restarted Spyder
    • Reset preferences with spyder --reset
    • Reinstalled the latest version of Anaconda
    • Tried the other applicable steps from the Troubleshooting Guide
  • Completed the Problem Description, Steps to Reproduce and Version sections below

Problem Description

Having a second monitor conected to my notebook via HDMI and running spyder in this second monitor, if I disconnect the hdmi monitor I got a "Spyder has encountered an internal problem".

Spyder does not crashs but it opens a issue reporter. Message is:

File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 1392, in handle_new_screen
self.screen.logicalDotsPerInchChanged.disconnect(
RuntimeError: wrapped C/C++ object of type QScreen has been deleted
Traceback (most recent call last):
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 1392, in handle_new_screen
self.screen.logicalDotsPerInchChanged.disconnect(
RuntimeError: wrapped C/C++ object of type QScreen has been deleted
Traceback (most recent call last):
File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 1392, in handle_new_screen
self.screen.logicalDotsPerInchChanged.disconnect(
RuntimeError: wrapped C/C++ object of type QScreen has been deleted

What steps reproduce the problem?

  1. Have a secondary monitor connected to your computer
  2. Have spyder ruuning in the secondary monitor
  3. Disconnect the HDMI monitor

What is the expected output? What do you see instead?

Paste Traceback/Error Below (if applicable)

  File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 1392, in handle_new_screen
    self.screen.logicalDotsPerInchChanged.disconnect(
RuntimeError: wrapped C/C++ object of type QScreen has been deleted
Traceback (most recent call last):
  File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 1392, in handle_new_screen
    self.screen.logicalDotsPerInchChanged.disconnect(
RuntimeError: wrapped C/C++ object of type QScreen has been deleted
Traceback (most recent call last):
  File "/home/cristiana/anaconda3/envs/fintools/lib/python3.8/site-packages/spyder/app/mainwindow.py", line 1392, in handle_new_screen
    self.screen.logicalDotsPerInchChanged.disconnect(
RuntimeError: wrapped C/C++ object of type QScreen has been deleted

Versions

  • Spyder version: 4.1.1
  • Python version: 3.8.1
  • Qt version:
  • PyQt version:
  • Operating System name/version: Ubuntu 18.04.4 LTS

Dependencies

PASTE DEPENDENCIES HERE
@ccordoba12
Copy link
Member

Thanks a lot for reporting @Cristianasp! This came right on time before releasing 4.1.2.

@steff456, this is another easy one for you: please add RuntimeError next to to TypeError below:

try:
self.screen.logicalDotsPerInchChanged.disconnect(
self.show_dpi_change_message)
except TypeError:
# See spyder-ide/spyder#11903
pass

@ccordoba12 ccordoba12 changed the title wrapped C/C++ object of type QScreen has been deleted RuntimeError when disconnecting monitors Mar 26, 2020
@Cristianasp
Copy link
Author

Cristianasp commented Mar 27, 2020

Glad to somehow contribute to this project @ccordoba12 !! :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
v4.1.2
Release
Development

Successfully merging a pull request may close this issue.

3 participants