Emacs-24 crashes at startup [$5]

Bug #1355274 reported by Joseph Botosh
164
This bug affects 34 people
Affects Status Importance Assigned to Milestone
elementary OS
Confirmed
Undecided
Unassigned

Bug Description

Here is the output in terminal

X protocol error: BadMatch (invalid parameter attributes) on protocol request 140
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
For details, see etc/PROBLEMS.
Fatal error 6: Aborted
Backtrace:
emacs[0x4f74cb]
emacs[0x4dcf3e]
emacs[0x4f7513]
emacs[0x4b219b]
emacs[0x4b420c]
emacs[0x4b426d]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x12b)[0x7fb47c94054b]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3b5e7)[0x7fb47c93d5e7]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3b695)[0x7fb47c93d695]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XReply+0x1e8)[0x7fb47c93e578]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x325e0)[0x7fb47c9345e0]
...
Aborted (core dumped)

I am using proprietary fglrx drivers.

ProblemType: Bug
DistroRelease: elementary OS 0.3
Package: elementary-desktop 1.348+392~ubuntu0.3.1 [origin: LP-PPA-elementary-os-daily]
ProcVersionSignature: Ubuntu 3.13.0-32.57-generic 3.13.11.4
Uname: Linux 3.13.0-32-generic x86_64
NonfreeKernelModules: fglrx
ApportVersion: 2.14.1-0ubuntu3.3
Architecture: amd64
CrashDB: elementary_meta
CurrentDesktop: Pantheon
Date: Mon Aug 11 18:45:14 2014
InstallationDate: Installed on 2014-08-11 (0 days ago)
InstallationMedia: elementary OS 0.3 "Freya" - Daily amd64 (20140810)
SourcePackage: elementary-meta
SuspiciousXErrors:

ThirdParty: True
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Joseph Botosh (rumly111) wrote :
tags: added: emacs
Revision history for this message
Aleš Bizjak (abizjak) wrote :

This is the same problem as in

https://bugzilla.gnome.org/show_bug.cgi?id=724067

there is also some discussion at

https://bugzilla.gnome.org/show_bug.cgi?id=85715

(towards the end of the comments section).

Changed in elementaryos:
status: New → Confirmed
Revision history for this message
Tom von Schwerdtner (tvon) wrote :

FWIW, reading those comments I have had success launching emacs with XLIB_SKIP_ARGB_VISUALS=1

Revision history for this message
Albin Stjerna (albins) wrote :

Still present in Freya.

Revision history for this message
TC (smalltimer) wrote :

Yup. Can confirm the bug too. Amazing. Emacs is one of the first apps we should get right guys!!

Revision history for this message
Pierre (rockerilla) wrote :

Hi dear

I confirm the bug, I do most of the tasks using emacs and I hope it'll be solved at some point. Following some examples found on the internet I did the following: on the terminal I did

export XLIB_SKIP_ARGB_VISUALS=1

then I opened emacs trough the terminal and it works perfectly. I am not sure what this does but it works.

Regards
Pierre

Revision history for this message
Pierre (rockerilla) wrote :

Dear all

one thing I should add to the my previous post is that this problem appeared after I switched to nvidia drivers, before I was using nouveau drivers.

Regards
Pierre

Revision history for this message
Adam (callison-adam) wrote :

Same problem (in Freya) here.

Same solution: XLIB_SKIP_ARGB_VISUALS=1

This is a real shame; elementary OS is beautiful, but things like this should not make it to release.

Revision history for this message
Albin Stjerna (albins) wrote :

This is the gdb backtrace I get when running emacs (with debugging symbols installed):
Backtrace:
/usr/bin/emacs24[0x4f74cb]
/usr/bin/emacs24[0x4dcf3e]
/usr/bin/emacs24[0x4f7513]
/usr/bin/emacs24[0x4b219b]
/usr/bin/emacs24[0x4b420c]
/usr/bin/emacs24[0x4b426d]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x12b)[0x7ffff4d0454b]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3b5e7)[0x7ffff4d015e7]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3b695)[0x7ffff4d01695]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XEventsQueued+0x55)[0x7ffff4d01fc5]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XPending+0x4d)[0x7ffff4cf412d]
...

Program received signal SIGABRT, Aborted.
0x00007ffff1ba220b in raise (sig=sig@entry=6)
    at ../nptl/sysdeps/unix/sysv/linux/pt-raise.c:37
37 ../nptl/sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.

Revision history for this message
Pierre (rockerilla) wrote :

Hello Dears

putting

export XLIB_SKIP_ARGB_VISUALS=1

in .profile causes strange behavior in the desktop server, the desktop are above the dock is compressed and a lot of windows behave strangely.

Putting the command into .bashrc doesn't suffer this problem but then I have to invoke emacs only from command line.

... it's a pitty that one of the icons of the linux workd, that is emacs, can't be used effectively in EOS.

:-)
Pierre

Revision history for this message
AD (kepler4and5) wrote :

Found this on Twitter; came back here to post for other people. Just run from command line with sudo:

sudo emacs

That's it!

Revision history for this message
Pierre (rockerilla) wrote :

Thanks AD83

but this does not solve the problem because most of the time you don't have to operate at sudo level.

Honestly it is ridicolous that this has not been sorted out, EMACS is a pillar of the Linux/Unix story.

Pierre

Revision history for this message
Manishhotmail (manish-gaurav) wrote :

I am have the same problem. Although XLIB_SKIP_ARGB_VISUALS=1 solution works. i tried opening emacs24 with sudo and it works too!! Just open using sudo emacs24.

Revision history for this message
climatewarrior (gabrieljoel) wrote :

Still happens on Loki, the XLIB_SKIP_ARGB_VISUALS=1 still works. I think this bug should have a bigger priority. Having emacs work is such a basic thing.

Revision history for this message
Zisu Andrei (matzipan) wrote :

If there are no volunteers willing to work on it, it's unlikely it will get too much traction. If this issue is very important to you, consider placing a bug bounty: https://www.bountysource.com/teams/elementary/bounties

Revision history for this message
climatewarrior (gabrieljoel) wrote :

I just put a bounty. It was actually quite hard to figure out how to post a bounty on bountysource. Perhaps it would be good if there where some Elementary guide on how to do it.

Revision history for this message
Denis Washington (dwashington) wrote :

It's really a shame that Emacs doesn't just work with elementary.

To make your live easier, you can set XLIB_SKIP_ARGB_VISUALS=1 directly in Emacs' .desktop file. Just modify /usr/share/applications/emacs.desktop to say:

    Exec=env XLIB_SKIP_ARGB_VISUALS=1 emacs %F

Alternatively, you can copy over the .desktop file to $HOME/.local/share/applications so that it is not overwritten on the next Emacs package upgrade.

summary: - Emacs-24 crashes at startup
+ Emacs-24 crashes at startup [$5]
Revision history for this message
Russell Sears (sears) wrote :

Here is version of the same workaround that works from the command line (but not from the applications menu):

The default .profile prepends $HOME/bin to your path, so create it if it doesn't exist:

  mkdir -p ~/bin

Now, create an emacs wrapper script with the following two lines in ~/bin/emacs:

  #!/bin/sh
  XLIB_SKIP_ARGB_VISUALS=1 /usr/bin/emacs $*

finally:

  chmod a+x ~/bin/emacs

On my machine:

  $ echo $PATH
  /home/me/bin:....
  $ ls -l ~/bin/emacs
  -rwxrwxr-x 1 me me 53 Jan 14 12:02 /home/me/bin/emacs
  $ cat ~/bin/emacs
  #!/bin/sh
  XLIB_SKIP_ARGB_VISUALS=1 /usr/bin/emacs $*

Revision history for this message
Markus Padourek (markus-padourek) wrote :

Just ran into this as well and agreed, emacs should be one of the things that should be working by default.

Revision history for this message
nammidd (nammidd) wrote :

Not only Emacs-24 crashes at startup, Emacs-25 too

Revision history for this message
Thomas Nilefalk (thoni56) wrote :

Encountered this with latest updates at 2017-05-07...

Revision history for this message
Michael Grant (mgrant) wrote :

I'm stunned. This was reported in 2014 and it's still not fixed! Today I tried ElementaryOS 0.4 and emacs was the very first package I installed and to my astonishment, I can't even edit a file without resorting to searching the web for a fix!

$ emacs

(emacs:1944): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2045:14: 'min-height' is not a valid property name

(emacs:1944): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2046:13: 'min-width' is not a valid property name

(emacs:1944): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2051:13: 'min-width' is not a valid property name
X protocol error: BadMatch (invalid parameter attributes) on protocol request 139
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
For details, see etc/PROBLEMS.

(emacs:1944): GLib-WARNING **: g_main_context_prepare() called recursively from within a source's check() or prepare() member.

(emacs:1944): GLib-WARNING **: g_main_context_check() called recursively from within a source's check() or prepare() member.
Fatal error 6: Aborted
Backtrace:
emacs[0x5036d3]
emacs[0x4e9d6e]
emacs[0x503713]
emacs[0x4bd9ef]
emacs[0x4bf9dc]
emacs[0x4bfa3d]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x11d)[0x7f6e91914c4d]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3cad7)[0x7f6e91911ad7]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3cb95)[0x7f6e91911b95]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XEventsQueued+0x55)[0x7f6e91912555]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XPending+0x57)[0x7f6e91903f47]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x5ae9e)[0x7f6e930f9e9e]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_prepare+0x15d)[0x7f6e9207a91d]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4a2bb)[0x7f6e9207b2bb]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_pending+0x27)[0x7f6e9207b447]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_events_pending+0xd)[0x7f6e9358b40d]
emacs[0x4bdb1b]
emacs[0x4f0fa1]
emacs[0x4f0945]
emacs[0x4594e5]
emacs[0x41c148]
emacs[0x41df02]
emacs[0x41f3bb]
emacs[0x42182d]
emacs[0x451e1f]
emacs[0x451fa6]
emacs[0x452172]
emacs[0x452790]
emacs[0x58158e]
emacs[0x55cc3d]
emacs[0x56026e]
emacs[0x593f2f]
emacs[0x55d3af]
emacs[0x55d74b]
emacs[0x55da6a]
emacs[0x564742]
emacs[0x5665b2]
emacs[0x55d92c]
emacs[0x592b23]
emacs[0x55d3af]
emacs[0x55d74b]
...
Aborted (core dumped)

I tried the above recommendation of inserting the Exec line into the .desktop file, it did not work. I tried both in my own .local version and in the system one.

It does work to execute emacs using this command however I get all these warning messages:

XLIB_SKIP_ARGB_VISUALS=1 /usr/bin/emacs

(emacs:2545): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2045:14: 'min-height' is not a valid property name

(emacs:2545): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2046:13: 'min-width' is not a valid property name

(emacs:2545): Gtk-WARNING **: Theme parsing error: gtk-widgets.css:2051:13: 'min-width' is not a valid property name

Why is this so difficult to fix?

Revision history for this message
James Avery (avery-diku) wrote :

We are now in 2019, and it is still not fixed. How has the XLIB_SKIB_ARGB_VISUALS=1 workaround not been integrated into Elementatry yet after 4 years? It is ridiculous that one of the most fundamental programs through three decades is not able to run out of the box. No one should have to scour the internet in order to find a workaround to be able to edit a file after installing Elementary OS.

Revision history for this message
James Avery (avery-diku) wrote :

avery@pukekoii:~$ lsb_release -a
No LSB modules are available.
Distributor ID: elementary
Description: elementary OS 5.0 Juno
Release: 5.0
Codename: juno

avery@pukekoii:~$ emacs
X protocol error: RenderBadPicture (invalid Picture parameter) on protocol request 139
When compiled with GTK, Emacs cannot recover from X disconnects.
This is a GTK bug: https://bugzilla.gnome.org/show_bug.cgi?id=85715
For details, see etc/PROBLEMS.
Fatal error 6: Aborted
Backtrace:
emacs[0x50a4de]
emacs[0x4f0ad9]
emacs[0x50a583]
emacs[0x4c0920]
emacs[0x4c4c69]
emacs[0x4c4ceb]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x11a)[0x7f76bd3e98fa]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3d82b)[0x7f76bd3e682b]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3d8d5)[0x7f76bd3e68d5]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XReadEvents+0x89)[0x7f76bd3e7329]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XIfEvent+0xa4)[0x7f76bd3cea14]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x6d6df)[0x7f76bd4166df]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x6e3e3)[0x7f76bd4173e3]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XimRead+0x51)[0x7f76bd4176e1]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x5d230)[0x7f76bd406230]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XDestroyIC+0x12)[0x7f76bd3f4582]
emacs[0x4d55ef]
emacs[0x4cd400]
emacs[0x4cd8cb]
emacs[0x4279a0]
emacs[0x4c0993]
emacs[0x4c4c69]
emacs[0x4c4ceb]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XError+0x11a)[0x7f76bd3e98fa]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3d82b)[0x7f76bd3e682b]
/usr/lib/x86_64-linux-gnu/libX11.so.6(+0x3d8d5)[0x7f76bd3e68d5]
/usr/lib/x86_64-linux-gnu/libX11.so.6(_XEventsQueued+0x55)[0x7f76bd3e7205]
/usr/lib/x86_64-linux-gnu/libX11.so.6(XPending+0x5d)[0x7f76bd3d8d3d]
/usr/lib/x86_64-linux-gnu/libgdk-3.so.0(+0x6809e)[0x7f76bec0409e]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_prepare+0x1c8)[0x7f76bdb4fb28]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0x4c4fb)[0x7f76bdb504fb]
/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_pending+0x27)[0x7f76bdb50687]
/usr/lib/x86_64-linux-gnu/libgtk-3.so.0(gtk_events_pending+0xd)[0x7f76bf0c1a9d]
emacs[0x4c1327]
emacs[0x4f7a01]
emacs[0x4f8095]
emacs[0x563a8d]
emacs[0x563cfa]
emacs[0x588485]
emacs[0x5890a1]
emacs[0x563b59]
...

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.