gedit crashed with SIGSEGV in g_utf8_validate()

Bug #577773 reported by Kevin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gedit (Ubuntu)
Invalid
Medium
Unassigned

Bug Description

Binary package hint: gedit

gedit crashes when opening an empty file.

I enabled apport to report this bug as this comment suggests.
https://bugs.launchpad.net/ubuntu/+source/gedit/+bug/577584/comments/2
(But I did it temporarily by running 'sudo service apport start force_start=1' command).

1. create an empty file by right-clicking on the file browser and choosing 'create document' then 'empty file'.
2. double-click on the file to open
3. gedit runs and crashes immediately (The gedit window disappears).

I tried in the terminal as well and got the following message.
$ gedit anEmptyFile
(gedit:14929): GLib-GIO-CRITICAL **: g_converter_convert: assertion `outbuf_size > 0' failed
Segmentation fault

I'm using Ubuntu Linux 10.04 (Lucid Lynx) Desktop (64bit). It's upgraded from 9.10.
The version of gedit is 2.30.2.

$ lsb_release -rd
Description: Ubuntu 10.04 LTS
Release: 10.04

$ apt-cache policy gedit
gedit:
  Installed: 2.30.2-0ubuntu1
  Candidate: 2.30.2-0ubuntu1
  Version table:
 *** 2.30.2-0ubuntu1 0
        500 http://au.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        100 /var/lib/dpkg/status
     2.30.0git20100413-0ubuntu1 0
        500 http://au.archive.ubuntu.com/ubuntu/ lucid/main Packages

ProblemType: Crash
DistroRelease: Ubuntu 10.04
Package: gedit 2.30.2-0ubuntu1
ProcVersionSignature: Ubuntu 2.6.32-22.33-generic 2.6.32.11+drm33.2
Uname: Linux 2.6.32-22-generic x86_64
Architecture: amd64
Date: Sun May 9 20:48:21 2010
ExecutablePath: /usr/bin/gedit
InstallationMedia: Ubuntu 9.10 "Karmic Koala" - Release amd64 (20091027)
ProcCmdline: gedit anEmptyFile
ProcEnviron:
 SHELL=/bin/bash
 LANG=en_AU.utf8
SegvAnalysis:
 Segfault happened at: 0x7f8cbe106512 <g_utf8_validate+18>: cmpb $0x0,(%rdi)
 PC (0x7f8cbe106512) ok
 source "$0x0" ok
 destination "(%rdi)" (0x00000000) not located in a known VMA region (needed writable region)!
SegvReason: writing NULL VMA
Signal: 11
SourcePackage: gedit
StacktraceTop:
 g_utf8_validate () from /lib/libglib-2.0.so.0
 ?? ()
 ?? () from /usr/lib/libgio-2.0.so.0
 ?? () from /usr/lib/libgio-2.0.so.0
 ?? () from /usr/lib/libgio-2.0.so.0
Title: gedit crashed with SIGSEGV in g_utf8_validate()
UserGroups: adm admin cdrom dialout lpadmin plugdev sambashare

Revision history for this message
Kevin (kevinshlee) wrote :
Revision history for this message
Apport retracing service (apport) wrote :

StacktraceTop:
 IA__g_utf8_validate (str=0x0,
 ?? ()
 g_converter_input_stream_read (
 read_async_thread (res=0x1b35460,
 run_in_thread (job=<value optimized out>,

Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in gedit (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Kevin (kevinshlee) wrote :

I found that it happens if the first encoding charset to be detected is not 'UTF-8'.
I added 'UHC' to /apps/gedit-2/preferences/encodings/auto_detected through the configuration editor (gconf-editor) about one year ago and have been using it since then.
So the values I have are [UHC,UTF-8,CURRENT,ISO-8859-15,UTF-16]. I had to set the UHC before any other charsets as otherwise gedit doesn't detect UHC charset properly and displays the text in UTF-8.

So if I set UTF-8 before any other charsets, gedit does not crash even if I open an empty file. Otherwise, it does. I hope this would be some help.

Regards,
Kevin

Revision history for this message
Pedro Villavicencio (pedro) wrote :

I cannot reproduce the issue, looks like it's fixed with the latest update, can you please update your gedit package and try to reproduce the crash again? Thanks.

visibility: private → public
Changed in gedit (Ubuntu):
status: New → Incomplete
Revision history for this message
MichaelB (mrbou) wrote :

gedit 2.30.2-0ubuntu1 is the latest version and i didn't see a new one in proposed..

I read the comment #5 and i tested something..

My default setting "auto_detect" encoding start with ISO-8859-1 and with this gedit crash when a new empty file is created.
If a change this setting with "auto_detect" UTF-8 is OK i can open a empty file without crash

Revision history for this message
MichaelB (mrbou) wrote :
  • ok Edit (110.6 KiB, image/png)

Ok with this setting...

Revision history for this message
Kevin (kevinshlee) wrote :

I do still have this bug and the version is the same as MichaelB's (2.30.2-0ubuntu1).

Revision history for this message
Pedro Villavicencio (pedro) wrote :

Thanks for the bug report. This particular bug has already been reported into our bug tracking system, but please feel free to report any further bugs you find.

Changed in gedit (Ubuntu):
status: Incomplete → Invalid
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.