gedit crashes when opening latex-plugin preferences

Bug #957924 reported by aloctavodia
70
This bug affects 15 people
Affects Status Importance Assigned to Milestone
Gedit Latex Plugin
Fix Released
Critical
gedit-latex-plugin (Ubuntu)
Fix Released
Medium
Unassigned
Precise
Won't Fix
Low
Unassigned

Bug Description

Gedit latex-plugin does not work,. The latex tools do not load when oppening a .tex file. The plugin appears in the plugin-menu. When I try to open the latex-plugin preferences gedit crashes.

ProblemType: Crash
DistroRelease: Ubuntu 12.04
Package: gedit 3.3.7-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-18.29-generic 3.2.9
Uname: Linux 3.2.0-18-generic x86_64
ApportVersion: 1.94.1-0ubuntu2
Architecture: amd64
CrashCounter: 1
Date: Sat Mar 17 11:07:56 2012
ExecutablePath: /usr/bin/gedit
InstallationMedia: Ubuntu 11.04 "Natty Narwhal" - Release amd64 (20110427.1)
ProcCmdline: gedit
SegvAnalysis:
 Segfault happened at: 0x7f31d111a54b: mov (%r14),%rax
 PC (0x7f31d111a54b) ok
 source "(%r14)" (0x00000008) not located in a known VMA region (needed readable region)!
 destination "%rax" ok
SegvReason: reading NULL VMA
Signal: 11
SourcePackage: gedit
StacktraceTop:
 ?? () from /usr/lib/libpeas-gtk-1.0.so.0
 g_closure_invoke () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 ?? () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_signal_emit_valist () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
 g_signal_emit () from /usr/lib/x86_64-linux-gnu/libgobject-2.0.so.0
Title: gedit crashed with SIGSEGV in g_closure_invoke()
UpgradeStatus: Upgraded to precise on 2012-03-17 (0 days ago)
UserGroups: adm admin cdrom dialout fuse lpadmin plugdev sambashare

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

StacktraceTop:
 show_configure_cb (widget=<optimized out>, pm=0x2804550) at peas-gtk-plugin-manager.c:229
 g_closure_invoke (closure=0x3693d90, return_value=0x0, n_param_values=1, param_values=0x3456240, invocation_hint=<optimized out>) at /build/buildd/glib2.0-2.31.20/./gobject/gclosure.c:777
 signal_emit_unlocked_R (node=<optimized out>, detail=0, instance=<optimized out>, emission_return=0x0, instance_and_params=0x3456240) at /build/buildd/glib2.0-2.31.20/./gobject/gsignal.c:3547
 g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=0, var_args=<optimized out>) at /build/buildd/glib2.0-2.31.20/./gobject/gsignal.c:3295
 g_signal_emit (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>) at /build/buildd/glib2.0-2.31.20/./gobject/gsignal.c:3352

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
visibility: private → public
Revision history for this message
Launchpad Janitor (janitor) wrote : Re: gedit crashed when openning latex-plugin preferences

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in gedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Karl Maier (w-wall2001) wrote :

It happens on my machine also, when I start gedit and select "Edit" - "Preferences" - "Latex Plugin" - "Preferences" it crashes. Here is the output when I start gedit from the console:

Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/latex/windowactivatable.py", line 79, in do_activate
    self._tool_preferences = ToolPreferences()
  File "/usr/lib/gedit/plugins/latex/util.py", line 40, in getinstance
    instances[cls] = cls()
  File "/usr/lib/gedit/plugins/latex/preferences/tools.py", line 72, in __init__
    self.__tools = ElementTree.parse(filename).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1177, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 654, in parse
    self._root = parser.close()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1636, in close
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: unclosed token: line 2, column 2
Traceback (most recent call last):
  File "/usr/lib/gedit/plugins/latex/windowactivatable.py", line 147, in do_create_configure_widget
    return PreferencesDialog().dialog
  File "/usr/lib/gedit/plugins/latex/preferences/dialog.py", line 333, in dialog
    self._tool_preferences = ToolPreferences()
  File "/usr/lib/gedit/plugins/latex/util.py", line 40, in getinstance
    instances[cls] = cls()
  File "/usr/lib/gedit/plugins/latex/preferences/tools.py", line 72, in __init__
    self.__tools = ElementTree.parse(filename).getroot()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1177, in parse
    tree.parse(source, parser)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 654, in parse
    self._root = parser.close()
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1636, in close
    self._raiseerror(v)
  File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1488, in _raiseerror
    raise err
xml.etree.ElementTree.ParseError: unclosed token: line 2, column 2
Speicherzugriffsfehler

summary: - gedit crashed when openning latex-plugin preferences
+ gedit crashes when opening latex-plugin preferences
affects: gedit (Ubuntu) → gedit-plugins (Ubuntu)
Revision history for this message
JasonVenkiteswaran (jjvenky) wrote :

Same problem with gedit-latex-plugin 3.4.0-1 under Precise 12.04, but only as a regular user. When runing gedit as root, the plugin seems to work fine.

Revision history for this message
Martin Sass (rostock-maverick) wrote :

Had the same problem in 12.04 LTS.
Initially opening the preferences of latex-pluging worked well.
The problem occured first after trying to add new tools in the latex-plugin settings. I could not add anything so I tried to add the toolchain as a superuser. That did not work as well. But since then opening the preferences with normal privileges always caused a crash as decribed above. I tried to use the latex-plugin with an other ubuntu user were no crash occured.

Finally deleting the files latex.pkl and tools.xml in ~/.config/gedit/latex solved the crash problem for me

Revision history for this message
Michiel Renger (dingenis) wrote :

Same here in Xubuntu 12.04. Indeed, whenever I make any change to the tools and quit gedit, an incomplete tools.xml is created:

<tools>
  <tool description="Create a PDF from LaTeX source" extensions=".tex" id="1"

Revision history for this message
Gabriel Guimaraes (gabrielmng-j) wrote :

It will affect you if you have a previous version installed due to differences in tools.xml - someone should have predicted it when altering the source code..
Type that in terminal (in your user folder):
rm /.config/gedit/latex/tools.xml
rm /.config/gedit/latex/latex.pkl

Any crash after that?

Revision history for this message
aloctavodia (aloctavodia) wrote :

Thanks Gabriel.

It does not crash anymore and also now the plugin is working!!! This bug was bothering me for months.

Revision history for this message
androith (androith) wrote :

The problem with the solution in #10 is that changing your compile command brings the problem back (in particular, I wish to have `pdflatex -synctex=1 $filename` as my compile to PDF command).

Revision history for this message
androith (androith) wrote :
Download full text (3.6 KiB)

I found this bug "upstream" in gnome's bugzilla (https://bugzilla.gnome.org/show_bug.cgi?id=676570), and here is a solution.

The crash is connected to the file ~/.config/gedit/latex/tools.xml. If you remove this file, Latex plugin loads correctly and doesn't crash when you enter preferences. However, that file is where you store custom compilation commands!

1. Copy the default tools.xml over the local one:
cp /usr/share/gedit/plugins/latex/tools.xml ~/.config/gedit/latex/tools.xml

2. Edit ~/.config/gedit/latex/tools.xml and remove the arrow characters.
(I replaced all "->" characters with the word "to" so that "TEX -> PDF" now reads "TEX to PDF" . The bug comments at gnome's tracker seem to suggest this is a problem.)

3. Edit the same file (~/.config/gedit/latex/tools.xml) and change the compilation command to what you want.

Please note that if you have an error in that file, the crash will still occur. (For example, choosing ASFASF as the postProcessor for something will still crash the application.)

Here's my file which works (synctex, pdflatex and errors are nice):
$ cat ~/.config/gedit/latex/tools.xml
<tools>
  <tool description="Create a PDF from LaTeX source" extensions=".tex" id="1" label="LaTeX to PDF">
    <job mustSucceed="True" postProcessor="GenericPostProcessor">pdflatex -synctex=1 "$filename"</job>
    <job mustSucceed="True" postProcessor="GenericPostProcessor">gvfs-open "$shortname.pdf"</job>
  </tool>
  <tool description="Create a PostScript from LaTeX source" extensions=".tex" id="3" label="LaTeX to PS">
    <job mustSucceed="true" postProcessor="RubberPostProcessor">rubber --inplace --maxerr -1 --short --force --warn all --ps "$filename"</job>
    <job mustSucceed="true" postProcessor="GenericPostProcessor">gvfs-open "$shortname.ps"</job>
  </tool>
  <tool description="Create a DVI from LaTeX source" extensions=".tex" id="4" label="LaTeX to DVI">
    <job mustSucceed="true" postProcessor="RubberPostProcessor">rubber --inplace --maxerr -1 --short --force --warn all "$filename"</job>
    <job mustSucceed="true" postProcessor="GenericPostProcessor">gvfs-open "$shortname.dvi"</job>
  </tool>
  <tool description="Create a DVI with source specials from LaTeX source" extensions=".tex" id="5" label="LaTeX to DVI (Source Specials)">
    <job mustSucceed="true" postProcessor="LaTeXPostProcessor">latex -interaction batchmode -src "$filename"</job>
    <job mustSucceed="true" postProcessor="LaTeXPostProcessor">latex -interaction batchmode -src "$filename"</job>
    <job mustSucceed="true" postProcessor="GenericPostProcessor">xdvi -unique -s 6 -bg white -editor gedit "$shortname.dvi"</job>
  </tool>
  <tool description="Process R Sweave file and create a PDF from the resulting LaTeX source" extensions=".Rnw" id="6" label="R Sweave to PDF">
    <job mustSucceed="true" postProcessor="GenericPostProcessor">R CMD Sweave "$shortname.Rnw"</job>
    <job mustSucceed="true" postProcessor="RubberPostProcessor">rubber --inplace --maxerr -1 --short --force --warn all --pdf "$shortname.tex"</job>
    <job mustSucceed="true" postProcessor="GenericPostProcessor">gvfs-open "$shortname.pdf"</job>
  </tool>
  <tool description="Remove LaTeX b...

Read more...

Jeremy Bícha (jbicha)
affects: gedit-plugins (Ubuntu) → gedit-latex-plugin (Ubuntu)
Changed in gedit-latex-plugin (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package gedit-latex-plugin - 3.4.1-1

---------------
gedit-latex-plugin (3.4.1-1) quantal; urgency=low

  * new upstream version (bugfixes only) (LP: #957924)
  * debian/control:
    + added Enhance field (Closes: #685291)
    + added python-poppler depends. (LP: #1015035)
 -- Andrea Gasparini <email address hidden> Sun, 02 Sep 2012 15:26:25 +0200

Changed in gedit-latex-plugin (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Updating gedit-latex-plugin 3.4.0 to 3.4.1 in a precise SRU seems like it would be a good idea, does somebody want to file the SRU informations (see https://wiki.ubuntu.com/StableReleaseUpdates , it basically needs a description of the impact/test case/regression potential)? Bonus point if somebody wants to work on the update, I will review/sponsor it then

Changed in gedit-latex-plugin (Ubuntu Precise):
importance: Undecided → Low
status: New → Triaged
Changed in gedit-latex-plugin:
importance: Unknown → Critical
status: Unknown → Fix Released
Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in gedit-latex-plugin (Ubuntu Precise):
status: Triaged → Won't Fix
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.