Problems starting with newest version, from repository

105 views
Skip to first unread message

matt

unread,
May 14, 2012, 11:29:44 AM5/14/12
to spyd...@googlegroups.com
Hey guys,

I just pulled the latest code from the repository and am having strange consequences.  I have tried with pyside and qt, but in both cases, the gui loads and then python stalls and has to be ended by Windows 7.  No error codes or anything, unless it gets hidden in a log somwhere

I am on a Windows 7 64 bit machine with python 2.7.  I have been enjoying spyder for quite a while on several machines.  Any idea what causes this or where I can look to find a clue?

Jed Ludlow

unread,
May 14, 2012, 11:39:26 AM5/14/12
to spyd...@googlegroups.com

Which repository are you running from? The default repository or the v21 repository?

Matt Anderson

unread,
May 14, 2012, 11:51:23 AM5/14/12
to spyd...@googlegroups.com
hg branch = default

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To post to this group, send email to spyd...@googlegroups.com.
To unsubscribe from this group, send email to spyderlib+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/spyderlib?hl=en.

Matt Anderson

unread,
May 14, 2012, 12:02:36 PM5/14/12
to spyd...@googlegroups.com
Sorry, I guess I could be on the default branch of 2.1...but no

I am on the default repository

Jed Ludlow

unread,
May 14, 2012, 12:08:12 PM5/14/12
to spyd...@googlegroups.com
On Mon, May 14, 2012 at 10:02 AM, Matt Anderson <ma...@archangel.com> wrote:
Sorry, I guess I could be on the default branch of 2.1...but no

I am on the default repository


On Mon, May 14, 2012 at 10:51 AM, Matt Anderson <ma...@archangel.com> wrote:
hg branch = default


On Mon, May 14, 2012 at 10:39 AM, Jed Ludlow <jed.l...@gmail.com> wrote:
On Mon, May 14, 2012 at 9:29 AM, matt <wmatta...@gmail.com> wrote:
Hey guys,

I just pulled the latest code from the repository and am having strange consequences.  I have tried with pyside and qt, but in both cases, the gui loads and then python stalls and has to be ended by Windows 7.  No error codes or anything, unless it gets hidden in a log somwhere

I am on a Windows 7 64 bit machine with python 2.7.  I have been enjoying spyder for quite a while on several machines.  Any idea what causes this or where I can look to find a clue?

Which repository are you running from? The default repository or the v21 repository?

Could you describe the failure in a bit more detail? Does Spyder get all the way to showing the full GUI, or does it hang during the splash screen? If it gets all the way to the GUI, do you see any messages in the internal console?

I would start simple. The first would be to run with the --debug option enabled:

bootstrap.py --gui pyqt -- --debug

This will dump more verbose debugging information to the Python console.

Matt Anderson

unread,
May 14, 2012, 12:26:38 PM5/14/12
to spyd...@googlegroups.com
The main gui fully loads, in debug mode it gets to ***end of main window setup*** and then gives a couple of warnings about already having imported pyflakes/rope and adding site-packages to the sys.path.

It actually crashes somewhere in the app.exec_() call of spyder.py(1868).  Around the time it lodes the object inspector(sometimes I see the object inspector details before it crashes, sometimes not).

--

Jed Ludlow

unread,
May 14, 2012, 1:43:31 PM5/14/12
to spyd...@googlegroups.com
On Mon, May 14, 2012 at 10:26 AM, Matt Anderson <ma...@archangel.com> wrote:
The main gui fully loads, in debug mode it gets to ***end of main window setup*** and then gives a couple of warnings about already having imported pyflakes/rope and adding site-packages to the sys.path.

It actually crashes somewhere in the app.exec_() call of spyder.py(1868).  Around the time it lodes the object inspector(sometimes I see the object inspector details before it crashes, sometimes not).


It would be very helpful if you could figure out which specific commit caused the problem. You were successfully running from source at one point, and now the latest changes are causing you problems. Are you familiar with hg bisect?

http://www.selenic.com/mercurial/hg.1.html#bisect

It's a bit easier to run from TortoiseHg, but it can be done from the command line, too. Would you be willing run a bisect and pinpoint the revision where the problem first shows up?

Matt Anderson

unread,
May 14, 2012, 3:46:16 PM5/14/12
to spyd...@googlegroups.com
The first bad revision is:
changeset:   2041:3bed38623049
parent:      2040:1cd7dc4233ce
parent:      2031:c27ddf06569e
user:        Carlos Cordoba <ccord...@gmail.com>
date:        Tue May 01 22:25:05 2012 -0500
summary:     Merge: Make Spyder start and work on non-ascii user accounts on Win
dows

Not all ancestors of this changeset have been checked.
Use bisect --extend to continue the bisection from
the common ancestor, aaddf3e325fa.

If I extend it, I get

The first bad revision is:
changeset:   2014:b5670c37c544
parent:      2012:aaddf3e325fa
user:        Pierre Raybaut <pierre....@gmail.com>
date:        Sun Apr 15 15:15:00 2012 +0200
summary:     Added memory and CPU usage status bar widgets (see Preferences/Gene
ral)

But somewhere in there between the two, and including 2014 the gui never loads at all(however, 2030 works).  2041 looks like a pretty big merge so I'm not sure how much that helps.

Matt

--

Carlos Córdoba

unread,
May 14, 2012, 4:59:03 PM5/14/12
to spyd...@googlegroups.com
Hi Matt,

Thanks for reporting the problem. I don't fully understand what's happening. Here are my questions to you:

1. Does Spyder freezes and you have to manually kill it? Or does it just crash before you can do something on it? If the case is the last one, do you receive a segfault warning on the console or you can see a Python traceback?

2. Does your windows account have non-ascii characters?

3. Could you reset your spyder settings and start afresh to see if that solves the problem? You can do it with:

python bootstrap.py -- --defaults

and if that doesn't work with

python bootstrap.py -- --reset

4. Please also tell us your exact Python and PyQt versions (Note that Spyder doesn't work too well with PySide and it usually segfaults).

Cheers,
Carlos

El 14/05/12 14:46, Matt Anderson escribió:

Matt Anderson

unread,
May 14, 2012, 5:18:43 PM5/14/12
to spyd...@googlegroups.com
On Mon, May 14, 2012 at 3:59 PM, Carlos Córdoba <ccord...@gmail.com> wrote:
Hi Matt,

Thanks for reporting the problem. I don't fully understand what's happening. Here are my questions to you:

1. Does Spyder freezes and you have to manually kill it? Or does it just crash before you can do something on it? If the case is the last one, do you receive a segfault warning on the console or you can see a Python traceback?

Spyder crashes 1-5 seconds after the >>> prompt loads.  If I am fast I can run something, but as it is running I get the windows message "Python.exe has stopped working" and have to click close.  There is no information in the console about the failure, even with debug mode.

2. Does your windows account have non-ascii characters?

My windows account name is matta, however my user folder is "matta.COMPANY" 

3. Could you reset your spyder settings and start afresh to see if that solves the problem? You can do it with:

python bootstrap.py -- --defaults

and if that doesn't work with

python bootstrap.py -- --reset

I have tried both of these and the results are the same, the only way I can successfully run Spyder is to revert

4. Please also tell us your exact Python and PyQt versions (Note that Spyder doesn't work too well with PySide and it usually segfaults).

PyQt version 4.7.4
Python 2.7.2 (default, Jun12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32

Cheers,
Carlos

Thanks for your time,

Matt 

Carlos Córdoba

unread,
May 14, 2012, 6:57:39 PM5/14/12
to spyd...@googlegroups.com
Thanks a lot for your quick reply. A couple more questions:

1. Does COMPANY has non-ascii characters?

2. Is your user folder mounted on a network drive?

Thanks,
Carlos

El 14/05/12 16:18, Matt Anderson escribió:

Matt Anderson

unread,
May 14, 2012, 8:52:38 PM5/14/12
to spyd...@googlegroups.com

1.  No

2.  No, it is c:/users/matta.COMPANY

Jed Ludlow

unread,
May 14, 2012, 11:50:43 PM5/14/12
to spyd...@googlegroups.com
On Mon, May 14, 2012 at 1:46 PM, Matt Anderson <ma...@archangel.com> wrote:
The first bad revision is:
changeset:   2041:3bed38623049
parent:      2040:1cd7dc4233ce
parent:      2031:c27ddf06569e
user:        Carlos Cordoba <ccord...@gmail.com>
date:        Tue May 01 22:25:05 2012 -0500
summary:     Merge: Make Spyder start and work on non-ascii user accounts on Win
dows

Not all ancestors of this changeset have been checked.
Use bisect --extend to continue the bisection from
the common ancestor, aaddf3e325fa.

If I extend it, I get

The first bad revision is:
changeset:   2014:b5670c37c544
parent:      2012:aaddf3e325fa
user:        Pierre Raybaut <pierre....@gmail.com>
date:        Sun Apr 15 15:15:00 2012 +0200
summary:     Added memory and CPU usage status bar widgets (see Preferences/Gene
ral)

But somewhere in there between the two, and including 2014 the gui never loads at all(however, 2030 works).  2041 looks like a pretty big merge so I'm not sure how much that helps.


Matt, this is a bit of a long shot, but I noticed that your integer revision numbers (not the long hex ones) don't match with what I obtain from a fresh clone of the repository. Would you mind pulling down a fresh clone to an empty directory to see what happens when you bootstrap from there? I have experienced the situation a couple of different times where my local clone somehow became corrupted, and a fresh pull made a difference.

anatoly techtonik

unread,
May 15, 2012, 6:04:12 AM5/15/12
to spyd...@googlegroups.com
Copy/paste bootstrap.py output here and look if there is spyder_crash.log in Spyder's directory.
I suspect that there might be problems with 64-bit versions of libraries.

Matt Anderson

unread,
May 15, 2012, 8:52:46 AM5/15/12
to spyd...@googlegroups.com
I shouldn't have used the revision numbers when talking about them, I forgot that they are for local reference only.   http://mercurial.selenic.com/wiki/RevisionNumber 

I tried a new clone anyway though, with the same result.

--
You received this message because you are subscribed to the Google Groups "spyder" group.
To view this discussion on the web visit https://groups.google.com/d/msg/spyderlib/-/Yt1MYo0OcoYJ.

anatoly techtonik

unread,
May 15, 2012, 9:03:50 AM5/15/12
to spyd...@googlegroups.com
Another idea is to try Spyder with empty virtualenv.
--
anatoly t.

Carlos Córdoba

unread,
May 15, 2012, 10:48:20 AM5/15/12
to spyd...@googlegroups.com
Ok, thanks for your answers and for your patience with all our suggestions and questions. I still don't know the source of the problem but here is another round of questions:

1. Maybe the problem has to do with the dot in matta.COMPANY. I don't know if it's possible for you to test Spyder with a different user folder.

2. Another problem could be that you have installed an old Spyder version (say 2.1.9) and that you're trying to run the latest one with bootstrap.py. A modules mismatch could cause the crash. If that's the case, please uninstall the old one.

3. Using hg bisect, what's *exactly* the last revision which gives you a functional Spyder? I'm sorry but it wasn't clear for me from your post. It would be really helpful if we could identify which commit from the ones I merged is the one giving you this trouble.

4. Please find the folder .spyder2 inside your user folder and inside it look for the file .spyder.ini. Then look for the lines:

open_python_at_startup
open_ipython_at_startup

and set them both to false. Then tell us what happens when you start Spyder again.

5. Please clone the latest 2.1 repo with:

$ hg clone https://code.google.com/p/spyderlib.v21/

and then tell us what happens when you try to run Spyder from this repo.

Thanks again for all your help.

Cheers,
Carlos

El 14/05/12 19:52, Matt Anderson escribió:

Jed Ludlow

unread,
May 15, 2012, 10:56:46 AM5/15/12
to spyd...@googlegroups.com

4. Please also tell us your exact Python and PyQt versions (Note that Spyder doesn't work too well with PySide and it usually segfaults).

PyQt version 4.7.4
Python 2.7.2 (default, Jun12 2011, 14:24:46) [MSC v.1500 64 bit (AMD64)] on win32

Cheers,
Carlos

Thanks for your time,

Matt 

 

That last little tidbit about 64-bit Python is critical information. I have reproduced this bug on a 64-bit Python install, and the problem appears to be related to the new Memory Usage widget that was added to the status bar. I'm not sure what the issue is yet, but could you try this experiment? Open your .spyder.ini file in your home directory and set the memory_usage/enable option to False like this:

memory_usage/enable = False

This resolved the problem for me. Please let us know how this goes.

Matt Anderson

unread,
May 15, 2012, 11:24:17 AM5/15/12
to spyd...@googlegroups.com
Jed wins the prize,

It looks like this function may not be any good on 64 bit systems (in utils\system.py)

def windows_memory_usage():
    """Return physical memory usage (float)
    Works on Windows platforms only"""
    from ctypes import windll
    from ctypes.wintypes import byref, Structure, DWORD
    class MemoryStatus(Structure):
        _fields_ = [('dwLength', DWORD), ('dwMemoryLoad', DWORD),
                    ('dwTotalPhys', DWORD), ('dwAvailPhys', DWORD),
                    ('dwTotalPageFile', DWORD), ('dwAvailPageFile', DWORD),
                    ('dwTotalVirtual', DWORD), ('dwAvailVirtual', DWORD),]
    memorystatus = MemoryStatus()
    windll.kernel32.GlobalMemoryStatus(byref(memorystatus))
    return float(memorystatus.dwMemoryLoad)

--

Jed Ludlow

unread,
May 15, 2012, 11:28:32 AM5/15/12
to spyd...@googlegroups.com
On Tue, May 15, 2012 at 9:24 AM, Matt Anderson <ma...@archangel.com> wrote:
Jed wins the prize,

It looks like this function may not be any good on 64 bit systems (in utils\system.py)

def windows_memory_usage():
    """Return physical memory usage (float)
    Works on Windows platforms only"""
    from ctypes import windll
    from ctypes.wintypes import byref, Structure, DWORD
    class MemoryStatus(Structure):
        _fields_ = [('dwLength', DWORD), ('dwMemoryLoad', DWORD),
                    ('dwTotalPhys', DWORD), ('dwAvailPhys', DWORD),
                    ('dwTotalPageFile', DWORD), ('dwAvailPageFile', DWORD),
                    ('dwTotalVirtual', DWORD), ('dwAvailVirtual', DWORD),]
    memorystatus = MemoryStatus()
    windll.kernel32.GlobalMemoryStatus(byref(memorystatus))
    return float(memorystatus.dwMemoryLoad)


Yes, running system.py as a script produces the same interpreter crash. Some days ctypes is your friend. Some days it isn't :).

Matt Anderson

unread,
May 15, 2012, 11:29:36 AM5/15/12
to spyd...@googlegroups.com
However, importing the windows_memory_usage function and calling it doesn't crash...mine returns 73

--

Matt Anderson

unread,
May 15, 2012, 11:33:25 AM5/15/12
to spyd...@googlegroups.com
Correction, calling it from spyder(a working spyder) doesn't crash.  Calling this function from python/ipython does cause a crash

Matt Anderson

unread,
May 15, 2012, 12:52:17 PM5/15/12
to spyd...@googlegroups.com
I think this is what you want...after come cleanup.  Test it on a 32 bit  http://msdn.microsoft.com/en-us/library/windows/desktop/aa366770(v=vs.85).aspx

I can put it in my clone if that's better

def windows_memory_usage():
    """Return physical memory usage (float)
    Works on Windows platforms only"""
    from ctypes import windll
    from ctypes.wintypes import byref, Structure, DWORD, sizeof
    import ctypes
    class MemoryStatus(Structure):
        _fields_ = [('dwLength', ctypes.c_uint32), ('dwMemoryLoad', ctypes.c_uint32),
                    ('dwlTotalPhys', ctypes.c_uint64), ('dwlAvailPhys', ctypes.c_uint64),
                    ('dwlTotalPageFile', ctypes.c_uint64), ('dwlAvailPageFile', ctypes.c_uint64),
                    ('dwlTotalVirtual', ctypes.c_uint64), ('dwlAvailVirtual', ctypes.c_uint64),
                    ('dwlAvailExtendedVirtual', ctypes.c_uint64),]
    memorystatus = MemoryStatus()
    memorystatus.dwLength = sizeof(MemoryStatus)
    windll.kernel32.GlobalMemoryStatusEx(byref(memorystatus))
    return float(memorystatus.dwMemoryLoad)

Jed Ludlow

unread,
May 15, 2012, 1:10:20 PM5/15/12
to spyd...@googlegroups.com
On Tue, May 15, 2012 at 10:52 AM, Matt Anderson <ma...@archangel.com> wrote:
I think this is what you want...after come cleanup.  Test it on a 32 bit  http://msdn.microsoft.com/en-us/library/windows/desktop/aa366770(v=vs.85).aspx

I can put it in my clone if that's better

def windows_memory_usage():
    """Return physical memory usage (float)
    Works on Windows platforms only"""
    from ctypes import windll
    from ctypes.wintypes import byref, Structure, DWORD, sizeof
    import ctypes
    class MemoryStatus(Structure):
        _fields_ = [('dwLength', ctypes.c_uint32), ('dwMemoryLoad', ctypes.c_uint32),
                    ('dwlTotalPhys', ctypes.c_uint64), ('dwlAvailPhys', ctypes.c_uint64),
                    ('dwlTotalPageFile', ctypes.c_uint64), ('dwlAvailPageFile', ctypes.c_uint64),
                    ('dwlTotalVirtual', ctypes.c_uint64), ('dwlAvailVirtual', ctypes.c_uint64),
                    ('dwlAvailExtendedVirtual', ctypes.c_uint64),]
    memorystatus = MemoryStatus()
    memorystatus.dwLength = sizeof(MemoryStatus)
    windll.kernel32.GlobalMemoryStatusEx(byref(memorystatus))
    return float(memorystatus.dwMemoryLoad)


No need to put it in the clone. This is perfect. Thanks for coming up with a fix! I'll do a little cleanup and submit it for pull to the main repo later today.

Jed Ludlow

unread,
May 15, 2012, 11:07:33 PM5/15/12
to spyd...@googlegroups.com
Issue report and links to the fix are posted here:

http://code.google.com/p/spyderlib/issues/detail?id=1028
Reply all
Reply to author
Forward
0 new messages