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

Launching preferences crashes Spyder when using PySide #2567

Closed
aleksandaratanasov opened this issue Jul 28, 2015 · 15 comments
Closed

Launching preferences crashes Spyder when using PySide #2567

aleksandaratanasov opened this issue Jul 28, 2015 · 15 comments

Comments

@aleksandaratanasov
Copy link

Hi!

I have the latest version of Spyder (master branch) and I'm starting it via the bootstrap.py script. My setup is Ubuntu 14.04 (64bit) with 3.13.0 kernel, up-to-date software.

Reproduce:

  • start Spyder (in my case via bootstrap.py)
  • click on the Preference item in the main menu

What is expected to happen:
Opens Spyder's preferences window

What happens:
Spyder crashes with segmentation fault (core dumped) error

I saw there was an issue in 2014 (#1903) where the IDE crashed when using the preferences though the issue has been closed and it's also not very clear what the issue was or how to reproduce it so this might either be this same issue or a new one.

@ccordoba12
Copy link
Member

Please try to run

spyder --reset

and try again. That should solve the problem.

@aleksandaratanasov
Copy link
Author

Thanks for the fast reply. I can't run spyder just like this because it cannot find the spyderlib. That is why I'm using the bootstrap.py in the first place. ;)

I would have installed it but my user is not part of the sudo group so I have to deal with the bootstrapping thing. Any ideas how to go around it?

@ccordoba12
Copy link
Member

Sorry, I didn't notice that you mentioned you're using bootstrap :-)

In that case you need to run

python bootstrap.py -- --reset

to reset your preferences.

@aleksandaratanasov
Copy link
Author

Sorry for the late reply but I didn't have access to the machine where I have this problem on. I tried your suggestion, it reset the settings yet Spyder still crashes. Btw I have this error message all the time while the IDE is running:

X Error: BadCursor (invalid Cursor parameter) 6
  Major opcode: 2 (X_ChangeWindowAttributes)
  Resource id: 0x3

When I load something the opcode changes to 95. Don't know if this has anything to do with the crash though but I thought it might be useful information.

@ccordoba12 ccordoba12 modified the milestones: v3.1, v3.0 Aug 15, 2015
@ccordoba12 ccordoba12 modified the milestones: v3.1, wishlist Nov 16, 2015
@ccordoba12 ccordoba12 changed the title [master] Launching preferences in a bootstrapped Spyder crashes the IDE Launching preferences in crashes Spyder when using PySide Nov 16, 2015
@ccordoba12
Copy link
Member

This is a problem with PySide, as I discovered some time ago. So please use Spyder with PyQt4 or PyQt5.

We won't support PySide officially since Spyder 3.0, although we will try to fix major issues like this one.

@Nodd
Copy link
Contributor

Nodd commented Nov 17, 2015

I encountered crashes with pyside when the underlying C++ object was destroyed, but not the python object. I don't remember the details though...

@Nodd
Copy link
Contributor

Nodd commented Nov 17, 2015

After some googling (googleing ?) I found that python's gc and qt's gc are sometimes interacting with each other. It's fixed by keeping a reference to some temporary objects, but it'll be hard to find the correct one.
See for example:
http://stackoverflow.com/questions/19211430/pyside-segfault-when-using-qitemselectionmodel-with-qlistview
http://stackoverflow.com/questions/27928807/pyside-segfault-on-shutdown

@goanpeca
Copy link
Member

@Nodd It was working before, so we can bisect and see what has changed since then...

@ccordoba12 ccordoba12 changed the title Launching preferences in crashes Spyder when using PySide Launching preferences crashes Spyder when using PySide Nov 17, 2015
@aleksandaratanasov
Copy link
Author

Frankly I am surprised that Spyder actually runs PySide. I didn't even know it was installed on the system I'm working on. Is there a way to tell bootstrap to use PyQt instead? I haven't written a single application with PySide and since Spyder crashes when it uses it I see no reason why no prevent it from looking for it to begin with.

@ccordoba12
Copy link
Member

We supported PySide until Spyder 2.3, but we decided to drop official support for it since 3.0. This means that the core team is not going to solve more bugs related to PySide, and instead we expect the community helps us to maintain it.

To use bootstrap with another binding, you need to pass to it the gui option, like this

python bootstrap --gui=pyqt5

(pyqt5 will be our default option for Spyder 3) or

python bootstrap --gui=pyqt

@aleksandaratanasov
Copy link
Author

Thanks, will do that.

@CAM-Gerlach
Copy link
Member

@ccordoba12 Can we close this, now that we haven't supported PySide for a long time, and it seems unlikely anyone really uses it anymore at least with Spyder 3.x+? This is the last remaining issued tagged PySide, and with it we could close out the tag. Also, at some point would it be a good idea to go through our 600+ open issues and remove any that are no longer valid or relevant? Thanks!

@ccordoba12 ccordoba12 removed this from the wishlist milestone Jan 30, 2018
@ccordoba12
Copy link
Member

Yep, we can.

@ccordoba12
Copy link
Member

Also, at some point would it be a good idea to go through our 600+ open issues and remove any that are no longer valid or relevant?

Oh yeah, that would help us a lot!

@CAM-Gerlach
Copy link
Member

CAM-Gerlach commented Jan 30, 2018

Cool, thanks. I'll go through them after my key tasks for 3.2.7 are complete.

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

5 participants