[PyKDE] User feedback about Eric3

Detlev Offenbach detlev at die-offenbachs.de
Wed Jun 23 19:20:01 BST 2004


Hi,

thanks for the patch. I'll include it in the next snapshot.

Detlev

Am Mittwoch, 23. Juni 2004 17:11 schrieb Nicola Larosa:
> Andrew Bushnell wrote:
> > Nicola Larosa wrote:
> >> 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".
> >
> > FWIW, 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.
> >
> > 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. I have
> > added Detlev and Phil in case they can provide any more insight. I
> > will send along a more formal diff showing my changes when I get a
> > chance to update to the latest Eric.
>
> Ehi, don't know why you didn't send it to the mailing list, but I'm
> not complaining, it was spot-on. :^) The code in my snapshot looks a
> little different, but I adapted the change you proposed and lo, no
> more crash. Here's the diff:
>
>
> --- ViewManager.py.orig	2004-05-19 08:22:58.000000000 +0200
> +++ ViewManager.py	2004-06-23 16:59:55.000000000 +0200
> @@ -106,7 +106,7 @@
>              for extension in extensions[1:]:
>                  extension = str(extension).strip().replace(')', '')
>                  if extension:
> -                    self.ext2Filter[extension] = fileFilter
> +                    self.ext2Filter[extension] = unicode(fileFilter)
>
>      def setSbInfo(self, sbFile, sbLine, sbPos, sbWritable):
>          """
>
>
> Thanks, that was useful. I have a couple more unrelated comments about
> Eric3, but I'll make them on the mailing list.

-- 
Detlev Offenbach
detlev at die-offenbachs.de




More information about the PyQt mailing list