X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org X-IronPortListener: Outbound_SMTP X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ah8GAOgQ1k+cKEcV/2dsb2JhbABFsUKDVYEHgh8SKFEBFScCLxMXAQ4BBBsah2mXK4RFnDaQLWADjHyOF4oGgnw From: "Lavrentiev, Anton (NIH/NLM/NCBI) [C]" To: "cygwin AT cygwin DOT com" Date: Mon, 11 Jun 2012 11:39:38 -0400 Subject: CYGWIN app crashes ungracefully when run from the root of a drive Message-ID: Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q5BGkZCG002500 Hi, Maybe it has been covered somewhere -- I could not find the answer, so please excuse the repetition. I observe that if I build an app (consider the simplest "Hello world" program below as an example), and store the executable at a standalone location (not CYGWIN tree), yet supplemented it with a cygwin1.dll, it can then successfully run when started in the Windows shell (CMD.EXE) from a subdirectory, but fails ungracefully if run from the root of a drive (e.g. when stored onto a USB stick that has the "flat" file structure, w/o subdirectories). Can anything be done about it? (Like allowing the app to run, or issuing an error saying "move me to a subdirectory" -- if there are principal problems of not being able to launch from the root directory. The same "friendlier" manner than Windows warns that it cannot run "a.exe" because "cygwin1.dll" is missing -- like in the case when the DLL was not copied to the "subdir" along with the executable.) Thanks! #include int main(void) { printf("Hello world!\n"); return 0; } F:\subdir>a.exe Hello world! F:\subdir>cd .. F:\>a.exe 0 [main] a 2832 F:\a.exe: *** fatal error - add_item ("\??", "/", ...) failed, errno 22 Stack trace: Frame Function Args 002868A8 6102F50B (002868A8, 00000000, 00000000, 00000000) 00286B98 6102F50B (6119DDA0, 00008000, 00000000, 6119FC4F) 00287BC8 6100612C (611DD560, 00287BF4, 00000000, 60FE000C) 00287BE8 61006168 (611DD560, 00289C10, 00000016, 0003000A) 0028AC28 61091474 (60FE000C, 6122EC60, 0028ACF8, 610831B0) 0028ACF8 610D32EF (00000000, 0028CD78, 61006720, 00000000) End of stack trace F:\> Anton Lavrentiev Contractor NIH/NLM/NCBI -- 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