Opened 11 years ago

Closed 10 years ago

#39114 closed defect (wontfix)

py*-spyder crashes on startup after (unexpectedly) entering _tkinter.so

Reported by: watsodw Owned by: eborisch (Eric A. Borisch)
Priority: Normal Milestone:
Component: ports Version: 2.1.3
Keywords: Cc: joe.oboyle@…, petrrr
Port: py-spyder

Description

See attached file.

Attachments (3)

spyder.txt (4.5 KB) - added by watsodw 11 years ago.
Untitled.txt (5.9 KB) - added by watsodw 11 years ago.
error_msg.txt (45.4 KB) - added by joe.oboyle@… 10 years ago.
Error messages on spyder launch

Download all attachments as: .zip

Change History (25)

Changed 11 years ago by watsodw

Attachment: spyder.txt added

comment:1 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: eborisch@… removed
Owner: changed from macports-tickets@… to eborisch@…
Port: py-spyder added; py*-spyder removed

comment:2 Changed 11 years ago by eborisch (Eric A. Borisch)

Have you tried moving your ~/.spyder2-27 directory out of the way so it initializes with defaults?

I run spyder daily on 10.6.8, so I'm a little stuck here. You can try opening running spyder under pdb to see if we can narrow this down:

MacPro:~$ python
Python 2.7.3 (default, Oct 22 2012, 06:12:28) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdb
>>> pdb.run("from spyderlib import start_app\nstart_app.main()")
> <string>(1)<module>()
(Pdb) cont

comment:3 in reply to:  2 Changed 11 years ago by watsodw

Replying to eborisch@…:

Have you tried moving your ~/.spyder2-27 directory out of the way so it initializes with defaults?

I run spyder daily on 10.6.8, so I'm a little stuck here. You can try opening running spyder under pdb to see if we can narrow this down:

MacPro:~$ python
Python 2.7.3 (default, Oct 22 2012, 06:12:28) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import pdb
>>> pdb.run("from spyderlib import start_app\nstart_app.main()")
> <string>(1)<module>()
(Pdb) cont

That didn't help. Spyder failed with the same errors.

comment:4 Changed 11 years ago by eborisch (Eric A. Borisch)

Output of port echo active and rdepof:py27-spyder and xcodebuild --version ?

Changed 11 years ago by watsodw

Attachment: Untitled.txt added

comment:5 in reply to:  4 Changed 11 years ago by watsodw

Replying to eborisch@…:

Output of port echo active and rdepof:py27-spyder and xcodebuild --version ?

See attached Untitled.txt.

comment:6 Changed 11 years ago by watsodw

By the way, I just noticed that qt4-x11 is listed as a requirement for spyder, which I didn't have installed, but if I try to build it, I get an error saying that qt4-x11 is not supported on my OS. Is qt4-x11 really a requirement, or is this a mistake in the requirements list?

comment:7 Changed 11 years ago by ned-deily (Ned Deily)

The trace shows a crash in libtk8.6. Current upstream maintained Pythons (like 2.7) do not officially support Tk 8.6 yet. On top of that, AFAIK, the Cocoa Aqua Tk 8.6 (the MacPorts +quartz variant) has had little exposure on any version of OS X, much less 10.6. You *might* have better luck installing the X11 version of Tk (-quartz). If you do find a bug in either Tk 8.6 or Python's Tkinter using 8.6, it would be helpful to open an upstream issue as you are on the leading edge here.

comment:8 Changed 11 years ago by eborisch (Eric A. Borisch)

You might try py27-matplotlib -tkinter+qt4[+...] ... And the qt4-x11 is on the website listing (if I recall) as those lists are created on a Linux box.

comment:9 Changed 11 years ago by eborisch (Eric A. Borisch)

Try running SPYDER_DEBUG=1 spyder and see if that reveals anything else.

RE:nad's comment, if you use py-matplotlib -tkinter it shouldn't enter into libtk8.6 at all -- worth a shot. I haven't been able to reproduce yet. I don't have +universal versions installed, and my Xcode is newer (4.0.2) FWIW.

comment:10 Changed 10 years ago by eborisch (Eric A. Borisch)

Cc: joe.oboyle@… added

comment:11 Changed 10 years ago by joe.oboyle@…

Hi eborisch-

I ran the following:

sudo port self update
sudo port upgrade outdated

which updated py-spyder and py27-spyder to 2.2.5_2. When I run spyder, I continue to get the same error message. Please see attached error message.

Thanks! Joe

comment:12 Changed 10 years ago by eborisch (Eric A. Borisch)

Can you post the results of 'SPYDER_DEBUG=1 spyder-2.7' ? You might also try moving ~/.spyder2-27 out of the way and see how it does with fresh preferences folder.

I can't seem to recreate the crash, so hopefully this will provide some insight into what is happening.

comment:13 Changed 10 years ago by joe.oboyle@…

I've moved both ~/.spyder2/ and ~/.spyder2-27/ out of the way and run 'SPYDER_DEBUG=1 spyder-2.7'. Updated error messages attached. Thanks! Joe

comment:14 Changed 10 years ago by eborisch (Eric A. Borisch)

How about the output from DYLD_PRINT_LIBRARIES=1 spyder-2.7 ?

I'm still trying to figure out why it's entering _tkinter.so. With py27-matplotlib installed with -tkinter it really shouldn't be.

Thanks for your help!

Changed 10 years ago by joe.oboyle@…

Attachment: error_msg.txt added

Error messages on spyder launch

comment:15 Changed 10 years ago by joe.oboyle@…

I double checked py27-matplotlib. The installed version is

!555 [ ~ ] port echo installed |grep py27-mat
py27-matplotlib                @1.3.0_0+qt4 

I did an uninstall, clean, install cycle on py27-matplotlib with +qt4 -tkinter. The -tkinter appears to be by default, so isn't showing in the echo installed.

After reinstalling I did an uninstall, clean, install cycle on py{|27}-spyder. The error_msg.txt shows the results from running 'DYLD_PRINT_LIBRARIES=1 spyder-2.7'

Thanks! Joe

comment:16 Changed 10 years ago by hmeine (Hans Meine)

I have the same problem; I don't see yet why tkinter plays a role here at all. I don't need Tk/Tcl at all, and I would always prefer Qt4.

"port installed depends:py27-tkinter" gives:

The following ports are currently installed:
  py27-matplotlib @1.3.0_0+latex+qt4 (active)
  py27-opengl @3.0.2_0 (active)
  py27-pil @1.1.7_6 (active)

BTW: The ticket title is confusing; at least I am on 10.8.5.

comment:17 Changed 10 years ago by eborisch (Eric A. Borisch)

Can you try deactivating py27-opengl to see if spyder works with it deactivated?

comment:18 in reply to:  16 Changed 10 years ago by eborisch (Eric A. Borisch)

Summary: py*-spyder crashes on startup on 10.6.8py*-spyder crashes on startup after (unexpectedly) entering _tkinter.so

Replying to hans_meine@…:

I have the same problem; I don't see yet why tkinter plays a role here at all. I don't need Tk/Tcl at all, and I would always prefer Qt4.

Exactly. That's why the entrance into (and subsequent crash within) _tkinter.so is confusing in the traces.

Updated subject to make slightly less confusing.

What does ~/.matplotlib/matplotlibrc contain for those experiencing crashes?

comment:19 Changed 10 years ago by hmeine (Hans Meine)

I have only configured "backend : Qt4Agg" in matplotlibrc.

Yay! Deactivating py27-opengl helped! :-)

So how is py27-opengl loaded? Maybe through Qt? (I am using QtOpenGL in my own project successfully, but obviously spyder also uses pyobjc?)

comment:20 Changed 10 years ago by eborisch (Eric A. Borisch)

If you want to track it down, try this after re-enabling py27-opengl

python2.7 -m pdb `which spyder` 

when you get to the Pdb prompt, enter

b /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/OpenGL/__init__.py:177
cont

When it breaks on the line, print the backtrace ('bt').

Is the project where you are using it being edited in spyder? Perhaps when it is doing all of its magic to be able to intelligently edit the script, it runs the import (read in from your files) and crashes during that activity?

Glad to hear we have it narrowed down!

comment:21 Changed 10 years ago by petrrr

Cc: Peter.Danecek@… added

Cc Me!

comment:22 Changed 10 years ago by eborisch (Eric A. Borisch)

Resolution: wontfix
Status: newclosed

Closing; issues were not with spyder, but Tk.

Note: See TracTickets for help on using tickets.