<html>
<head>
</head>
<body>
Phil Thompson wrote:<br>
<blockquote type="cite" cite="mid:3CC45D26.A7FCF3C6@river-bank.demon.co.uk">
<pre wrap="">Laurent Claustre wrote:<br></pre>
<blockquote type="cite">
<pre wrap="">I've upgraded my PyQt/sip installation to 3.2rc2 nevertheless the<br>problem is quite similar. Any idea?<br><br>Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24)<br>[GCC 2.95.2 19991024 (release)] on hp-uxB<br>Type "copyright", "credits" or "license" for more information.<br></pre>
<blockquote type="cite">
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">import qt<br></pre>
</blockquote>
</blockquote>
</blockquote>
<pre wrap="">Traceback (most recent call last):<br> File "<stdin>", line 1, in ?<br> File<br>"/segfs/bliss/depot/pythonesrf_5.0/hpux102/lib/python2.1/site-packages/qt.py",<br>line 935, in ?<br> libqtc.sipRegisterClasses()<br>RuntimeError: Attempt to create a Python instance for a NULL pointer<br></pre>
</blockquote>
<pre wrap=""><!----><br>All I can suggest is to add printf()s in sipAddClassInstances() (in<br>siplib.c) to work out the instance that's failing.<br><br>Before the call to sipNewCppToSelf() print the value of ci->ci_name to<br>determine the class, then look up the table for that class in<br>registerClasses() in qtcmodule.cpp to find the instance.<br><br>The odd thing is that the relevant value is always the address of a Qt<br>object, which implies a linker problem.<br><br>Phil<br></pre>
</blockquote>
OK,<br>
the failed instance is "whatsThisCursor" and from within registerClasses()
instance is Qt::whatsThisCursor.<br>
this is the output:<br>
Python 2.1.1c1 (#13, Jul 23 2001, 11:03:24) <br>
[GCC 2.95.2 19991024 (release)] on hp-uxB<br>
Type "copyright", "credits" or "license" for more information.<br>
>>> import qt<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = qApp<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = null<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = nbsp<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = byteOrderSwapped<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = byteOrderMark<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = replacement<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = null<br>
laurentDebugging in siplib.c:sipAddClassInstances(), ci->ci_name = whatsThisCursor<br>
Traceback (most recent call last):<br>
File "<stdin>", line 1, in ?<br>
File "qt.py", line 935, in ?<br>
libqtc.sipRegisterClasses()<br>
RuntimeError: Attempt to create a Python instance for a NULL pointer<br>
<br>
<br>
Cheers.<br>
<pre class="moz-signature" cols="$mailwrapcol">
        /===============================================================\
        | Laurent Claustre | eMail: <a class="moz-txt-link-abbreviated" href="mailto:claustre@esrf.fr">claustre@esrf.fr</a> |
        | BeamLine Instrument Software | Phone: +33 (0)476 88 29 12 |
        | Support Group (BLISS) | Fax : +33 (0)476 88 25 42 |
        | Experiments Division | Central Building Room 150 |
        | ------------------------------------------------------------- |
        | European Synchrotron Radiation Facility |
        | 6 rue Jules Horowitz BP220 38042 Grenoble Cedex - France |
        \===============================================================/
</pre>
<br>
</body>
</html>