crash on 'replace all' command

Bug #46487 reported by Daniel Robitaille
6
Affects Status Importance Assigned to Milestone
gphpedit (Debian)
Fix Released
Unknown
gphpedit (Ubuntu)
Fix Released
Medium
Michael Bienia

Bug Description

bug initially reported using reportbug

---------- Forwarded message ----------
From: "Ivo F.A.C. Fokkema" <email address hidden>
To: Ubuntu Bug Tracking System <email address hidden>
Date: Sat, 13 May 2006 23:14:07 +0200
Subject: gphpedit: crash on 'replace all' command
Package: gphpedit
Version: 0.9.80-1ubuntu1~breezy1
Severity: normal

Hi,

gPHPEdit freezes when replacing all instances of a certain string.

To reproduce:
- Start gPHPEdit, and open a file.
- Type Ctrl-R or select Edit -> Replace... from the menu.
- Type in a search string and a string to replace the matched strings with.
- Click on 'Replace all'.
<gphpedit informs you of the amount of changes made>
- Click 'OK'.
- gPHPEdit freezes.

Thanks,

Ivo

-- System Information:
Debian Release: testing/unstable
 APT prefers breezy-updates
 APT policy: (500, 'breezy-updates'), (500, 'breezy-security'), (500,
'breezy-backports'), (500, 'breezy')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.12-10-386
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)

Versions of packages gphpedit depends on:
ii libart-2.0-2 2.3.17-1 Library of functions for 2D graphi
ii libatk1.0-0 1.10.3-0ubuntu2 The ATK accessibility toolkit
ii libbonobo2-0 2.10.1-0ubuntu1 Bonobo CORBA interfaces library
ii libbonoboui2-0 2.10.1-0ubuntu2 The Bonobo UI library
ii libc6 2.3.5-1ubuntu12.5.10.1 GNU C Library: Shared libraries an
ii libcairo2 1.0.2-0ubuntu1.1 The Cairo 2D vector graphics libra
ii libfontconfig1 2.3.2-1ubuntu4 generic font configuration library
ii libgcc1 1:4.0.1-4ubuntu9 GCC support library
ii libgconf2-4 2.12.0-0ubuntu1 GNOME configuration database syste
ii libglib2.0-0 2.8.3-0ubuntu1 The GLib library of C routines
ii libgnome-keyring0 0.4.5-0ubuntu1 GNOME keyring services library
ii libgnome2-0 2.12.0.1-0ubuntu1 The GNOME 2 library - runtime file
ii libgnomecanvas2-0 2.12.0-0ubuntu2 A powerful object-oriented display
ii libgnomeui-0 2.12.0-0ubuntu1 The GNOME 2 libraries (User Interf
ii libgnomevfs2-0 2.12.1-0ubuntu2 The GNOME virtual file-system libr
ii libgtk2.0-0 2.8.6-0ubuntu2.1 The GTK+ graphical user interface
ii libgtkhtml2-0 2.6.3-1 HTML rendering/editing library - r
ii libice6 1:6.3.5-4 X11 Inter-Client Exchange library
ii liborbit2 1:2.12.4-0ubuntu1 libraries for ORBit2 - a CORBA ORB
ii libpango1.0-0 1.10.1-0ubuntu1 Layout and rendering of internatio
ii libpng12-0 1.2.8rel-1ubuntu3 PNG library - runtime
ii libpopt0 1.7-5 lib for parsing cmdline parameters
ii libsm6 1:6.0.4-4 X11 Session Management library
ii libstdc++6 4.0.1-4ubuntu9 The GNU Standard C++ Library v3
ii libx11-6 1:6.2.1+cvs.20050722-8 X11 client-side library
ii libxcursor1 1.1.4-0ubuntu5 X cursor management library
ii libxext6 1:6.4.3-3 X11 miscellaneous extension librar
ii libxfixes3 1:3.0.0-3 X11 miscellaneous 'fixes' extensio
ii libxi6 1:1.3.0-2 X11 Input extension library
ii libxinerama1 1:1.1.0+cvs.20050821-1 X11 Xinerama extension library
ii libxml2 2.6.21-0ubuntu1 GNOME XML library
ii libxrandr2 1:1.0.2-2 X11 RandR extension library
ii libxrender1 1:0.9.0-1 X Rendering Extension client libra
ii zlib1g 1:1.2.3-3ubuntu4 compression library - runtime

Versions of packages gphpedit recommends:
pn phpdoc <none> (no description available)

-- no debconf information

Revision history for this message
ville palo (vi64pa) wrote :

Happens on my edgy too.

Revision history for this message
ville palo (vi64pa) wrote :
Changed in gphpedit:
status: Unconfirmed → Confirmed
Revision history for this message
ville palo (vi64pa) wrote :

Still happening on feisty also.

Revision history for this message
ville palo (vi64pa) wrote :

Here's a fix for this.

Originally fix was made by logiczero to upstream bug tracker:

http://www.gphpedit.org/bugs/bug_view.php?id=132
Comment #266 - Added by logiczero at 2006-11-19 01:45:02
This bug still exists in v0.9.91 on Ubuntu 6.10.

I looked at the code in file_replace.c. Line 481 looks like the spot where the lockup is happening.

I commented out line 481:
g_free(replace_all_dialog);
and that seemed to stop the program from locking up.

According to the documentation, gnome_dialog_run_and_close() calls gnome_dialog_close() before returning, which destroys the dialog by default. So "g_free(replace_all_dialog)" is trying to free memory for a dialog object that has already been destroyed on line 480.

Changed in gphpedit:
assignee: nobody → motureviewers
status: Confirmed → In Progress
Changed in gphpedit:
assignee: motureviewers → nobody
Revision history for this message
Michael Bienia (geser) wrote :

gphpedit 0.9.91-2ubuntu1 uploaded to feisty.

Changed in gphpedit:
assignee: nobody → geser
status: In Progress → Fix Released
Revision history for this message
Lior Kaplan (kaplan) wrote :

Also fixed in Debian (michael - thanks for the mail). You could resync in the future.

Lior Kaplan

Changed in gphpedit:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.