From: swarnerx3 AT acadia DOT net (Scott Warner) Subject: Debugging help needed 9 Nov 1997 10:40:09 -0800 Message-ID: <199711091821.NAA10228.cygnus.gnu-win32@p2.acadia.net> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit To: I am writing a theorem generator. In the function that asks for your theorem the program seems to crash. The code is: cout << "\nEnter your theorem : "; cin.getline(m_str, sizeof(m_str)-1); m_str is a class member of a predetermined size. Here is the DOS window output after it crashes: Enter your theorem : (D:\GNUWIN32\SOURCE\GODEL\GODEL.EXE 1000) In cygwin_except_handler (D:\GNUWIN32\SOURCE\GODEL\GODEL.EXE 1000) Exception trapped! (D:\GNUWIN32\SOURCE\GODEL\GODEL.EXE 1000) exception C0000005 at 406D09 (D:\GNUWIN32\SOURCE\GODEL\GODEL.EXE 1000) exception: ax 0 bx 254F2C0 cx 4690004 dx 50 (D:\GNUWIN32\SOURCE\GODEL\GODEL.EXE 1000) exception: si 4 di 1000B8B3 bp 254F0EC sp 254F0E4 (D:\GNUWIN32\SOURCE\GODEL\GODEL.EXE 1000) exception is: STATUS_ACCESS_VIOLATION (D:\GNUWIN32\SOURCE\GODEL\GODEL.EXE 1000) Stack trace: It goes on to list a detailed stack trace. Two questions: why does it crash? cin.getline is used correctly. Is it out of stack space? I do not allocate m_str using new, just char m_str[MAX_BUF], where MAX_BUF is 120. Third: does a debugger come with gun-win32? I have used Codeview several times. - For help on using this list (especially unsubscribing), send a message to "gnu-win32-request AT cygnus DOT com" with one line of text: "help".