public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Anthony Heading <anthony@ajrh.net>
To: cygwin@cygwin.com
Subject: Re: mkshortcut (cygutils-1.4.14) free error
Date: Wed, 28 Oct 2015 04:49:00 -0000	[thread overview]
Message-ID: <1445992232.1521329.422055817.4924D989@webmail.messagingengine.com> (raw)
In-Reply-To: <loom.20151027T061000-194@post.gmane.org>

On Tue, Oct 27, 2015, at 01:29 AM, Mark Geisert wrote:
> I really appreciate the leads and code you've provided. Could we
> please discuss only on the Cygwin mailing list? That's the convention
> we have, barring extraordinary circumstances :) . It allows for
> public review.

I believe I did send everything to the mailing list. I may have copied
you directly also. Apologies if that was inconvenient.

> At that point I could reproduce your first mkshortcut issue. Your
> patch seems to fix that issue. So far, so good.

Great.

> The second issue with the non-absolute path is more problematic.
> Without your second patch, I do see the issue but only on the 2nd or
> later invocation. In other words, if the xyzzy.lnk file does not
> initially exist, the command 'src/mkshortcut/.libs/mkshortcut xyzzy'
> works and does create the link file. Another invocation then shows the
> error. Is it simply mis-reporting that there's an existing link file?

Yes. The hint in the error message is unhelpful I think, since a missing
directory is only one of a myriad of possible errors. As you note, an
existing link prompts the same message.

On the build I made on Windows 10, however, I hit the problem on the
very first invocation. I imagine you therefore are building on Windows 7
or earlier, which seems to produce binaries that work OK.  As I said, I
suspect this is because IPersistFile::Save has changed semantics, e.g.
per this link:

https://msdn.microsoft.com/en-us/library/windows/desktop/hh848036%28v=vs.85%29.aspx

I haven't verified this;  I don't know how why or whether gcc is
volunteering the executable to run in Windows 8 mode, or if there's a
manifest in some dll library stub, or whether the COM ID of the
IPersistFile interface is redirected by newer headers, or any similar
variant of Windows black magic,  but it seems to me like a good guess.

If you're going to stay building on Windows 7 then, I don't think this
latter patch is needed,  although it's hopefully harmless.  But I guess
without it the code will silently break when Windows 8 or newer comes
into the picture.

Regards

Anthony

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

  reply	other threads:[~2015-10-28  0:30 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-18  2:30 Anthony Heading
2015-10-26 10:01 ` Anthony Heading
2015-10-26 10:08   ` Mark Geisert
2015-10-26 10:36     ` Corinna Vinschen
2015-10-27  5:29     ` Anthony Heading
2015-10-26 16:03   ` Ken Brown
2015-10-27  0:11     ` Mark Geisert
2015-10-27  8:46       ` Anthony Heading
2015-10-27  9:30         ` Mark Geisert
2015-10-28  4:49           ` Anthony Heading [this message]
2015-10-28  9:15             ` Mark Geisert
2015-10-28 13:05               ` Corinna Vinschen
2015-10-28 14:49                 ` Mark Geisert

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=1445992232.1521329.422055817.4924D989@webmail.messagingengine.com \
    --to=anthony@ajrh.net \
    --cc=cygwin@cygwin.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.
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).