[PyKDE] User feedback about Eric3

Andrew Bushnell awb at fluent.com
Wed Jun 23 17:44:01 BST 2004


I too was running into the same crash on Windows. I recently was able to 
track down the issue and have a fix for it. I have not looked at the 
latest Eric snapshots, but are using similar versions of qt and pyqt on 
Windows 2000:

Python:  2.3.3
Qt:      3.2.2
PyQt:    3.8.1
QScintilla: 1.2
Eric     snapshot-20040522
Bicycle Repair Man:  0.9


What was happening is that in Eric, specifically ViewManager.py, there 
is a python dictionary that was mapping extensions to its corresponding 
file dialog filter. This cache is being built in the method 
initFileFilters. The keys for the cache are python string objects which 
are the extensions, the data cached were QString Objects that were 
gotten from a QString list, so for example:

filtersList = QStringList.split(';;', someUTF8QString)
for filter in filtersList:
     cache[key] = filter

Later on what I found was happening was when trying to access data from 
that cache, i.e. pull out the QString, in Qt some sort of QString copy 
was occuring, trying to bump up the ref and that was crashing as the 
QString retrieved from the cache was either destroryed or it's C++ ref 
data was NULL, causing a crash inside of Qt. My fix was to instead of 
caching QString objects, to instead cache the objects as python unicode 
objects and things seemed to work fine.

so my loop above would look more like:

for filter in filtersList:
     cache[key] = unicode(filter)

I did not dig deep into pyqt or qt to see what was going on with the 
QString objects that was causing the referenceing to get messed up, but 
I found changing eric to above got around the problem.


Nicola Larosa wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> First, thanks to Detlev Offenbach for a such a wonderful IDE! :^)
> 
> I checked it out last year, but could not use it since it did not yet support
> Quixote's PTLs in the Project Browser. I've been now using it daily for a few
> months.
> 
> This report refers to the following versions (drats, can't copy and paste from
> Help | Show Versions):
> 
> Eric: snapshot-20040529
> Python: 2.3.4
> Qt: 3.2.1
> PyQt: 3.8
> QScintilla: 1.2
> Bycicle Repair Man: 0.9
> 
> running on Debian unstable, where I am avoiding upgrading PyQt to 3.10 on
> account of possible problems with Eric3.
> 
> 1) Trying to open a file, either pressing Ctrl-O or selecting File | Open...
> crashes Eric3 immediately. Running it from the console, it just says
> "Segmentation fault".
> 

-- 
************************************
Andrew Bushnell
Senior Development Engineer
Fluent Inc.
10 Cavendish Court
Centerra Resource Park
Lebanon, NH  03766
awb at fluent.com
Phone: 603-643-2600, ext. 757
Fax: 603-643-1721
www.fluent.com
************************************




More information about the PyQt mailing list