public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Re: problems reading/writing to files?
@ 1998-07-13  9:40 Fred Reimer
  0 siblings, 0 replies; 4+ messages in thread
From: Fred Reimer @ 1998-07-13  9:40 UTC (permalink / raw)
  To: gnu-win32, Christopher G. Faylor

Hmpf.

I had a similar problem with junkbuster (www.junkbusters.com).  The provided
exe file for windows did not seem to want to read the config files from the
program directory when started as a NT service (using servany).  So, I
decided to recompile it as a "Unix" program using cygwin.  I ended up having
to comment out all the lines that wrote to the log file in order to get past
all of the stack exceptions.  Something is up with this, as I'm pretty sure
that the source was correct as it comes from junkbusters.  So either
Jonathan and the guys at Junkbusters have the same incorrect programming
habits (that happen to compile and run fine on Unix), both he and I have the
same mis-configuration, or something's up with cygwin...

Fred



-----Original Message-----
From: Christopher G. Faylor <cgf@cygnus.com>
Newsgroups: cygnus.gnu-win32
To: <gnu-win32@cygnus.com>
Date: Sunday, July 12, 1998 1:21 AM
Subject: Re: problems reading/writing to files?


>In article
<3.0.5.32.19980711005355.00944100.cygnus.gnu-win32@terraworld.net>,
>Jonathan George <outlaw@terraworld.net> wrote:
>>Hello all!
>>
>>I'm compiling a program using cygwin b19.1, (gcc -o lite lite.c).
>>
>>The compile goes smoothly (no errors), yet when I run the program it seems
>>to core dump everytime it tries to either READ or WRITE to a file (using
>>fprintf and/or fgets...
>>
>>Here is the core:
>
>Debug this problem using gdb, just like you would do under UNIX.  Your
>program has an error in it.  This is probably not a cygwin problem.
>--
>cgf@cygnus.com             "Everything has a boolean value, if you stand
> http://www.cygnus.com/      far enough away from it."  -- Galena Alyson
Canada
>-
>For help on using this list (especially unsubscribing), send a message to
>"gnu-win32-request@cygnus.com" with one line of text: "help".
>

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: problems reading/writing to files?
@ 1998-07-13  9:40 Christopher Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Faylor @ 1998-07-13  9:40 UTC (permalink / raw)
  To: cgf, Fred.Reimer, gnu-win32

I'm not sure what you're saying.  If you are having a problem, then
the way to debug it is with gdb.  If the problem only manifests itself
when run as a service, then you'll have to resort to setting the STRACE
environment variable to something like 1,c:/somefile.out which will
produce a trace.

If you are expecting that the problem will be diagnosed by your description
of "comment out all the lines that wrote to the log file in order to get
past stack exceptions", then I'm sorry.  That's not enough to go on.

The "stack exceptions" occur in situations where a SIGSEGV, or SIGBUS, or
SIGILL occur under UNIX.  The addresses shown are representative of
addresses in your program and as such are important information that you
can use to debug the problem.

Since a large number people are successfully doing I/O using Cygwin, So,
I think that this is obviously not some sort generic "Cygwin32 can't do
I/O" problem.  If it is something like this, however, then we'll need
much more detailed information to fix it.

>From: "Fred Reimer" <Fred.Reimer@Bellsouth.net>
>Date: Mon, 13 Jul 1998 09:20:22 -0400
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0518.4
>
>Hmpf.
>
>I had a similar problem with junkbuster (www.junkbusters.com).  The provided
>exe file for windows did not seem to want to read the config files from the
>program directory when started as a NT service (using servany).  So, I
>decided to recompile it as a "Unix" program using cygwin.  I ended up having
>to comment out all the lines that wrote to the log file in order to get past
>all of the stack exceptions.  Something is up with this, as I'm pretty sure
>that the source was correct as it comes from junkbusters.  So either
>Jonathan and the guys at Junkbusters have the same incorrect programming
>habits (that happen to compile and run fine on Unix), both he and I have the
>same mis-configuration, or something's up with cygwin...
>
>Fred
>
>
>
>-----Original Message-----
>From: Christopher G. Faylor <cgf@cygnus.com>
>Newsgroups: cygnus.gnu-win32
>To: <gnu-win32@cygnus.com>
>Date: Sunday, July 12, 1998 1:21 AM
>Subject: Re: problems reading/writing to files?
>
>
>>In article
><3.0.5.32.19980711005355.00944100.cygnus.gnu-win32@terraworld.net>,
>>Jonathan George <outlaw@terraworld.net> wrote:
>>>Hello all!
>>>
>>>I'm compiling a program using cygwin b19.1, (gcc -o lite lite.c).
>>>
>>>The compile goes smoothly (no errors), yet when I run the program it seems
>>>to core dump everytime it tries to either READ or WRITE to a file (using
>>>fprintf and/or fgets...
>>>
>>>Here is the core:
>>
>>Debug this problem using gdb, just like you would do under UNIX.  Your
>>program has an error in it.  This is probably not a cygwin problem.
>>--
>>cgf@cygnus.com             "Everything has a boolean value, if you stand
>> http://www.cygnus.com/      far enough away from it."  -- Galena Alyson
>Canada
>>-
>>For help on using this list (especially unsubscribing), send a message to
>>"gnu-win32-request@cygnus.com" with one line of text: "help".
>>
>
>
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: problems reading/writing to files?
       [not found] <3.0.5.32.19980711005355.00944100.cygnus.gnu-win32@terraworld.net>
@ 1998-07-11 15:39 ` Christopher G. Faylor
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher G. Faylor @ 1998-07-11 15:39 UTC (permalink / raw)
  To: gnu-win32

In article <3.0.5.32.19980711005355.00944100.cygnus.gnu-win32@terraworld.net>,
Jonathan George <outlaw@terraworld.net> wrote:
>Hello all!
>
>I'm compiling a program using cygwin b19.1, (gcc -o lite lite.c).
>
>The compile goes smoothly (no errors), yet when I run the program it seems
>to core dump everytime it tries to either READ or WRITE to a file (using
>fprintf and/or fgets...
>
>Here is the core:

Debug this problem using gdb, just like you would do under UNIX.  Your
program has an error in it.  This is probably not a cygwin problem.
-- 
cgf@cygnus.com             "Everything has a boolean value, if you stand
http://www.cygnus.com/      far enough away from it."  -- Galena Alyson Canada
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

* problems reading/writing to files?
@ 1998-07-11  4:23 Jonathan George
  0 siblings, 0 replies; 4+ messages in thread
From: Jonathan George @ 1998-07-11  4:23 UTC (permalink / raw)
  To: gnu-win32

Hello all!

I'm compiling a program using cygwin b19.1, (gcc -o lite lite.c).

The compile goes smoothly (no errors), yet when I run the program it seems
to core dump everytime it tries to either READ or WRITE to a file (using
fprintf and/or fgets...

Here is the core:

(D:\LITE\LITE.EXE 1000) Exception trapped!
(D:\LITE\LITE.EXE 1000)
exception C0000005 at 4011A3
(D:\LITE\LITE.EXE 1000) exception: ax 401040
bx 0 cx 3 dx BFFBFA00
(D:\LITE\LITE.EXE 1000) exception: si 253FCA8 di
81587520 bp 253FC84 sp 253FA70
(D:\LITE\LITE.EXE 1000) exception is:
STATUS_ACCESS_VIOLATION
(D:\LITE\LITE.EXE 1000) Stack
trace:
(D:\LITE\LITE.EXE 1000) frame 0: sp = 0x253F780, pc =
0x1000A250
(D:\LITE\LITE.EXE 1000) frame 1: sp = 0x253F8A4, pc =
0xBFF76780
(D:\LITE\LITE.EXE 1000) frame 2: sp = 0x253F8C8, pc =
0xBFF858F3
(D:\LITE\LITE.EXE 1000) frame 3: sp = 0x253F960, pc =
0xFFECBAD7
(D:\LITE\LITE.EXE 1000) frame 4: sp = 0x253FC84, pc =
0x401921
(D:\LITE\LITE.EXE 1000) frame 5: sp = 0x253FC8C, pc =
0x10006B89
(D:\LITE\LITE.EXE 1000) frame 6: sp = 0x253FE0C, pc =
0x10006B9C
(D:\LITE\LITE.EXE 1000) frame 7: sp = 0x253FE18, pc =
0x401A5E
(D:\LITE\LITE.EXE 1000) frame 8: sp = 0x253FE28, pc =
0x40103A
(D:\LITE\LITE.EXE 1000) frame 9: sp = 0x253FE38, pc =
0xBFF88E93
(D:\LITE\LITE.EXE 1000) frame 10: sp = 0x253FF78, pc =
0xBFF88D41
(D:\LITE\LITE.EXE 1000) frame 11: sp = 0x253FFF4, pc =
0xBFF87759
(D:\LITE\LITE.EXE 1000) frame 12: sp = 0x815A1F54, pc =
0x6
(D:\LITE\LITE.EXE 1000) Exception:
STATUS_ACCESS_VIOLATION
(D:\LITE\LITE.EXE 1000) Error while dumping state
(probably corrupted stack)

Any help in fixing this will be extremely appreciated...


--------------------------------------------------------------
      .---.        .----------    Jonathan George,
     /     \  __  /    ------    Tech. Support, Coder.
    / /     \(  )/    -----     Terra World, Inc.
   //////   ' \/ `   ---       Email: outlaw@terraworld.net
  //// / // :    : ---               -support@terraworld.net
 // /   /  /`    '--                 -root@lite.net
//          //..\\          IRC: net @ irc.lite.net
       ====UU====UU====    Phone: 1-316-332-1616 [office]
           '//||\\`       
            ``''``
  --- mild-mannered programmer by day,                 
      positively grouchy programmer by night           
--------------------------------------------------------------
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~1998-07-13  9:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-13  9:40 problems reading/writing to files? Fred Reimer
  -- strict thread matches above, loose matches on Subject: below --
1998-07-13  9:40 Christopher Faylor
     [not found] <3.0.5.32.19980711005355.00944100.cygnus.gnu-win32@terraworld.net>
1998-07-11 15:39 ` Christopher G. Faylor
1998-07-11  4:23 Jonathan George

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).