Bug#360535: gedit performs very slowly, hogs a ton of memory, and crashes on large datasets without newlines

Michael Gilbert michael.s.gilbert at gmail.com
Mon Apr 3 01:33:39 UTC 2006


Package: gedit
Version: 2.12.1-2
Severity: normal


if the contents of a file are a long datalist that does not consist of
newlines, gedit will perform very slowly, hog a bunch of ram, then crash.

the following code (which computes the largest known prime and outputs
that number to stdout; http://fabrice.bellard.free.fr/mersenne.html)
is a demonstror of this bug.  the output causes gedit to
practically grind to a halt.  the problem arises because the output
contains no newlines.  the computation itself only takes about 3 minutes
on my 1.6 GHz processor:

#!/bin/bash

echo '''#include <stdio.h>
int m=754974721,N,t[1<<24],a,*p,i,e=30611555,j,s,c,U;f(d){for(s=1<<24;s/=2;d=d*
1LL*d%m)if(s<N)for(p=t;p<t+N;p+=s)for(i=s,c=1;i;i--)a=*p+p[s],p[s]=(m+*p-p[s])*1LL
*c%m,*p++=a%m,c=c*1LL*d%m;for(j=0;i<N-1;){for(s=N/2;!((j^=s)&s);s/=2);if(++i<j)
a=t[i],t[i]=t[j],t[j]=a;}}main(){*t=2;U=N=1;while(e/=2){N*=2;U=U*1LL*(m+1)/2%m;f
(362);for(p=t;p<t+N;p++)*p=*p*1LL**p%m*U%m;f(415027540);for(a=0,p=t;p<t+N;)a+=*p
<<(e&1),*p++=a%10,a/=10;}while(!*--p);t[0]--;while(p>=t)printf("%d",*p--);}''' > largest-known-prime.c

gcc -o largest-known-prime largest-known-prime.c
../largest-known-prime > out
gedit out

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (600, 'testing'), (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15-1-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages gedit depends on:
ii  gconf2                   2.14.0-1        GNOME configuration database syste
ii  gedit-common             2.12.1-2        light-weight text editor support f
ii  libart-2.0-2             2.3.17-1        Library of functions for 2D graphi
ii  libaspell15              0.60.4-3        GNU Aspell spell-checker runtime l
ii  libatk1.0-0              1.10.3-1        The ATK accessibility toolkit
ii  libbonobo2-0             2.14.0-1        Bonobo CORBA interfaces library
ii  libbonoboui2-0           2.10.1-2        The Bonobo UI library
ii  libc6                    2.3.6-3         GNU C Library: Shared libraries an
ii  libcairo2                1.0.2-3         The Cairo 2D vector graphics libra
ii  libeel2-2                2.12.2-3        Eazel Extensions Library (for GNOM
ii  libfontconfig1           2.3.2-1.1       generic font configuration library
ii  libgail-common           1.8.11-1        GNOME Accessibility Implementation
ii  libgail17                1.8.11-1        GNOME Accessibility Implementation
ii  libgconf2-4              2.14.0-1        GNOME configuration database syste
ii  libglade2-0              1:2.5.1-2       library to load .glade files at ru
ii  libglib2.0-0             2.10.1-2        The GLib library of C routines
ii  libgnome-keyring0        0.4.9-1         GNOME keyring services library
ii  libgnome2-0              2.12.0.1-5      The GNOME 2 library - runtime file
ii  libgnomecanvas2-0        2.14.0-1        A powerful object-oriented display
ii  libgnomeprint2.2-0       2.12.1-3        The GNOME 2.2 print architecture -
ii  libgnomeprintui2.2-0     2.12.1-2        GNOME 2.2 print architecture User 
ii  libgnomeui-0             2.12.1-1        The GNOME 2 libraries (User Interf
ii  libgnomevfs2-0           2.12.2-5        GNOME virtual file-system (runtime
ii  libgtk2.0-0              2.8.13-1        The GTK+ graphical user interface 
ii  libgtksourceview1.0-0    1.4.2-2         shared libraries for the GTK+ synt
ii  libice6                  6.9.0.dfsg.1-4  Inter-Client Exchange library
ii  liborbit2                1:2.14.0-1      libraries for ORBit2 - a CORBA ORB
ii  libpango1.0-0            1.12.0-2        Layout and rendering of internatio
ii  libpopt0                 1.7-5           lib for parsing cmdline parameters
ii  libsm6                   6.9.0.dfsg.1-4  X Window System Session Management
ii  libx11-6                 6.9.0.dfsg.1-4  X Window System protocol client li
ii  libxcursor1              1.1.3-1         X cursor management library
ii  libxext6                 6.9.0.dfsg.1-4  X Window System miscellaneous exte
ii  libxi6                   6.9.0.dfsg.1-4  X Window System Input extension li
ii  libxinerama1             6.9.0.dfsg.1-4  X Window System multi-head display
ii  libxml2                  2.6.23.dfsg.2-3 GNOME XML library
ii  libxrandr2               6.9.0.dfsg.1-4  X Window System Resize, Rotate and
ii  libxrender1              1:0.9.0.2-1     X Rendering Extension client libra
ii  scrollkeeper             0.3.14-10       A free electronic cataloging syste
ii  zlib1g                   1:1.2.3-11      compression library - runtime

gedit recommends no packages.

-- no debconf information





More information about the Pkg-gnome-maintainers mailing list