On Aug 18 00:20, Charles Wilson wrote: > Christopher Faylor wrote: > > Have you investigated the possibility that one of the package files > > may be corrupted? > > Not really -- but when I run cygcheck.exe under gdb, I get all the > packages listed properly (when 'set arg -cd') -- so I really don't think > that's it.
I can reproduce the problem 1 out of 3 or 4. I also added some additional debug output for a start: get_packages() [...] for (n = 0; fgets (buf, 4096, fp) && n < nlines;) { char *package = strtok (buf, " "); printf ("(%8ld) %-20s :: %-20s\n", ftell (fp), package ?: "<NULL>", argv[0]); [...] } printf ("finished\n"); And that's weird, when the problem occurs, ftell(fp) prints the same offset into the file twice: [...] ( 502) automake1.8 :: openssh ( 545) automake1.9 :: openssh ( 545) automake1.9 :: openssh and then the next call to fgets() just pegs out. The next test was not to call load_cygwin(). In this case, the problem seems to disappear. I can't reproduce it in 100s of calls. Next, I call LoadLibrary ("cygwin1.dll") but none of the other processing in load_cygwin(). Still no problem. Next, enable the FreeLibrary call. Now the problem reappears. So it's the FreeLibrary call which triggers the problem. What I don't understand so far is, why it does. Corinna -- Corinna Vinschen Please, send mails regarding Cygwin to Cygwin Project Co-Leader cygwin AT cygwin DOT com Red Hat -- 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/