"Open file with Nedit" from PCManFM causes Nedit to crash

Bug #1415309 reported by Dave Kokandy
50
This bug affects 5 people
Affects Status Importance Assigned to Milestone
nedit (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Was trying to reproduce this bug: https://bugs.launchpad.net/ubuntu/+source/lubuntu-meta/+bug/1395437 on vivid (Development version)

But in trying to reproduce, nedit crashed immediately.

To reproduce:

Install nedit on Lubuntu.

In PCManFM, right click on a text file and select "Open with..." and select Nedit

It immediately crashes. Subsequently, I cannot run Nedit at all.

ProblemType: Crash
DistroRelease: Ubuntu 15.04
Package: nedit 1:5.6-1
ProcVersionSignature: Ubuntu 3.18.0-11.12-generic 3.18.3
Uname: Linux 3.18.0-11-generic x86_64
ApportVersion: 2.15.1-0ubuntu4
Architecture: amd64
CurrentDesktop: LXDE
Date: Tue Jan 27 22:53:25 2015
ExecutablePath: /usr/bin/nedit
InstallationDate: Installed on 2015-01-28 (0 days ago)
InstallationMedia: Lubuntu 15.04 "Vivid Vervet" - Alpha amd64 (20150124)
ProcCmdline: nedit -server
ProcEnviron:
 LANGUAGE=en_US
 PATH=(custom, no user)
 XDG_RUNTIME_DIR=<set>
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SegvAnalysis: Skipped: missing required field "Disassembly"
Signal: 11
SourcePackage: nedit
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip lpadmin plugdev sambashare sudo

Revision history for this message
Dave Kokandy (drkokandy) wrote :
Revision history for this message
Apport retracing service (apport) wrote : Stacktrace.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceSource.txt
Revision history for this message
Apport retracing service (apport) wrote : StacktraceTop.txt
Revision history for this message
Apport retracing service (apport) wrote : ThreadStacktrace.txt
Changed in nedit (Ubuntu):
importance: Undecided → Medium
tags: removed: need-amd64-retrace
Revision history for this message
Graham Inggs (ginggs) wrote :

I don't see any private information here, marking as public.

information type: Private → Public
Revision history for this message
Launchpad Janitor (janitor) wrote :

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

Changed in nedit (Ubuntu):
status: New → Confirmed
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Line 781 in text.c tries to do something with a font parameter. I must admit I don't know how to change that on the top of my head, but could you try to change the default font (or the font for nedit) before starting it?

Revision history for this message
Graham Inggs (ginggs) wrote :

Interesting that you mention fonts. When I opened Nedit in Vivid I noticed the fonts were very different to what they were in Utopic. Compare the screenshots attached.

Revision history for this message
Graham Inggs (ginggs) wrote :
Revision history for this message
Paul Gevers (paul-climbing) wrote : Re: [Bug 1415309] Re: "Open file with Nedit" from PCManFM causes Nedit to crash

On 11-04-15 11:25, Graham Inggs wrote:
> Interesting that you mention fonts. When I opened Nedit in Vivid I
> noticed the fonts were very different to what they were in Utopic.
> Compare the screenshots attached.

Well, between 5.6~cvs20081118-9 and 5.6-1 not much changed.... except
some small stuff about XFT fonts. A new comment (+ some code) in
source/nedit.c says:

 If using OpenMotif 2.3.3 or better, support XFT fonts. XFT is
 claimed supported in OpenMotif 2.3.0, but doesn't work very well,
 as insensitive text buttons are blank. That bug is fixed in 2.3.3.

And the code goes on to declare some variables, although I don't think
they are used (there is a check for USE_XFT==1 and I don't see it set
anywhere). It seems that with Graham and my setup, this works as
intended, but in the setup of Dave, Qwerty and Mazen, things go wrong.

I'll try to figure out where these fonts are coming from and how to
change it, the same comment as quoted above mentions it should be
possible via:
$ nedit -xrm '*textFontList: myfont'

Revision history for this message
Mazen (mezen) wrote :

For me this segfaults:

$ nedit -xrm '*textFontList: -*-dina-medium-r-*-*-16-*-*-*-*-*-*-*'
Erreur de segmentation (core dumped)

but this doesnt:
$ nedit -xrm '*font: -*-dina-medium-r-*-*-16-*-*-*-*-*-*-*'

Revision history for this message
Graham Inggs (ginggs) wrote :

So my Vivid install is fairly clean, it was installed from the ubuntu-15.04-beta2-desktop-amd64.iso image about a week ago.

I attach the output of 'dpkg -l "*font*" | grep ii', is it very different to what you have?

Revision history for this message
Paul Gevers (paul-climbing) wrote :

> And the code goes on to declare some variables, although I don't think
> they are used (there is a check for USE_XFT==1 and I don't see it set
> anywhere).

Well, compiling with USE_XFT=0 gives me indeed the fonts as they looked
before, so I start to believe that the setup of Maven is really using
XFT and it that breaks NEdit as there probably is no
fs->max_bounds.width. I see one easy solution and one proper solution.
easy: compile NEdit with XFT=0
proper: make NEdit more robust against the situation.

I just found out that there is a new upstream release (with a weird
version number with respect to the past) that has multiple changes in
the domain of fonts.

I tend to think that it might be a good idea to get that new version
packaged and included in Ubuntu.

I will work on it and build the package in my PPA. Maven, if I do that,
could you then test the package?

Paul

Revision history for this message
Graham Inggs (ginggs) wrote :

I was able to reproduce the problem by uninstalling xfonts-75dpi and xfonts-100dpi.

So another solution might be for nedit to recommend those fonts, as is done in grace (which is the package I happened to have installed on Vivid):
Recommends: xfonts-100dpi | xfonts-75dpi | xfonts-100dpi-transcoded | xfonts-75dpi-transcoded

Revision history for this message
Paul Gevers (paul-climbing) wrote :

On 11-04-15 21:43, Graham Inggs wrote:
> So another solution might be for nedit to recommend those fonts, as is done in grace (which is the package I happened to have installed on Vivid):
> Recommends: xfonts-100dpi | xfonts-75dpi | xfonts-100dpi-transcoded | xfonts-75dpi-transcoded

Graham, I am not able to upload NEdit myself to Ubuntu, so if I ask you,
do you prefer the above mentioned solution, even if the new version of
NEdit would solve the issue? Or would you be willing to sponsor the new
version?

[Trying to upload the source now, but dput is not playing nice with me].

Paul

Revision history for this message
Paul Gevers (paul-climbing) wrote :

Maven or Dave,

Could you please test the NEdit package from my PPA [1] once it is
published (shouldn't take long, they are already built)?

[1] https://launchpad.net/~paul-climbing/+archive/ubuntu/testing-area

Paul

Revision history for this message
Graham Inggs (ginggs) wrote :

5.6a still segfaults for me without any of the xfonts-* packages installed.
Do you know what else is new in 5.6a? ChangeLog and ReleaseNotes seem to be out of date.

If you are happy to add the Recommends line to 5.6.1 and upload to Experimental, I will sync that into Ubuntu.
It will be good to also test this in a PPA and wait for feedback from Mazen or Dave.

Revision history for this message
Mazen (mezen) wrote :
Download full text (3.2 KiB)

@Graham,

I've installed nedit from the ppa but doesnt work

$ sudo apt-get install nedit
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Paquets suggérés :
  csh
Les NOUVEAUX paquets suivants seront installés :
  nedit
0 mis à jour, 1 nouvellement installés, 0 à enlever et 23 non mis à jour.
Il est nécessaire de prendre 674 ko dans les archives.
Après cette opération, 2 356 ko d'espace disque supplémentaires seront utilisés.
Réception de : 1 http://ppa.launchpad.net/paul-climbing/testing-area/ubuntu/ vivid/main nedit amd64 1:5.6a-1~ppa1vivid [674 kB]
674 ko réceptionnés en 3s (201 ko/s)
Sélection du paquet nedit précédemment désélectionné.
(Lecture de la base de données... 222804 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../nedit_1%3a5.6a-1~ppa1vivid_amd64.deb ...
Dépaquetage de nedit (1:5.6a-1~ppa1vivid) ...
Traitement des actions différées (« triggers ») pour gnome-menus (3.10.1-0ubuntu5) ...
Traitement des actions différées (« triggers ») pour desktop-file-utils (0.22-1ubuntu3) ...
Traitement des actions différées (« triggers ») pour bamfdaemon (0.5.1+15.04.20150202-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Traitement des actions différées (« triggers ») pour mime-support (3.58ubuntu1) ...
Traitement des actions différées (« triggers ») pour man-db (2.7.0.2-5) ...
Traitement des actions différées (« triggers ») pour doc-base (0.10.6) ...
Traitement de 1 fichier de documentation ajouté…
Enregistrement des documents avec scrollkeeper…
Paramétrage de nedit (1:5.6a-1~ppa1vivid) ...

$ nedit
Erreur de segmentation (core dumped)

Now, when I install xfonts-100dpi, it works.

My vivid is a fresh install -- installed 3 days ago ---
After this line, i've purged the ppa and tried to install/reinstall xfonts-100dpi
(xfonts-100dpi was installed but nedit crashes, xfonts-75dpi wasnt installed)

Here I removed the config files with --purge
$ sudo apt-get remove --purge xfonts-100dpi xfonts-75dpi
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Le paquet « xfonts-100dpi » n'est pas installé, et ne peut donc être supprimé
Le paquet « xfonts-75dpi » n'est pas installé, et ne peut donc être supprimé
0 mis à jour, 0 nouvellement installés, 0 à enlever et 23 non mis à jour.

$ nedit
Erreur de segmentation (core dumped)

$ sudo apt-get install xfonts-100dpi
Lecture des listes de paquets... Fait
Construction de l'arbre des dépendances
Lecture des informations d'état... Fait
Les NOUVEAUX paquets suivants seront installés :
  xfonts-100dpi
0 mis à jour, 1 nouvellement installés, 0 à enlever et 23 non mis à jour.
Il est nécessaire de prendre 0 o/3 823 ko dans les archives.
Après cette opération, 4 066 ko d'espace disque supplémentaires seront utilisés.
Sélection du paquet xfonts-100dpi précédemment désélectionné.
(Lecture de la base de données... 222861 fichiers et répertoires déjà installés.)
Préparation du dépaquetage de .../xfonts-100dpi_1%3a1.0.4_all.deb ...
Dépaquetage de xfonts-100dpi (1:1.0.4) ...
Traitement des actions différées (« triggers ») po...

Read more...

Revision history for this message
Paul Gevers (paul-climbing) wrote :

Hi Graham and Maven,

Given the fact that your testing showed that having the latest NEdit
version doesn't help this specific issue, I tend to only go for the
solution that Graham suggested: the depends/recommends field.

I'll try to prepare an upload, but may not get around it today. Monday
or Tuesday evening it will be then. I will keep you informed.

Paul

Revision history for this message
Graham Inggs (ginggs) wrote :

Thanks Paul.

If I understand policy correctly, that must be a Recommends, not a Depends:
https://www.debian.org/doc/debian-policy/ch-customized-programs.html#s11.8.5
There's also a Linitan error: package-depends-on-an-x-font-package.

I agree that NEdit should be made more robust against the situation where it cannot find any fonts, but that's probably a bug for upstream.

Revision history for this message
Graham Inggs (ginggs) wrote :

Paul, just a quick thought.

Should we rather be adding the
Recommends: xfonts-100dpi | xfonts-75dpi | xfonts-100dpi-transcoded | xfonts-75dpi-transcoded
line to libxm4 ?

Revision history for this message
Paul Gevers (paul-climbing) wrote :

On 12-04-15 16:19, Graham Inggs wrote:
> Should we rather be adding the
> Recommends: xfonts-100dpi | xfonts-75dpi | xfonts-100dpi-transcoded | xfonts-75dpi-transcoded
> line to libxm4 ?

I have no idea. Why do you think that would make sense, is it because
motif now has XFT support? I was about to work on the updated NEdit
package, do you want me to wait?

Paul

Revision history for this message
Graham Inggs (ginggs) wrote :

> I have no idea. Why do you think that would make sense, is it because
> motif now has XFT support?

Possibly because Motif now has XFT support, and possibly it should always have been there.

> I was about to work on the updated NEdit
> package, do you want me to wait?

Yes, please wait. We still have some time to get NEdit into Vivid (another week would be fine), but there is some urgency in getting Motif into Jessie.

Revision history for this message
Graham Inggs (ginggs) wrote :

So this looks like it is an Ubuntu-specific problem.
In Debian, xorg depends on:

 xfonts-base (>= 1:1.0.0-1),
 xfonts-100dpi (>= 1:1.0.0-1),
 xfonts-75dpi (>= 1:1.0.0-1),
 xfonts-scalable (>= 1:1.0.0-1),

This was changed in Ubuntu some time ago:

xorg (1:7.5+6ubuntu7) natty; urgency=low

  * debian/control: Drop xfonts-{75,100}dpi from Depends: to Suggests:. We
    don't need them for a normal desktop installation, and even xcalc/xterm
    don't need them, but they are quite sizable.

 -- Martin Pitt <email address hidden> Tue, 11 Jan 2011 18:41:09 -0600

Paul, shall I just upload NEdit with the added Recommends line to Ubuntu for now?

Revision history for this message
Paul Gevers (paul-climbing) wrote :

> Paul, shall I just upload NEdit with the added Recommends line to Ubuntu
> for now?

Doesn't it make more sense to do this in Motif as you mentioned earlier?
If not, fixing this in Ubuntu only for now is fine of course, but fixing
it via Debian (although it is not strictly needed there) is fine with me
as well.

Paul

Revision history for this message
Graham Inggs (ginggs) wrote :

> Doesn't it make more sense to do this in Motif as you mentioned earlier?

I have tried running just about every Motif package on Vivid without xfonts-75dpi and xfonts-100dpi installed.
Some of them do appear a little different, but none of them segfault.

This looks like a bug in NEdit to me, but I'll work around it for now by recommending those fonts in Ubuntu's nedit.

Paul: If the segfault gets fixed and we still think NEdit needs those fonts, it would be nice if you would add the recommends to the Debian packaging so we don't need an Ubuntu delta, as was done in grace ( https://bugs.debian.org/670613 )

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package nedit - 1:5.6-1ubuntu1

---------------
nedit (1:5.6-1ubuntu1) vivid; urgency=medium

  * Add Recommends on xfonts-{100,75}dpi* to work around
    crash on startup on Ubuntu systems (LP: #1415309)
 -- Graham Inggs <email address hidden> Tue, 14 Apr 2015 16:26:05 +0200

Changed in nedit (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Paul Gevers (paul-climbing) wrote :

Did I even mentioned I reported this upstream and that a patch is available there?
https://sourceforge.net/p/nedit/git/ci/1a441b957a7f37bb9ab7ae15fefd3f41d59b3da4/

Probably should go into the packaging soon.

Revision history for this message
Brian Murray (brian-murray) wrote :

There are still many crashes being reported in the Error Tracker regarding this:

https://errors.ubuntu.com/bucket/?id=/usr/bin/nedit%3A11%3Ainitialize%3ACallInitialize%3AxtCreate%3A_XtCreateWidget%3A_XtVaCreateWidget

It seems to be currently affecting Wily and Xenial.

Revision history for this message
Rod Smith (rodsmith) wrote :

I find that I get crashes until ~/.nedit is populated. I've gotten in the habit of copying that directory from a working system when installing a new one.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

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