unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "d.henman" <dhenman@gmail.com>
To: <emacs-devel@gnu.org>
Subject: cygwin emacs gtk2 problem fix
Date: Mon, 07 Jul 2008 09:32:08 +0900	[thread overview]
Message-ID: <20080707093208.3952@blackhawk> (raw)


I have found a simple fix to for the cygwin emacs gtk2 problem, as mentioned in the etc/PROBLEM file.  I do not have, the proper status to change the cvs files, so I am presenting this patch for the etc/PROBLEM file.   The patch below describes my fix fo
r the gtk2 emacs crash problem on startup, due to failure to allocate memory.

Regards,
  Darel Henman

For reference, this fix works on my machine which uses the following gtk2 elements and cygwin version:

glib-2.16.4  , atk-1.9.0 , pixman-0.11.4 , cairo-1.6.4 , pango-1.21.3 , gtk+-2.12.11
CYGWIN_NT-5.1 1.5.25(0.156/4/2) 2008-06-12
compiled with: gcc (GCC) 4.3.2 20080619 (prerelease)

 ================ submitted patch for etc/PROBLEMS file follows ================
--- emacs/etc/PROBLEMS
+++ modified-20080707
@@ -233,7 +233,7 @@
 This happens because of bugs in Gtk+.  Gtk+ 2.10 seems to be OK.  See bug
 http://bugzilla.gnome.org/show_bug.cgi?id=85715.
 
-** Emacs compiled with Gtk+ crashes on startup on Cygwin.
+** Emacs compiled with Gtk+ crashes on startup from Cygwin's X11 window.
 
 A typical error message is
   ***MEMORY-ERROR***: emacs[5172]: GSlice: failed to allocate 504 bytes
@@ -241,8 +241,18 @@
 
 Emacs supplies its own malloc, but glib (part of Gtk+) calls memalign and on
 Cygwin, that becomes the Cygwin supplied memalign.  As malloc is not the
-Cygwin malloc, the Cygwin memalign always returns ENOSYS.  A fix for this
-problem would be welcome.
+Cygwin malloc, the Cygwin memalign always returns ENOSYS. 
+
+A fix for this, that worked for me, involves setting the G_SLICE environment
+variable, which allows reconfiguration of the GSlice memory allocator.  It is 
+convenient to do this in your X11's $HOME/.xinitrc file as follows, before any
+"exec emacs &" line in the file, if you have any:
+
+export G_SLICE=always-malloc 
+
+This fix can be easily tested on a cygwin x-window command line by typing:
+  $ export G_SLICE=always-malloc 
+  $ emacs
 
 * General runtime problems
 
 ================ end of submitted etc/PROBLEMS patch ================





             reply	other threads:[~2008-07-07  0:32 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-07  0:32 d.henman [this message]
  -- strict thread matches above, loose matches on Subject: below --
2008-07-07 22:41 cygwin emacs gtk2 problem fix Angelo Graziosi
2008-07-08  3:03 ` d.henman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080707093208.3952@blackhawk \
    --to=dhenman@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).