all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Test User <testuser448@gmail.com>
Cc: 19813-done@debbugs.gnu.org
Subject: bug#19813: 24.4; emacs crashes on exit
Date: Mon, 09 Feb 2015 17:41:22 +0200	[thread overview]
Message-ID: <83iofb9jod.fsf@gnu.org> (raw)
In-Reply-To: <CAH7jLrtzJHmBHWh93fC+OmQ7y6Fr+6-cRE-sOkg1Y0oVn7U2GA@mail.gmail.com>

> Date: Mon, 9 Feb 2015 04:03:24 -0500
> From: Test User <testuser448@gmail.com>
> 
>     The problem is not with libgcc_s_dw2-1.dll, the problem is with some
>     other DLL that loads it, typically zlib1.dll or some image library.
> 
> I built emacs with -shared-libgcc in LDFLAGS and the problem went away.

That is one solution, but it is not the best one, IMO.  E.g., you
cannot move this binary to another machine without also copying
libgcc_s_dw2-1.dll with it.

The best solution is to replace the DLL(s) you have that depend on
libgcc_s_dw2-1.dll with DLLs that offer the same functionality, but do
not depend on libgcc_s_dw2-1.dll.  See below for a specific
recommendation.

> Thanks. You can close the bug if you have not already done so.

Done.

> On my main system (where the problem occurs), there is no zlib1.dll in
> /mingw/bin. I built it myself, and it does *not* have a dependency on libgcc_s_dw2-1.dll. On my virtual machine (where I did not have the problem),
> there is a zlib1.dll supplied by MinGW, and it *does* depend on
> libgcc_s_dw2-1.dll.
> 
> The only DLL loaded when emacs runs that depends on libgcc_s_dw2-1.dll
> is libharfbuzz-0.dll, which is not loaded with `emacs -Q'.

That figures: "emacs -Q" refrains from showing the splash-screen
image, which causes Emacs to load a suitable image library.  In your
case, that library is librsvg for showing the SVG variant of the
splash screen.  And the librsvg DLLs you have include
libharfbuzz-0.dll, which depends on libgcc_s_dw2-1.dll, and triggers
the problem.

In general, no MinGW DLLs distributed as binaries should depend on
libgcc_s_dw2-1.dll, for several reasons:

  . Each end-user machine that has GCC installed will have this DLL on
    PATH, which creates a small "DLL hell" when you install other
    versions of that DLL, possibly from other GCC versions

  . Loading libgcc_s_dw2-1.dll by some other DLL (as opposed to by the
    main program itself) triggers these crashes (due to a known bug in
    the machinery that supports C++ exceptions between DLLs)

  . For the person who uploads the precompiled binaries of the DLLs,
    the dependency on libgcc_s_dw2-1.dll is a terrible PITA, because
    GPL requires to provide its sources, i.e. the entire 80-MB source
    tarball of the full GCC package

You can find DLLs that are never dependent on libgcc_s_dw2-1.dll here:

  http://sourceforge.net/projects/ezwinports/files/?source=navbar

That collection includes librsvg, zlib, and all the other libraries
required by Emacs.  (Btw, the librsvg build there is much smaller than
the one you use, because it excludes every feature not useful on
Windows, like Fontconfig, Freetype, and Harfbuzz.)





  reply	other threads:[~2015-02-09 15:41 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-08  5:35 bug#19813: 24.4; emacs crashes on exit Test User
2015-02-08 16:06 ` Eli Zaretskii
2015-02-08 16:59   ` Test User
2015-02-08 18:40     ` Eli Zaretskii
2015-02-08 20:15       ` Test User
2015-02-08 20:41         ` Eli Zaretskii
2015-02-08 21:25           ` Test User
2015-02-08 23:03             ` Test User
2015-02-09  3:41               ` Eli Zaretskii
2015-02-09  9:03                 ` Test User
2015-02-09 15:41                   ` Eli Zaretskii [this message]
2015-02-09 16:29                     ` Test User
2015-02-09 17:31                       ` Eli Zaretskii
2015-02-09  3:37             ` Eli Zaretskii

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

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

  git send-email \
    --in-reply-to=83iofb9jod.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=19813-done@debbugs.gnu.org \
    --cc=testuser448@gmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.