From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4609 invoked by alias); 16 Jul 2008 16:01:38 -0000 Received: (qmail 4597 invoked by uid 22791); 16 Jul 2008 16:01:35 -0000 X-Spam-Check-By: sourceware.org Received: from wf-out-1314.google.com (HELO wf-out-1314.google.com) (209.85.200.171) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 16 Jul 2008 16:01:13 +0000 Received: by wf-out-1314.google.com with SMTP id 28so5485156wfc.20 for ; Wed, 16 Jul 2008 09:01:11 -0700 (PDT) Received: by 10.142.253.21 with SMTP id a21mr128646wfi.254.1216224069974; Wed, 16 Jul 2008 09:01:09 -0700 (PDT) Received: by 10.142.242.10 with HTTP; Wed, 16 Jul 2008 09:01:09 -0700 (PDT) Message-ID: Date: Wed, 16 Jul 2008 16:01:00 -0000 From: "Matias Bonaventura" To: cygwin@cygwin.com Subject: help with iofstream - Exception: STATUS_ACCESS_VIOLATION when writing or reading MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2008-07/txt/msg00307.txt.bz2 Hi, I=B4m trying to compile and run an application. It=B4s currently compiling fine, but as soon as I run it I get the below error. Debbugging the code I manage to find it was failing when trying to manipulate (read/write) a file. I reduce the error and create a simple test case which outputs the same err= or: [(!) DEBUG. Before opening the file] [(!) DEBUG. Before writing into the file] 57 [main] test 5664 _cygtls::handle_exceptions: Exception: STATUS_ACCESS_VIOLATION 766 [main] test 5664 open_stackdumpfile: Dumping stack trace to test.exe.stackdump The test case code I=B4m using: int main() { cout << "[(!) DEBUG. Before opening the file]" << endl; ofstream file; file.open(FILE_NAME, ios::out); if (file.is_open() && file.good() ){ cout << "[(!) DEBUG. Before writing into the file]" << endl; file << "hola archivo"; cout << "[(!) DEBUG. After writeing into the file]" << endl; =09=09 file.close(); } =09 return 0; } Any idea why this could be happening? Is it a problem with my cygwin instalation, with the compiler....? I=B4m using gcc-2.95. I didn=B4t try with newer versions because the application I=B4m trying to compile targets that compiler and won=B4t work the newer. THANKS! -- :-) M.A.T.I.A.S. :-) -- 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/