[SRU] Kile crashes with SIGSEGV on entering a double quote if "abstract" is commented out

Bug #362537 reported by JoeJoeJoe
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
kile (Ubuntu)
Fix Released
Medium
Unassigned
Jaunty
Fix Released
Undecided
Unassigned

Bug Description

== SRU req. ==
I request an SRU fixing two bugs. This one, and bug 362292.

* Rationale:
This bug crashes kile under certain circumstances while editing a tex-file and results in loss of data since last save/auto-save.
Bug 362292 is a regression compared to the version in intrepid.

* Development release:
Not open for uploads yet. A new svn snapshot will be uploaded to karmic when it opens fixing these two bugs.

* Test case:
This bug: Try one of the test-files attached to this bug and you can make kile crash entering a double-quote; the updates package doesn't crash (and inserts the double-quote).
Bug 362292: Choose a non-UTF8 encoding in the open/save options. The open file dialog will use UTF-8 no matter what in the current version, while the updated version uses the chosen encoding.

== Original description ==
System: Ubuntu 9.4 Desktop BETA (all updates installed...)
Kile just crashes every time I enter a double quote on a mid-length "report" tex-file, where the "abstract"-part is commented out...

To reproduce the bug, create a texfile like this and try to enter a double quote below the "abstract"-part:

\documentclass[a4paper,10pt]{report}

% Title Page
\title{}
\author{}

\begin{document}
\maketitle

%\begin{abstract}
%\end{abstract}

\chapter{chapter 1}

test test test

\end{document}

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
NonfreeKernelModules: fglrx
Package: kile 1:2.1.0~svn942443-0ubuntu3
ProcEnviron:
 LANG=de_AT.UTF-8
 SHELL=/bin/bash
SourcePackage: kile
Uname: Linux 2.6.28-11-generic i686

Related branches

Revision history for this message
JoeJoeJoe (josef-auhof) wrote :
Revision history for this message
Hmpf (dns-hmpf) wrote :

I can confirm this. In http://forum.ubuntuusers.de/topic/kile-stuerzt-bei-der-eingabe-von-anfuehrungsz/ someone reported a similar behaviour caused slightly different. See attached code.

Changed in kile (Ubuntu):
status: New → Confirmed
Revision history for this message
Hmpf (dns-hmpf) wrote :

Btw. it does not matter which or if any kind of double quotes is selected in the "kile configuration -> latex -> general".

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

I've made a new svn snapshot of kile available in my PPA:
https://launchpad.net/~andreas-wenning/+archive/experimental

Can you test if it is fixed there? before I go and report it upstream.

Changed in kile (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Thomas Braun (tbraun1234) wrote :

Hi,

the bug here is definintly ours (upstream). I'll try fix it this week.

thomas

Revision history for this message
JoeJoeJoe (josef-auhof) wrote :

@Andreas Wenning: The bug is still present in the svn snapshot you posted...

summary: - Kile crashes with SIGSEGV on entering a double quote (english style) if
- "abstract" is commented out
+ Kile crashes with SIGSEGV on entering a double quote if "abstract" is
+ commented out
Revision history for this message
Andreas Wenning (andreas-wenning) wrote : Re: Kile crashes with SIGSEGV on entering a double quote if "abstract" is commented out

@Joe x3
Thanks for confirming.

@Thomas
I really appreciate your quick responses here; great :)

Revision history for this message
Thomas Braun (tbraun1234) wrote : extragear/office/kile/src

SVN commit 957364 by tbraun:

don't crash while inserting intelligent double quotes.

CCMAIL: <email address hidden>

 M +5 -2 editorextension.cpp

--- trunk/extragear/office/kile/src/editorextension.cpp #957363:957364
@@ -1336,11 +1336,14 @@

  QVector<KTextEditor::Range> foundRanges = iface->searchText(searchRange, m_reg.pattern(), searchOptions);

+ KILE_DEBUG() << "number of ranges " << foundRanges.count();
+
  EnvTag wrong_env = (backwards) ? EnvEnd : EnvBegin;

- for(QVector<KTextEditor::Range>::iterator i = foundRanges.begin(); i != foundRanges.end(); ++i) {
+ // it is +5 here because every search returns at least 5 ranges, because the regexp contains 4 capturing parantheses (full match + 4 =5 )
+ for(QVector<KTextEditor::Range>::iterator i = foundRanges.begin(); i < foundRanges.end(); i+=5) {
   KTextEditor::Range range = *i;
- KILE_DEBUG() << doc->text(*i);
+ KILE_DEBUG() << "text is " << doc->text(*i);
   if(!range.isValid()) {
    break;
   }

Changed in kile (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Debdiff for the SRU request.

description: updated
summary: - Kile crashes with SIGSEGV on entering a double quote if "abstract" is
- commented out
+ [SRU» Kile crashes with SIGSEGV on entering a double quote if "abstract"
+ is commented out
summary: - [SRU» Kile crashes with SIGSEGV on entering a double quote if "abstract"
+ [SRU] Kile crashes with SIGSEGV on entering a double quote if "abstract"
is commented out
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package kile - 1:2.1.0~svn958896-0ubuntu1

---------------
kile (1:2.1.0~svn958896-0ubuntu1) karmic; urgency=low

  * Merge with debian; remaining ubuntu changes:
    - debian/rules: Keep our own simple kde4.mk based file
    - debian/control: Build-depend on cdbs instead of pkg-kde-tools
    - debain/control: Don't suggest kile-i18n
    - debian/kile-doc.install: Install to /usr/share/doc/kde/HTML
    - debian/kile.install: Install kile.xpm directly from the debian dir
      as our debian/rules doesn't move it into debian/tmp
  * New svn snapshot:
    - Fixes chosen char encoding not used in open dialog. (LP: #362292)
    - Fixes crash entering double quotes in some occasions. (LP: #362537)
    - Drop all cherry-picked revision patches
  * debian/kile.docs: Remove Building-with-cmake.txt, no longer exists.

 -- Andreas Wenning <email address hidden> Tue, 28 Apr 2009 23:52:56 +0200

Changed in kile (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
AndyOsi (andres-osinski) wrote :

I am still getting an error when inserting double quotes on an ISO-8859-1 encoded file when I insert \" next to a word.

Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

@Andy
It is currently only fixed in the development release (9.10/karmic); but I am working on getting it into 9.04/jaunty.

Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

motu-sru ACK.

Changed in kile (Ubuntu Jaunty):
status: New → Confirmed
Revision history for this message
Devid Antonio Filoni (d.filoni) wrote :

Andreas's debdiff uploaded to jaunty-proposed.

Revision history for this message
Scott Kitterman (kitterman) wrote :

Accepted into jaunty-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

Changed in kile (Ubuntu Jaunty):
status: Confirmed → Fix Committed
tags: added: verification-needed
Revision history for this message
Andreas Wenning (andreas-wenning) wrote :

Tested and works! The version in jaunty-proposed does not crash entering double quotes when the one in -release would. And the open dialog shows correctly the chosen encoding. Everything else looks to work as before as well.

Martin Pitt (pitti)
tags: added: verification-done
removed: verification-needed
Revision history for this message
Martin Pitt (pitti) wrote :

Copied to jaunty-updates. The changelog has an invalid reference to the Launchpad bugs, thus this wasn't picked up automatically.

Changed in kile (Ubuntu Jaunty):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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