[TxMt] Re: matplotlib - Re: textmate Digest, Vol 20, Issue 11

Claus clausenator at gmail.com
Mon Jan 11 11:19:02 UTC 2010


here is the content of "sample <pid>"
for pid=1835:
Analysis of sampling python (pid 1835) every 1 millisecond
Call graph:
    8725 Thread_29112   DispatchQueue_1: com.apple.main-thread
(serial)
      8725 start
        8725 Py_Main
          8725 PyRun_SimpleFileExFlags
            8725 PyRun_FileExFlags
              8725 PyEval_EvalCode
                8725 PyEval_EvalCodeEx
                  8725 PyEval_EvalFrameEx
                    8725 PyEval_EvalCodeEx
                      8725 PyEval_EvalFrameEx
                        8725 PyObject_Call
                          8725 function_call
                            8725 PyEval_EvalCodeEx
                              8725 PyEval_EvalFrameEx
                                8725 PyObject_Call
                                  8725 type_call
                                    8725 slot_tp_init
                                      8725 PyObject_Call
                                        8725 instancemethod_call
                                          8725 PyObject_Call
                                            8725 function_call
                                              8725 PyEval_EvalCodeEx
                                                8725
PyEval_EvalFrameEx
                                                  8725 PyObject_Call
                                                    8725
wrapperdescr_call
                                                      8725
PyEval_CallObjectWithKeywords
                                                        8725
PyObject_Call
                                                          8725
wrap_init
                                                            8725
FigureManager_init
                                                              8725 -
[NSWindow makeKeyAndOrderFront:]
                                                                8725 -
[NSWindow orderWindow:relativeTo:]
                                                                  8725
-[NSWindow
_reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
 
8725 -[NSView displayIfNeeded]
 
8725 -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
 
8725 -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 
8725 -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 
8725 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
 
8725 -[NSView _drawRect:clip:]
 
8725 -[NSThemeFrame drawRect:]
 
8725 -[NSFrameView drawRect:]
 
8725 -[NSThemeFrame drawFrame:]
 
8725 -[NSThemeFrame _drawTitleBar:]
 
8725 -[NSTitledFrame _drawTitleStringIn:withColor:]
 
8725 -[NSThemeFrame _titlebarTitleRect]
 
8725 -[NSWindow _customTitleFrame]
 
8725 -[NSThemeFrame _defaultTitlebarTitleRect]
 
8725 -[NSTitledFrame _titleCellSize]
 
8725 -[NSCell cellSize]
 
8725 -[NSTextFieldCell cellSizeForBounds:]
 
8725 -[NSCell cellSizeForBounds:]
 
8725 _NSGetTextCellBoundingRect
 
8725 -[NSString(NSExtendedStringDrawing)
boundingRectWithSize:options:attributes:]
 
8725 +[NSStringDrawingTextStorage
_fastDrawString:attributes:length:inRect:graphicsContext:baselineRendering:usesFontLeading:usesScreenFont:typesetterBehavior:paragraphStyle:lineBreakMode:boundingRect:padding:scrollable:]
 
8725 -[NSFont _latin1MappingTable:]
 
8725 -[__NSFontTypefaceInfo
_latin1MappingTableWithPlatformFont:hasKernPair:]
 
8725 CTFontGetGlyphsForCharacters
 
8725 TBaseFont::GetGlyphsForCharacters(unsigned short const*, unsigned
short*, long) const
 
8725 TcmapTable::TcmapTable(TBaseFont const&)
 
8725 TBaseFont::CopyTable(unsigned int) const
 
8725 TBaseFont::CopyNativeFont() const
 
8725 TCGFontCache::CopyFont(__CFURL const*) const
 
8725 TCGFont::TCGFont(__CFURL const*, bool)
 
8725 CGFontCreateFontsWithURL
 
8725 CGFontCreateFontsWithPath
 
8725 ats_font_create_private_data_with_path
 
8725 ats_font_ref_create_with_path
 
8725 ATSFontActivateFromFileReference
 
8725 _eATSFontActivateFromFileReference
 
8725 SendActivateFontsMessage
 
8725 XTRegisterFont
 
8725 XTRegisterFonts
 
8725 TLocalFontRegistry::RegisterFonts(__CFArray const*,
__CFDictionary const*, unsigned int, unsigned int, __CFArray const**)
const
 
8725 TLocalFontRegistryImp::RegisterFonts(__CFArray const*,
__CFDictionary const*, unsigned int, unsigned int, __CFArray const**)
const
 
8725 TLocalFontRegistryImp::RegisterFont(__CFURL const*,
__CFDictionary const*, unsigned int, unsigned int) const
 
8725 CreateFontsFromURL(__CFURL const*)
 
8725 CGFontCreateFontsWithURL
 
8725 CGFontCreateFontsWithPath
 
8725 ats_font_create_private_data_with_path
 
8725 ats_font_ref_create_with_path
 
8725 ATSFontActivateFromFileReference
 
8725 _eATSFontActivateFromFileReference
 
8725 SendActivateFontsMessage
 
8725 TSReaderToWriter
 
8725 TSWaitOnCondition
 
8725 _pthread_cond_wait
 
8725 __semwait_signal
    8725 Thread_29122   DispatchQueue_2: com.apple.libdispatch-
manager  (serial)
      8725 start_wqthread
        8725 _pthread_wqthread
          8725 _dispatch_worker_thread2
            8725 _dispatch_queue_invoke
              8725 _dispatch_mgr_invoke
                8725 kevent

Total number in stack (recursive counted multiple, when >=5):
        6       PyObject_Call

Sort by top of stack, same collapsed (when >= 5):
        __semwait_signal        8725
        kevent        8725








and for pid=1812:

Analysis of sampling python (pid 1812) every 1 millisecond
Call graph:
    8706 Thread_28814   DispatchQueue_1: com.apple.main-thread
(serial)
      8706 start
        8706 Py_Main
          8706 PyRun_SimpleFileExFlags
            8706 PyRun_FileExFlags
              8706 PyEval_EvalCode
                8706 PyEval_EvalCodeEx
                  8706 PyEval_EvalFrameEx
                    8706 PyEval_EvalCodeEx
                      8706 PyEval_EvalFrameEx
                        8706 PyObject_Call
                          8706 function_call
                            8706 PyEval_EvalCodeEx
                              8706 PyEval_EvalFrameEx
                                8706 PyObject_Call
                                  8706 type_call
                                    8706 slot_tp_init
                                      8706 PyObject_Call
                                        8706 instancemethod_call
                                          8706 PyObject_Call
                                            8706 function_call
                                              8706 PyEval_EvalCodeEx
                                                8706
PyEval_EvalFrameEx
                                                  8706 PyObject_Call
                                                    8706
wrapperdescr_call
                                                      8706
PyEval_CallObjectWithKeywords
                                                        8706
PyObject_Call
                                                          8706
wrap_init
                                                            8706
FigureManager_init
                                                              8706 -
[NSWindow makeKeyAndOrderFront:]
                                                                8706 -
[NSWindow orderWindow:relativeTo:]
                                                                  8706
-[NSWindow
_reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:]
 
8706 -[NSView displayIfNeeded]
 
8706 -[NSView
_displayRectIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:]
 
8706 -[NSThemeFrame
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 
8706 -[NSView
_recursiveDisplayRectIfNeededIgnoringOpacity:isVisibleRect:rectIsVisibleRectForView:topView:]
 
8706 -[NSView _recursiveDisplayAllDirtyWithLockFocus:visRect:]
 
8706 -[NSView _drawRect:clip:]
 
8706 -[NSThemeFrame drawRect:]
 
8706 -[NSFrameView drawRect:]
 
8706 -[NSThemeFrame drawFrame:]
 
8706 -[NSThemeFrame _drawTitleBar:]
 
8706 -[NSTitledFrame _drawTitleStringIn:withColor:]
 
8706 -[NSThemeFrame _titlebarTitleRect]
 
8706 -[NSWindow _customTitleFrame]
 
8706 -[NSThemeFrame _defaultTitlebarTitleRect]
 
8706 -[NSTitledFrame _titleCellSize]
 
8706 -[NSCell cellSize]
 
8706 -[NSTextFieldCell cellSizeForBounds:]
 
8706 -[NSCell cellSizeForBounds:]
 
8706 _NSGetTextCellBoundingRect
 
8706 -[NSString(NSExtendedStringDrawing)
boundingRectWithSize:options:attributes:]
 
8706 +[NSStringDrawingTextStorage
_fastDrawString:attributes:length:inRect:graphicsContext:baselineRendering:usesFontLeading:usesScreenFont:typesetterBehavior:paragraphStyle:lineBreakMode:boundingRect:padding:scrollable:]
 
8706 -[NSFont _latin1MappingTable:]
 
8706 -[__NSFontTypefaceInfo
_latin1MappingTableWithPlatformFont:hasKernPair:]
 
8706 CTFontGetGlyphsForCharacters
 
8706 TBaseFont::GetGlyphsForCharacters(unsigned short const*, unsigned
short*, long) const
 
8706 TcmapTable::TcmapTable(TBaseFont const&)
 
8706 TBaseFont::CopyTable(unsigned int) const
 
8706 TBaseFont::CopyNativeFont() const
 
8706 TCGFontCache::CopyFont(__CFURL const*) const
 
8706 TCGFont::TCGFont(__CFURL const*, bool)
 
8706 CGFontCreateFontsWithURL
 
8706 CGFontCreateFontsWithPath
 
8706 ats_font_create_private_data_with_path
 
8706 ats_font_ref_create_with_path
 
8706 ATSFontActivateFromFileReference
 
8706 _eATSFontActivateFromFileReference
 
8706 SendActivateFontsMessage
 
8706 XTRegisterFont
 
8706 XTRegisterFonts
 
8706 TLocalFontRegistry::RegisterFonts(__CFArray const*,
__CFDictionary const*, unsigned int, unsigned int, __CFArray const**)
const
 
8706 TLocalFontRegistryImp::RegisterFonts(__CFArray const*,
__CFDictionary const*, unsigned int, unsigned int, __CFArray const**)
const
 
8706 TLocalFontRegistryImp::RegisterFont(__CFURL const*,
__CFDictionary const*, unsigned int, unsigned int) const
 
8706 CreateFontsFromURL(__CFURL const*)
 
8706 CGFontCreateFontsWithURL
 
8706 CGFontCreateFontsWithPath
 
8706 ats_font_create_private_data_with_path
 
8706 ats_font_ref_create_with_path
 
8706 ATSFontActivateFromFileReference
 
8706 _eATSFontActivateFromFileReference
 
8706 SendActivateFontsMessage
 
8706 TSReaderToWriter
 
8706 TSWaitOnCondition
 
8706 _pthread_cond_wait
 
8706 __semwait_signal
    8706 Thread_28824   DispatchQueue_2: com.apple.libdispatch-
manager  (serial)
      8706 start_wqthread
        8706 _pthread_wqthread
          8706 _dispatch_worker_thread2
            8706 _dispatch_queue_invoke
              8706 _dispatch_mgr_invoke
                8706 kevent

Total number in stack (recursive counted multiple, when >=5):
        6       PyObject_Call

Sort by top of stack, same collapsed (when >= 5):
        __semwait_signal        8706
        kevent        8706


On Jan 11, 10:44 am, Claus <clausena... at gmail.com> wrote:
> The simplest "program" is two lines long -- the problems are related to matplotlib only:
> import matplotlib.pyplot as plt
> plt.figure()
>
> I set the environment variable TM_PYTHON to /sw/bin/python
> In Terminal, "which ipython" returns /sw/bin/ipython
> If I execute both lines in ipython, the matplotlib window pops up, as expected.
> While my two-line script is running in TextMate,
> ps -Am
> returns two (why two?) python processes:
>  1835 ??         0:00.83 /sw/bin/python -u /Users/claushaslauer/Desktop/present work/test/mtplTest.py
>  1812 ??         0:00.89 /sw/bin/python -u /Users/claushaslauer/Desktop/present work/test/mtplTest.py
>
> sampling those two processes results in essentially identical files, only difference is the number in front of each line. I attached both files, because I can't interpret them.
>
> For matplotlib:
> In [3]: matplotlib.__version__
> Out[3]: '1.0.svn'
> installed viahttp://macinscience.org/?page_id=6
>
> Does this point to any issue?
> Thanks,
> Claus
>
> On 2010-01-10, at 4:35 PM, textmate-requ... at lists.macromates.com wrote:
>
>
>
> > Message: 6
> > Date: Sun, 10 Jan 2010 15:59:02 +0100
> > From: Allan Odgaard <mailingl... at textmate.org>
> > Subject: [TxMt] Re: still problems with matplotlib
> > To: TextMate users <textm... at lists.macromates.com>
> > Message-ID: <4DF5B26D-1A4B-4F45-89E7-94A5C7DF9... at textmate.org>
> > Content-Type: text/plain; charset=WINDOWS-1252; format=flowed;
> >    delsp=yes
>
> > On 10 Jan 2010, at 14:04, Claus wrote:
>
> >> I removed the tm_interactive_input.dylib, however TM (python bundle  
> >> -- run script) is still keeps running for a long time until I "stop  
> >> task", no error message.
>
> >> Does anybody have other ideas?
>
> > Run ps/pstree to see if Python is running.
>
> > Use ?sample ?pid?? to sample the python process, that might give an  
> > idea of why it is stalling.
>
> > Try minimize your script to the smallest possible that can reproduce  
> > the problem.
>
> > ------------------------------
>
>
>
> _______________________________________________
> textmate mailing list
> textm... at lists.macromates.comhttp://lists.macromates.com/listinfo/textmate



More information about the textmate mailing list