[PyKDE] PyQt Segfault - Stack Dump

2003-11-11 Thread Kaleb Pederson
Ok, in changing selection/focus from one table cell to another, this is what I 
got (I'm using sip-3.8/pyqt-3.8.1/qt-3.2.2):

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 16384 (LWP 2947)]
0x404cf324 in QObject::parent() const (this=0x) at qobject.h:154
154 qobject.h: No such file or directory.
in qobject.h
(gdb) bt
#0  0x404cf324 in QObject::parent() const (this=0x) at qobject.h:154
#1  0x404ce0d3 in QWidget::parentWidget(bool) const (this=0x, 
sameWindow=false) at qwidget.h:852
#2  0x405f2c3b in ~QWidget (this=0x8ac60d0) at kernel/qwidget.cpp:895
#3  0x4068b42f in ~QFrame (this=0x8ac60d0) at .moc/debug-shared-mt/
moc_qvbox.cpp:28
#4  0x406a3c67 in ~QLineEdit (this=0x8ac60d0) at widgets/qlineedit.cpp:441
#5  0x405b40a6 in QObject::event(QEvent*) (this=0x8ac60d0, e=0x8a8c2c8) at 
kernel/qobject.cpp:750
#6  0x405f9591 in QWidget::event(QEvent*) (this=0x8ac60d0, e=0x8a8c2c8) at 
kernel/qwidget.cpp:4408
#7  0x406a59f2 in QLineEdit::event(QEvent*) (this=0x8ac60d0, e=0x8a8c2c8) at 
widgets/qlineedit.cpp:1406
...
I'll include the rest below for the interested... It looks like the parent 
information was somehow invalid?  It doesn't look like the destructor did 
anything that it shouldn't have, but I didn't really trace through the whole 
thing.

kernel/qwidget.cpp:895:

886 // Remove myself and all children from the can-take-focus list
887 QFocusData *f = focusData( FALSE );
888 if ( f ) {
889 QPtrListIterator it(f->focusWidgets);
890 QWidget *w;
891 while ( (w = it.current()) ) {
892 ++it;
893 QWidget * p = w;
894 while( p && p != this )
895 p = p->parentWidget();
896 if ( p ) // my descendant
897 f->focusWidgets.removeRef( w );
898 }
899 }

Followed by qwidget.h:852

848 inline QWidget *QWidget::parentWidget( bool sameWindow ) const
849 {
850 if ( sameWindow )
851 return isTopLevel() ? 0 : (QWidget *)QObject::parent();
852 return (QWidget *)QObject::parent();
853 }

Lastly, qobject.h:154:

149 signals:
150 void destroyed();
151 void destroyed( QObject* obj );
152
153 public:
154 QObject *parent() const { return parentObj; }
155
156 public slots:
157 voiddeleteLater();
158

I'm open to suggestions?  If there is anything else that I can provide that 
might be useful, let me know.  I can segfault it reliably under various 
conditions.

Thanks.

--Kaleb

(the rest of the stack dump follows):

#8  0x405454e5 in QApplication::internalNotify(QObject*, QEvent*) 
(this=0x81749e0, receiver=0x8ac60d0, e=0x8a8c2c8)
at kernel/qapplication.cpp:2582
#9  0x40545157 in QApplication::notify(QObject*, QEvent*) (this=0x81749e0, 
receiver=0x8ac60d0, e=0x8a8c2c8)
at kernel/qapplication.cpp:2470
#10 0x41aa02ab in sipQApplication::notify(QObject*, QEvent*) () from /usr/
local/lib/python2.2/site-packages/libqtcmodule.so
#11 0x404ce280 in QApplication::sendEvent(QObject*, QEvent*) 
(receiver=0x8ac60d0, event=0x8a8c2c8) at qapplication.h:490
#12 0x405465fa in QApplication::sendPostedEvents(QObject*, int) (receiver=0x0, 
event_type=0) at kernel/qapplication.cpp:3204
#13 0x405463b0 in QApplication::sendPostedEvents() () at kernel/
qapplication.cpp:3115
#14 0x404e169f in QEventLoop::processEvents(unsigned) (this=0x824b188, 
flags=4) at kernel/qeventloop_x11.cpp:202
#15 0x4055e969 in QEventLoop::enterLoop() (this=0x824b188) at kernel/
qeventloop.cpp:198
#16 0x4055e882 in QEventLoop::exec() (this=0x824b188) at kernel/
qeventloop.cpp:145
#17 0x405456a3 in QApplication::exec() (this=0x81749e0) at kernel/
qapplication.cpp:2705
#18 0x41aa2bb8 in sipDo_QApplication_exec_loop(_object*, _object*) () from /
usr/local/lib/python2.2/site-packages/libqtcmodule.so
#19 0x080f3ec6 in PyCFunction_Call (func=0x89b0b78, arg=0x813411c, kw=0x0) at 
Objects/methodobject.c:79
#20 0x0808ae96 in eval_frame (f=0x814d194) at Python/ceval.c:2014
#21 0x0808d204 in PyEval_EvalCodeEx (co=0x8167a60, globals=0x81461fc, 
locals=0x0, args=0x814c1d4, argcount=0, kws=0x814c1d4, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2595
#22 0x0808efb7 in fast_function (func=0x832b39c, pp_stack=0xb0c4, n=0, 
na=0, nk=0) at Python/ceval.c:3170
#23 0x0808b024 in eval_frame (f=0x814c07c) at Python/ceval.c:2034
#24 0x0808d204 in PyEval_EvalCodeEx (co=0x8189e80, globals=0x814513c, 
locals=0x814513c, args=0x0, argcount=0, kws=0x0, kwcount=0,
defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:2595
#25 0x080828c0 in PyEval_EvalCode (co=0x8189e80, globals=0x814513c, 
locals=0x814513c) at Python/ceval.c:481
#26 0x080b17f9 in run_node (n=0x8157408, filename=0xb4c3 "/home/kibab/
work/JDC/gem/src/gui/../../run.py", globals=0x814513c,
locals=0x814513c, flags=0xb298) at Python/pythonrun.c:1079
#27 0x080b179c in run_err_node (n=0x8157408, filename=0xb

[PyKDE] diff behave PyQt/3.7/3.8 on i.e. QColor.__eq__()

2003-11-11 Thread kscalet
That used to work with PyQt 3.7, but now with my new installation
of PyQt 3.8 it no longer does:
-- code fragment --
c_sav = None
c = QColor()
if c != c_sav:
   c_sav = c
-- -- -- --
brings:
Traceback (..):
..
RuntimeError: Cannot pass None as argument 1 in this call
As I said, this code worked before. Not a big deal to work around,
but I wonder why / what's the difference.
Thank you for your ideas,

Karl

PS: using precompiled binaries for Windows (2000)

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] diff behave PyQt/3.7/3.8 on i.e. QColor.__eq__()

2003-11-11 Thread Phil Thompson
On Tuesday 11 November 2003 12:38 pm, kscalet wrote:
> That used to work with PyQt 3.7, but now with my new installation
> of PyQt 3.8 it no longer does:
>
> -- code fragment --
> c_sav = None
> c = QColor()
> if c != c_sav:
> c_sav = c
> -- -- -- --
> brings:
> Traceback (..):
> ..
> RuntimeError: Cannot pass None as argument 1 in this call
>
> As I said, this code worked before. Not a big deal to work around,
> but I wonder why / what's the difference.
>
> Thank you for your ideas,
>
> Karl
>
> PS: using precompiled binaries for Windows (2000)

It's a bug which has been fixed in current snapshots.

Phil

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[PyKDE] Internal error in python.py PyKDE 3.8.0 over python2.3

2003-11-11 Thread Mateusz Korniak
Executing(%build): /bin/sh -e /var/tmp/rpm-tmp.79652
+ umask 022
+ cd /home/users/matkor/rpm/BUILD
+ cd PyKDE-3.8.0
+ KDEDIR=/usr
+ python build.py -q /usr -k /usr -i /usr/include/qt -d 
/tmp/python-PyKDE-3.8.0-root-matkor/usr/lib/python2.3/site-packages -t 
/usr/lib

Building PyKDE 3.8 on linux2.

Python version is 2.3
Python parent directory is /usr/lib/python2.3
Python library directory is /usr/lib
Python include directory is /usr/include/python2.3

Home directory is /home/users/matkor

sip code generator path (sip) is /usr/bin
sip version is 3.8
sip lib directory (libsip*) is /usr/lib/python2.3/site-packages
sip include directory (sipQt.h) is /usr/include/python2.3

Qt3 parent directory is /usr
Qt3 lib directory (libqt-mt.so.3) is /usr/lib


An internal error occured.  Review the installation documentation or
report all the output from the program, including the traceback,
to the PyKDE mailing list: <[EMAIL PROTECTED]>. Thanks.


Traceback (most recent call last):
  File "build.py", line 1038, in ?
main (sys.argv)
  File "build.py", line 989, in main
dis = Discovery (opts, usingSip, usingQt, usingPyQt, usingKDE, usingPyKDE, 
isPyKDE)
  File "build/discover.py", line 483, in __init__
self.discoverQt3 (opts)
  File "build/discover.py", line 608, in discoverQt3
self.qtIncl = DiscoverQt3Incl ("qglobal.h", [os.path.join (self.qt.path, 
"include"), qtInclDir])
  File "build/discover.py", line 202, in __init__
Discover.__init__ (self, target, searchPath)
  File "build/discover.py", line 45, in __init__
self.search (target, searchEntry)
  File "build/discover.py", line 58, in search
if os.path.isdir (searchEntry)\
  File "/usr/lib/python2.3/posixpath.py", line 187, in isdir
TypeError: coercing to Unicode: need string or buffer, list found
error: Bad exit status from /var/tmp/rpm-tmp.79652 (%build)

Any ideas ?

-- 
Mateusz Korniak
"Black holes are where God divided by zero." - Steven Wright

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] Internal error in python.py PyKDE 3.8.0 over python2.3

2003-11-11 Thread Jim Bublitz
On Tuesday November 11 2003 05:50, Mateusz Korniak wrote:

> + python build.py -q /usr -k /usr -i /usr/include/qt -d

> Qt3 parent directory is /usr
> Qt3 lib directory (libqt-mt.so.3) is /usr/lib

>   File "build/discover.py", line 58, in search
> if os.path.isdir (searchEntry)\
>   File "/usr/lib/python2.3/posixpath.py", line 187, in isdir

> TypeError: coercing to Unicode: need string or buffer, list
> found error: Bad exit status from /var/tmp/rpm-tmp.79652
> (%build)

> Any ideas ?

It's failing while trying to find /usr/include/qt from your -i 
above  (assuming build.py read the option correctly too).
I'm not sure if the "TypeError" is meaningful or not.

Could you try this? In PyKDE-3.8.0/build/discover.py, add the 
print stmt as shown  before line 58:

if not searchEntry:
return

print searchEntry
if os.path.isdir (searchEntry)\

and let me know what prints out there?

The call to this code is originating in the "discoverQt" method 
if you need or want to inverstigate further. The cause of the 
error should be somewhere in that region.

Thanks,

Jim



___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[PyKDE] screensaver?

2003-11-11 Thread Peter Osborne
Hello All,

I was wondering if anyone has some ideas on how one would go about writing a 
simple screen saver using pyqt? I figured I could us similar techniques that 
are used to create a splash screen but how does one go capturing any keyboard 
or mouse movement to clear the screen saver?

Thanks,
Pete

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


[PyKDE] sip: sip/qtmod.sip:33 parse error

2003-11-11 Thread Heath Feather








I received the following Error when trying to build PyQt. 

 

 

**

Generating the C++ source code for the qt module

**

sip: sip/qtmod.sip:33 parse error

 

 

I was using PyQt-x11-gpl-3.8.1 and sip-x11-gpl-4.0pre3.

 

Examining the file qtmod.sip, line 33 contains the following
%C++code, Then examining the changelog for this version of SIP, on 2003/10/24 phil
stated the following.

 2003/10/23 18:28:27  philRenamed %C++Code to %TypeCode or %ModuleCode depending on the context.

 

 

Changing this line to %ModuleCode allowed it to go further. Then it
died at line 23 of qglobal.sip. This line is as follows

 

%HeaderCode, this too is supposed to be renamed to %ModuleHeaderCode or
the like.

 

So the question is. Have I downloaded the wrong packages, or should I
keep pressing on making these little fixes ?

 

Any help would be appreciated.

Heath.

 

 

 

 








Re: [PyKDE] sip: sip/qtmod.sip:33 parse error

2003-11-11 Thread Phil Thompson
You need current PyQt snapshots for SIP v4. However, I would hold off for a 
few days until v4.0pre4.

Phil


On Tuesday 11 November 2003 11:49 pm, Heath Feather wrote:
> I received the following Error when trying to build PyQt.
>
>
>
>
>
> **
>
> Generating the C++ source code for the qt module
>
> **
>
> sip: sip/qtmod.sip:33 parse error
>
>
>
>
>
> I was using PyQt-x11-gpl-3.8.1 and sip-x11-gpl-4.0pre3.
>
>
>
> Examining the file qtmod.sip, line 33 contains the following %C++code,
> Then examining the changelog for this version of SIP, on 2003/10/24 phil
> stated the following.
>
>
> 2003/10/23 18:28:27  phil
> Renamed %C++Code to %TypeCode or %ModuleCode depending on the context.
>
>
>
>
>
> Changing this line to %ModuleCode allowed it to go further. Then it died
> at line 23 of qglobal.sip. This line is as follows
>
>
>
> %HeaderCode, this too is supposed to be renamed to %ModuleHeaderCode or
> the like.
>
>
>
> So the question is. Have I downloaded the wrong packages, or should I
> keep pressing on making these little fixes ?
>
>
>
> Any help would be appreciated.
>
> Heath.

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde


Re: [PyKDE] sip: sip/qtmod.sip:33 parse error

2003-11-11 Thread Jim Bublitz
On Tuesday November 11 2003 16:28, Heath Feather wrote:
> I received the following Error when trying to build PyQt.

> **
>
> Generating the C++ source code for the qt module
>
> **
>
> sip: sip/qtmod.sip:33 parse error

> I was using PyQt-x11-gpl-3.8.1 and sip-x11-gpl-4.0pre3.
> Examining the file qtmod.sip, line 33 contains the following
> %C++code, Then examining the changelog for this version of
> SIP, on 2003/10/24 phil stated the following.

> 2003/10/23 18:28:27  phil
> Renamed %C++Code to %TypeCode or %ModuleCode depending on the
> context.

> Changing this line to %ModuleCode allowed it to go further.
> Then it died at line 23 of qglobal.sip. This line is as
> follows

> %HeaderCode, this too is supposed to be renamed to
> %ModuleHeaderCode or the like.

> So the question is. Have I downloaded the wrong packages, or
> should I keep pressing on making these little fixes ?

> Any help would be appreciated.

This is really Phil's to answer, but since it's after midnight in 
the UK, I'll give you a provisional answer and Phil can correct 
me later ...

You probably could, with considerable effort, get PyQt-3.8.1 to 
build with sip 4.0. However, there are a *huge* number of syntax 
changes you'll need to make throughout *.sip (including deleting 
a lot of no longer needed code).

Phil doesn't (as of a couple days ago when I asked him) have a 
PyQt that's buildable with sip 4.0 at the moment - PyQt is "in 
transition" - he's in the process of making all of the changes 
in the previous paragraph (and perhaps debugging sip a little 
too). He indicated to me that he would post to the list when a 
sip 4.0 compatible PyQt will be available - probably not too 
long from now.

For anyone curious, I haven't started on a sip 4.0 compatible 
PyKDE yet - maybe in another week or so (start that is, not 
release). In my case that's updating tools, not PyKDE code, so 
there won't be a snapshot until it's fairly complete. Probably 
the same release as KDE 3.2-final support.

Jim

___
PyKDE mailing list[EMAIL PROTECTED]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde