On 2009-11-12 12:05 PM, Andrew Straw wrote:
> Celil Rufat wrote:
>> I just installed matplotlib on Snow Leopard 10.6 with the Qt4 backend
>> (via macports). However, when I try one of the Qt4 examles:
>>
>> python
>> /opt/local/share/py26-matplotlib/examples/user_interfaces/embedding_in_qt4.py
>>
>>
>> IOError: [Errno 4] Interrupted system call
>>
>> Any ideas on what could be causing this?
> Out of curiosity, does anyone know where the signal interrupting the
> system call is originating? Is this a standard communication mechanism
> within Qt4? (I have never used Qt4.) I'm interested in knowing about OSS
> that use signals as a means of across-thread or across-process
> communication.

This problem arises when signal handlers are installed, not necessarily when a 
signal itself is sent (dtrace doesn't detect any). PyQt4 doesn't do it, but I 
think something in QApplication does. I really don't know what, though. Here 
are 
the files that call signal(3) or sigaction(3):

./src/3rdparty/freetype/src/tools/ftrandom/ftrandom.c
./src/3rdparty/phonon/qt7/quicktimevideoplayer.mm
./src/3rdparty/sqlite/shell.c
./src/3rdparty/webkit/JavaScriptCore/jsc.cpp
./src/corelib/io/qfilesystemwatcher_dnotify.cpp
./src/corelib/io/qprocess_unix.cpp
./src/corelib/kernel/qcrashhandler.cpp
./src/corelib/kernel/qeventdispatcher_unix.cpp
./src/gui/embedded/qwindowsystem_qws.cpp
./src/gui/embedded/qwssignalhandler.cpp
./tools/qvfb/main.cpp

It's not obvious to me that any of these are activated on OS X (the 
qcrashhandler.cpp file is intriguing, but it only seems to be used in the X11 
QApplication). dtrace doesn't actually show either signal(3) or sigaction(3) 
being called at all. Actually, running a program under dtrace while probing 
those functions makes the problem go away. Sometimes.

-- 
Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to