delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/14/17:11:00

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Authentication-Warning: eos.vss.fsi.com: ford owned process doing -bs
Date: Tue, 14 Oct 2003 16:08:11 -0500 (CDT)
From: Brian Ford <ford AT vss DOT fsi DOT com>
X-X-Sender: ford AT eos
To: cygwin AT cygwin DOT com
Subject: Re: cygpath hangings
In-Reply-To: <Pine.GSO.4.56.0310140914020.20462@slinky.cs.nyu.edu>
Message-ID: <Pine.GSO.4.56.0310141554180.823@eos>
References: <20031014100230 DOT A12215 AT fw DOT j-son DOT org> <006501c392b7$dc780730$200aa8c0 AT thorin>
<3F8BE1B9 DOT 3000704 AT cs DOT york DOT ac DOT uk> <Pine DOT GSO DOT 4 DOT 56 DOT 0310140914020 DOT 20462 AT slinky DOT cs DOT nyu DOT edu>
MIME-Version: 1.0

Igor,

On Tue, 14 Oct 2003, Igor Pechtchanski wrote:

> On Tue, 14 Oct 2003, chris wrote:
>
> > -- Code begins --
> >
> > #include <shlobj.h>
> >
> > void fee (void) {
> >   char *buf;
> >   LPITEMIDLIST id;
> >   SHGetPathFromIDList (id, buf);
> > }
> >
> > int main (int argc, char **argv)
> > {
> >     return 0;
> > }
>
> Chris,
>
> I suspect that this hang might be happening while loading the DLL.  Could
> you try to link your program with something like below and see if it still
> hangs, and what it outputs?
>
Yes, it still hangs when run under setup from explorer.  No output from
the hung one, or when run stand alone in bash.

> If it doesn't hang, try renaming
> SHGetPathFromIDList below to something else (e.g., foo) that calls the
> real SHGetPathFromIDList, call foo() from your fee() above, and link your
> program against both test_dll.dll and SHLWAPI.DLL.
>
Well, I didn't link explicitly with SHLWAPI.DLL, but same here.

There will be no ouput unless main calls foo, right?  Then, I still get a
hang under setup from explorer; no output.  Stand alone in a shell, output
is:

DLL loaded: process attach
DLL loaded: thread attach
Segmentation fault (core dumped)

The SEGV is expected given the code is invalid anyway.

Nothing to see here... move along...

>
> -------------------------- BEGIN test_dll.c --------------------------
> #include <windows.h>
> #include <stdio.h>
> #include <shlobj.h>
>
> static FILE *output = NULL;
>
> void SHGetPathFromIDList(LPITEMIDLIST id, char *buf) {
>   return;
> }
>
> BOOL WINAPI DllMain(HINSTANCE h, DWORD f, LPVOID r) {
>   if (!output) output = stderr;
>   fprintf (output, "DLL loaded: ");
>   switch (f) {
>     case DLL_PROCESS_ATTACH: fprintf (output, "process attach");
>                              break;
>     case DLL_THREAD_ATTACH:  fprintf (output, "thread attach");
>                              break;
>     case DLL_THREAD_DETACH:  fprintf (output, "thread detach");
>                              break;
>     case DLL_PROCESS_DETACH: fprintf (output, "process detach");
>                              break;
>     default:                 fprintf (output, "WTF?!");
>   }
>   fprintf (output, "\n");
>   fflush (output);
>   return TRUE;
> }
> ---------- Note: cutting here may damage your screen surface ---------

-- 
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax:   314-551-8444

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

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019