Reply
Thread Tools
Posts: 1,378 | Thanked: 1,604 times | Joined on Jun 2010 @ Göteborg, Sweden
#11
I might be off track here but see my reply here as I found something odd about the upgrade of the QT libraries

http://talk.maemo.org/showpost.php?p...9&postcount=79
 
jonnenau's Avatar
Posts: 116 | Thanked: 445 times | Joined on Apr 2010 @ Oulu, Finland
#12
Originally Posted by Yabba View Post
Ok, I have Segmentation fault with my program (pyKake), arise with Pr 1.3. As I have tracked it down it is in QApplication, so I just put this short question here (before I create new topic or anything), is this caused compatibility problems with Qt4.7 and current PyQt or have I done something terribly wrong (except that with Pr 1.2 the program worked fine)

The (short) code:
Code:
print "a"
app = QApplication(sys.argv) # Allways crashes here, newer prints out that b or later ones.
print "b"
MiscFunctions().loadSettings()
print "c"
MiscFunctions().controlLircd("start")
print "d"

main = MainWindow()
print "e"
if USEFULLSCREEN == True:
    print "f" 
    main.showFullScreen()
else:
    print "g"
    main.show()
print "h"
app.exec_()
MiscFunctions().exitFunction()
I have the exact same problem with my dropn900 app, it's essentially broken in PR 1.3. Attila any ideas what might be causing this? My code is only different so that I have subclassed QApplication and my init is "QApplication.__init__(self, sys.argv)". maemo repository is giving me 504 when doing dist-upgrade to PR1.3 so im a bit stuck, cant even try to resolve this but on the device :E
__________________
DropN900 - the maemo 5 DropBox client
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#13
In theory, the new Qt should be binary compatible with the old one and everything should 'just work'. In theory. Well, we'll see soon enough if a PyQt4.8 (or just a recompile) will help it.
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#14
Originally Posted by attila77 View Post
In theory, the new Qt should be binary compatible with the old one and everything should 'just work'. In theory. Well, we'll see soon enough if a PyQt4.8 (or just a recompile) will help it.
I've been debugging my app and have found that moving all other Qt import statements (other than QApplication) until after initialising QApplication eliminates the segmentation fault. I don't see why this should be needed though, so I suspect it's more a PyQt issue.
 

The Following User Says Thank You to Rob1n For This Useful Post:
jonnenau's Avatar
Posts: 116 | Thanked: 445 times | Joined on Apr 2010 @ Oulu, Finland
#15
Originally Posted by Rob1n View Post
I've been debugging my app and have found that moving all other Qt import statements (other than QApplication) until after initialising QApplication eliminates the segmentation fault. I don't see why this should be needed though, so I suspect it's more a PyQt issue.
Yes this works, very very strange though. Lets see after we get the next PyQt update. I just reinstalled my whole development env with fresh everything, did not install any Qt 4.7 experimental related things, just the needed PyQt packages and some other python things that I can run my app. Segfaults would indicate the crash is somewhere in the c++ libs of course, maybe some confusion with the numbers.

Thanks a lot robin for your help!
__________________
DropN900 - the maemo 5 DropBox client
 

The Following User Says Thank You to jonnenau For This Useful Post:
keithzg's Avatar
Posts: 23 | Thanked: 16 times | Joined on Mar 2010
#16
Soooooo, is the not-yet-updated PyQt the reason I'm getting this error on any PyQt apps?

Using khweeteur as an example,

Code:
Traceback (most recent call last):
  File "/usr/bin/khweeteur_launch.py", line 3, in <module>
    import khweeteur
  File "/usr/lib/python2.5/site-packages/khweeteur/__init__.py", line 9, in <module>
    from PyQt4.QtGui import *
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1
All my searching doesn't seem to have come up with *anyone* else with the same problem, which has me suspecting that my apt-get dist-upgrade was a bad idea in the end Unfortunately this is really delaying my attempts to learn PyQt by writing an app for my local transit system, alas!
 
Posts: 47 | Thanked: 41 times | Joined on Jan 2010 @ Finland
#17
Thank you Rob1n and Jonnenau, moving the initializing of QApplication solved my problem too
 
int_ua's Avatar
Posts: 676 | Thanked: 1,067 times | Joined on Jul 2010 @ Kyiv, Ukraine
#18
Code:
>>> from PyQt4.QtGui import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1
Can someone point the bug for this to vote for?
 
blubbi's Avatar
Posts: 288 | Thanked: 113 times | Joined on Dec 2009 @ Germany
#19
Okay, now this is getting weird.
In fact it has something to do with PyQt4 and not playing nice with some other modules (so far I could track down gobject, glib, and evolution).

Here's a proof of concept for this bug:

Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#

import sys
from PyQt4.QtGui import QApplication

##NOTE: Uncommenting this import (even each on it's own) cause a segfault
##NOTE: Using the same import after initializing QApplication() works!
#import gobject, glib, evolution

print "hello1"
app = QApplication(sys.argv)
print "hello2"

##NOTE: This does not cause a segfault:
import gobject, glib, evolution
print "hello3"
 
sampppa's Avatar
Posts: 166 | Thanked: 191 times | Joined on Dec 2007 @ Oulu, Finland
#20
Originally Posted by int_ua View Post
Code:
>>> from PyQt4.QtGui import *
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
RuntimeError: the sip module implements API v8.0 but the PyQt4.QtGui module requires API v7.1
Can someone point the bug for this to vote for?
I get the same error with the latest dropn900 from extras-devel. I had fresh n900 and nothing else installed. DropN900 was the first one i wanted to try
 
Reply


 
Forum Jump


All times are GMT. The time now is 23:58.